Wednesday, 20 August 2008

Joining two AVI files with MENCODER

It is usual having an avi film split into two cdrom sized files of 700 megabytes each.

mencoder utility allows us to concatenate these two parts into a new reintegrate file.

mencoder (MPlayer's Movie Encoder) is a tool MPlayer provides to encode multimedia contents into files.
It supports among others, MPEG-4 video, libavcodec codecs, and PCM/MP3/VBRMP3 audio formats.
mencoder also possesses stream copying abilities and a powerful filter system (crop, expand, flip, ....).


So we have a film split into two files e.g: foo1.avi and foo2.avi, both with the same encoding characteristics (window size, codecs, bitrate...),

We execute this command that produces an output file called foo.avi which is the result of concatenating foo1.avi and foo2.avi files.
$mencoder -oac copy -ovc copy -forceidx foo1.avi foo2.avi -o foo.avi

The command options mean:
* -oac output audio codec
* -ovc output video codec
* -o output file name
* -forceidx forces creation of a new index.
copy means copying the original stream and do not change the codec it is encoded into (because of that it is very fast).


more info executing: $man mencoder

INSTALLING MENCODER


YOU MAY ALSO BE INTERESTED IN:

Split a Media Video File (AVI, FLV,...) using Mencoder and Mplayer

Convert videos to VP6 codec format using MENCODER

0 comentarios: