Concatenating Files using FFmpeg

Some manufacturers make it so difficult to view their video after its been exported from their state of the art Digital DVR!

A disk containing a player….its starting well!

A folder within that disk containing the video – things are looking good. The files are separated up, one per camera and are in 5min chunks! The player only accepts one file at a time and the only way to close the video and load the new one is to restart the player!!… and theres 3 hours of footage accross 8 cameras – that’s a lot of files.

So, its time to join them together and, as they are AVC/H264 streams, rewrap them into a container that I can scrub through easily….

As mentioned in the dealing with HD footage post, joining and rewrapping is a real time saver.

As I had so many I wrote the command in notepad and then just dropped that into the ffmpeg command.

1. I viewed the first file in each set to view the overlaid timecode.

2. I viewed the FFprobe result (ffprobe -show_streams -count_frames -pretty filename.h264)

3. Established 5 FPS

4. ffmpeg -i “concat:file1.h264|file2.h264|file3.h264” -fflags genpts -vcodec copy -r 5 -f avi allfiles.avi

Copying all the video file paths into my notepad command was completed by selecting shift and then right clicking the files. I then selected ‘Copy File as Path’. The command was then formatted around the files.

Only took a few minutes to write up the command and then after a few more minutes I had single camera avi’s that scrub and play much easier for viewing.

More on using concat

I have linked to this tutorial before but I notice that it was updated late last year – it really is a great read for those wishing to learn more.

http://sonnati.wordpress.com/2011/07/11/ffmpeg-the-swiss-army-knife-of-internet-streaming-part-i/

Advertisements
By Spreadys Posted in EEPIP

One comment on “Concatenating Files using FFmpeg

  1. Pingback: Samsung RE4 and VFS4 Files | Spreadys Space

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s