[MEncoder-users] How to join avi files with x264 streams?
Josef Wolf
jw at raven.inka.de
Sat May 8 15:29:18 CEST 2010
On Sat, May 08, 2010 at 01:41:05PM +0200, Grozdan wrote:
> On Sat, May 8, 2010 at 11:48 AM, Josef Wolf <jw at raven.inka.de> wrote:
> > On Fri, May 07, 2010 at 10:29:31AM -0500, Laine Lee wrote:
> >> On 5/7/10 1:00 AM, "Josef Wolf" <jw at raven.inka.de> wrote:
> >> > I have captured my old VHS recordings with mencoder and created x264 avi's
> >> > using two-pass with those options:
> >> >
> >> > -ovc x264 -x264encopts
> >> > bitrate=800:pass=2:subq=7:frameref=15:subq=6:frameref=15:me=umh:partitions=all
> >> > :8x8dct:direct_pred=auto:me_range=64:trellis=2:bframes=5:b_pyramid:weight_b:th
> >> > reads=auto:nr=1000
> >> >
> >> > In the next step, I want to join some of those files. I tried:
> >> >
> >> > mencoder -ovc copy -oac copy -o outfile.avi file1.avi file2.avi
> >> >
> >> > But the resulting file has some strange artefacts in the first ten seconds
> >> > after the join position (that is, in the first ten seconds of file2.avi)
> >> > which are _not_ present in the original file2.avi.
> >> >
> >> > Why does "-ovc copy" do any manipulations on the stream?
> >> >
> >> > Any ideas?
> >>
> >> Can you use "MP4Box -cat"?
> >>
> >> http://gpac.sourceforge.net/doc_mp4box.php
> >
> > jw at ubuntu:MP4Box -cat 01.avi -cat 02.avi t.avi
> > H264/AVC Video format not supported in AVI - please extract to raw format
> > first
> > Error appending 01.avi: Feature Not Supported
> >
> > Do I have to re-encode into another format first? But then I would loose
> > quality?
>
> No, you have to do exactly as it says above. Extract the video from
> the avi container. Done like this
>
> MP4Box -aviraw video yourfile.avi
Yeah, this seems to work. But now I loose A/V-sync again =:-(
This is what I do:
MP4Box -aviraw video file1.avi
MP4Box -aviraw video file2.avi
MP4Box -aviraw audio file1.avi
MP4Box -aviraw audio file2.avi
MP4Box -cat file1_video.h264 -cat file2_video.h264 out.h264
MP4Box -cat file1_audio.mp3 -cat file2_audio.mp3 out.mp3
MP4Box -add out.mp3 -add out.h264 out.mpg
What am I doing wrong?
More information about the MEncoder-users
mailing list