Sun Aug 9 17:46:31 PDT 2015

An ffmpeg Recipe For Concatenating Video Files

Here is a recipe for concatenating mpg and other video format files.

ffmpeg -i a.mpg -s 480x360 -maxrate 2500k -bufsize 4000k -b 700k -ar 44100 i1.mpg
ffmpeg -i b.mpg -s 480x360 -maxrate 2500k -bufsize 4000k -b 700k -ar 44100 i2.mpg
ffmpeg -i c.mpg -s 480x360 -maxrate 2500k -bufsize 4000k -b 700k -ar 44100 i3.mpg
cat i1.mpg i2.mpg i3.mpg > a.mpg
ffmpeg -i a.mpg -sameq combined.mpg

This seems to work better than simply using 'sameq' throughout.


Posted by ZFS | Permanent link | File under: bash