Monday, August 11, 2008

Converting & joining multiple MPEG-1 files into one AVI

  • convert with "ffmpeg" ::
ffmpeg -i input-1.avi -r 24 output-1.avi
ffmpeg -i input-2.avi -r 24 output-2.avi
ffmpeg -i input-3.avi -r 24 output-3.avi
ffmpeg -i input-4.avi -r 24 output-4.avi

  • cat them together ::
cat output-1.avi outout-2.avi output-3.avi output-4.avi > out_tmp.avi

  • recreate the audio/video index with "mencoder" ::
mencoder -forceidx -oac copy -ovc copy out_tmp.avi -o out_final.avi

  • OR, in one mplayer command:

    mencoder -forceidx -oac copy -ovc copy file1.avi file2.avi -o final_output.avi
  • OR, use 'avimerge':

    If on Debian/Ubuntu, "apt-get install transcode-utils" ... doing this will make sure, 'avimerge' is present in the system.

    avimerge -o output.avi -i input1.avi input2.avi


Post a Comment