ADAM'S WEB PRESENCE

21 July 2007

Concatenating AVI files

Filed under: Nerd Notes — adam @ 6:10 pm

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

3 Comments »

  1. Comment by Toni McFarland — 17 December 2007 @ 11:52 am

    I think TubeSucker YouTube Video Downloader software can catenate files as well. It’s a bit easier to use since it has a GUI interface. It has a batch file format converter for converting files from FLV to MP4, MP3, AVI, WAV, MOV, WMV, etc. Here’s some info from their site. You can get more info here

    http://www.newrad.com/software/tubesucker/

    …extra spam deleted…

  2. Comment by discostu — 25 April 2008 @ 2:08 am

    Try Jfuse: http://www.jfuse.com
    It is compatible with all major formats and is easy to use (with a Mac version)

  3. Comment by Bill Gibbons — 29 October 2008 @ 2:44 pm

    Thanks Toni!!!!

    TubeSucker rocks. I really like it. It’s easy to use, but really deep.
    Alot more than just a youtube video downloader, and batch converter. Lots of cool quirky features. I find a new feature everyday. I just leave it running. I almost never shut it down.

RSS feed for comments on this post. TrackBack URI

Leave a comment


Powered by WordPress