
In recording videos, I often make mistakes but don’t want to discard a really great video or discussion. Sometimes I have to edit out pieces of a video and I prefer to do this with avconv (a branch of the ffmpeg project).
Concatenating Videos
One can use the command
avconv -i input.avi -ss xx:xx:xx -t yy:yy:yy output.mp4
where the input video is ‘input.avi’, the ‘-ss’ argument tells the starting point in hh:mm:ss and the ‘-t’ argument tells me where a stopping point should be in hh:mm:ss. The file is output as output.mp4.
However, when you cut out a bad piece of video, one sometimes needs to concatenate the two good pieces togther. With avconv, one should output to .mpg (MPEG-1 or MPEG-2) instead of .mp4. Then, with two pieces of video, in1.mpg and in2.mpg, we can use the code
avconv -i concat:in1.mpg|in2.mpg output.mpg
in the commandline to combine the two.
Notes
For anyone looking to find my primary refenerence, the link is http://stackoverflow.com/questions/15977861/avconv-how-to-concatenate-a-bunch-of-flv-files-h264-encoded-video-adpcm-swf-e.
I highly recommend learning to use avconv/ffmpeg. These tools are efficient and robust. There are installations available for every platform under the sun and the interaction with system-wide codecs is unparalleled.
For projects that are exceptionally low-key, like converting podcasts from one format to another, some simple bash shell scripting with avconv calls will help you make quick and efficient work of those projects.