How to join multiple video files under linuxMar 26th, 2012 | By admin | Category: Linux / Freebsd
Well it looks like while I was recording a company meeting instead of pressing the shortcut key to pause the recording I was pressing the stop key to stop and start a new recording.. Ugh, so now I have a 2 hour meeting broken down into a bunch of individual .avi files How oh how will I ever combine them?
Well lucky for me I’m a linux user which means that there’s a quicker, easier way to do this than in any other operating system.
First step is just to combine the files with ‘cat’ like this : cat file1.avi file2.avi file3.avi > fileCombined.avi . Or cat file*.avi > fileCombined.avi.
Easy enough right? Yea, until you try to play it and you’ll find that it will only portion of video from the first file. To do that you need mencoder and mplayer. Grab that with sudo apt-get install mplayer mencoder
After that run:
mencoder -forceidx -oac copy -ovc copy fileCombined.avi -o fileCombined_fixed.avi
Done deal, easy peasy lemon squeezy.