[MEncoder-users] Merging H.264/AAC movies [HELP]

Henk Schoneveld belcampo at zonnet.nl
Mon May 19 16:13:58 CEST 2008


Sebi Onofrei wrote:
> Hello people,
>
> I tried but with no success yet to merge 2 H.264/AAC movies into one 
> output, using this command:
>
> "mencoder -of lavf -lavfopts 
> format=mp4:i_certify_that_my_video_stream_does_not_use_b_frames -oac 
> copy -ovc copy first.mov second.mov -o merged.mov"
>
> The mencoder output after running the above configuration looks like 
> this:
> -----------
> MEncoder 1.0rc1-4.1.2 (C) 2000-2006 MPlayer Team
> CPU: Intel(R) Xeon(R) CPU           X3210  @ 2.13GHz (Family: 6, 
> Model: 15, Stepping: 11)
> CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
> Compiled with runtime CPU detection.
> success: format: 0  data: 0x0 - 0xe3ed3
> Quicktime/MOV file format detected.
> VIDEO:  [avc1]  1024x768  24bpp  30.000 fps    0.0 kbps ( 0.0 kbyte/s)
> [V] filefmt:7  fourcc:0x31637661  size:1024x768  fps:30.00  ftime:=0.0333
> ** MUXER_LAVF 
> *****************************************************************
> You have certified that your video stream does not contain B frames.
> REMEMBER: MEncoder's libavformat muxing is presently broken and will 
> generate
> INCORRECT files in the presence of B frames. Moreover, due to bugs 
> MPlayer
> will play these INCORRECT files as if nothing were wrong!
> ******************************************************************************* 
>
> OK, exit
> videocodec: framecopy (1024x768 24bpp fourcc=31637661)
> Audio format 0x6134706d is incompatible with '-oac copy', please try 
> '-oac pcm' instead or use '-fafmttag' to override it.
>
> Exiting...
> -----------
>
> Then I tried to force a new tag with '-fafmttag 0xff', and there is a 
> floating point exception:
> ----------
> videocodec: framecopy (1024x768 24bpp fourcc=31637661)
> Forcing output audio format tag to 0xff.
> audiocodec: framecopy (format=ff chans=2 rate=48000 bits=16 B/s=192000 
> sample-0)
> VIDEO CODEC ID: 28
> AUDIO CODEC ID: 15003, TAG: 0
> Writing header...
> [mp4 @ 0x85a7c54]Warning, using MS style audio codec tag, the file may 
> be unplayable!
> [mp4 @ 0x85a7c54]track 1: sample duration is not set
> Floating point exception
> ----------
>
> Can anyone help or give me hints about how should I configure mencoder 
> to merge H.264/AAC movies?
> Or at least is it even possible to do so?
>
> Thank you.
>
> With kind regards,
> Sebi Onofrei
> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users

Have a look at http://gpac.sourceforge.net/doc_mp4box.php
MP4Box -add file1.mov#video -cat file2.mov#video -add file1.mov#audio
-cat file2.mov#audio newfile.mp4 will probrably do what  you want

If you get sync issues, you can resolve this with MP4Box -delay 1=200
newfile.mp4 if in this case audio would be 200ms behind video

Henk Schoneveld





More information about the MEncoder-users mailing list