Concatenating AVI files
Here’s a small but useful shell script to concatenate any number of AVI files. It works great on Ubuntu and should also work on other UNIX-based systems as long as you have mencoder installed.
To use it, just put the name of each file on the command line in order and they will be all joined together into one big file called joined.avi
#!/bin/sh # catavi - Script to concatenate multiple AVI files. # by Adam Pierce http://www.doctort.org/adam # # Note: The AVI files must be of the same format (eg. same codec, frame size etc). # # This script is freeware. You can use it, copy it, change it, whatever. TEMPFILE=/tmp/avitmp cat "$@" > $TEMPFILE mencoder -forceidx -oac copy -ovc copy $TEMPFILE -o joined.avi rm $TEMPFILE
Usage example:
./catavi movie-part1.avi movie-part2.avi
