[MEncoder-users] Remuxing to mp4 on windows

Raimund Berger raimund.berger at gmail.com
Tue May 27 21:15:09 CEST 2008


James Hastings-Trew <jimht at shaw.ca> writes:

> I found that this alternative method works much better, and eliminates 
> all of the problems I was having:
>
> encode video and audio to AVI with pcm audio (-oac pcm -channels 2 
> -srate 48000)
> extract video stream:
>     mencoder temp.avi -of rawvideo -nosound -ovc copy -o temp_video.h264
> extract audio stream:
>     mplayer temp.avi -vc null -vo null -ao pcm:fast
> encode audio stream to aac:
>     neroaacenc -lc -br 1600000 -if audiotemp.wav -of temp_audio.m4a
> mux to mp4:
>     mp4box -add temp_video.h264 -add temp_audio.m4a -fps 23.976 -tmp 
> c:\temp MyMP4.mp4
>
> Mp4box does not seem to have a 4Gb limit on muxing, but definitely has 
> one on extracting streams from large AVI files.
>
> Resulting file plays well in everything I have tested it with, and audio 
> sync is maintained. Hope this helps someone.

Thanks for the followup. In fact, I've been using nero for aac
encoding lately too, with a slightly different approach.

That is, I do -oac copy on both passes now to just copy over the
original ac3 stream into the avi, and then pipe the pcm decoded stream
into nero. That way I can preserve surround sound by e.g. encoding ac3
5.1 into AAC 5.1, which is quite neat actually.

It might need explicit channel mapping though, since surround channel
ordering in ac3 is different than in AAC, and last time I checked
mencoder svn didn't yet get it right by itself.



More information about the MEncoder-users mailing list