[MEncoder-users] How to join avi files with x264 streams?

Miroslav Rovis m.rovis at inet.hr
Sat May 8 15:39:40 CEST 2010

Hash: SHA1

> Can you use "MP4Box -cat"?
No, unless you first encode the avi into mp4.
But then it is more purposeful to use:
MP4Box -splitx
>> On 5/7/10 1:00 AM, "Josef Wolf" <jw at raven.inka.de> wrote:
Hi Josef! So it's the two of us in the world who are happy users of
mencoder for are prized family/national memories... :-) You wouldn't
believe that best things in the world are not best used, and it's a
shame. I am e.g. one of the people who relishes in using both Emacs
nad Vim and it's a shame how engenious inventions like these are not
sufficiently known... MPlayer should be mandatory in secondary
schools, as well as Linux and other Open Source unparalled
applications! And children should be thought to use Gnu PGP.
But here follows the payload of my message.
>>> ...
>>> mencoder -ovc copy -oac copy -o outfile.avi file1.avi
>>> file2.avi
Wouldn't work either. That only copies each stream, I don't think it
cat concatenate them properly...
I use avimerge, and with success more often then not. But it may
depend on the exact start of the file.
The script I already posted and amply commented a few days ago:

# menc_avx_cp.sh
v4=$( scale=9; echo "($4-$3)"|bc)
v1=`echo $1 | cut -d '.' -f1`
ext=`echo $1 | cut -d '.' -f2`
mencoder -noskip -mc 0 -ss $3 -endpos $v4 -oac copy -ovc copy -of avi
- -o ${v1_r}.avi $v1.$ext

cuts x264 avi's just fine. Can use decimal, but sometimes it makes,
sometimes not any difference, like:

$ menc_avx_cp.sh file.avi PART1 3.64 1962.6

writes file_PART1.avi from second 3+ to second 1963- of file.avi
Similarly also we get another file: file_PART2.avi

And since avimerge or something else in the process is quirky, if the
parts above weren't successful with the following

avimerge -i file_PART1.avi file_PART2.avi -o file_ALL.avi

then you try 3.2 instead of 3.64 and similarly... Well, you take a
different second where to cut them at... Trials and errors...

Where you get avimerge (BTW, there's also avisplit, but I think my
little script's use of mencoder's precision is what suits mine and
your purpose better) is I hope easy to find... No info off the top of
my head right now.
Hope this helps.
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/


More information about the MEncoder-users mailing list