[MEncoder-users] avi h264 to mp4 (without transcoding)

Phil Sturges pssturges at gmail.com
Sun Jul 24 12:05:23 CEST 2011


Andrew Berg <bahamutzero8825 <at> gmail.com> writes:

> Also, the lavf muxer (at least
> in MEncoder) is broken and most players will have a hard time with the
> file if the video has B-frames. MP4Box is a wonderful tool for creating
> good MP4 containers.
> 

Andrew, if you recall, you had some input when I asked about this issue on the 
ffmpeg users mailing list. The current status is basically where I left off 
there. Files produced by ffmpeg don't play correctly (wobbly video)on the ipad 
but audio stays in sync and files produced by mp4box play well except for 
audio sync. From what you are saying here, it seems mencoder is a dead end.

You seem to a bit of a fan of mp4box. The process I used goes something like 
this:
1)demux my avi with mp4box
   MP4Box -aviraw video video.avi
   MP4Box -aviraw audio video.avi
2) encode ac3 to aac with ffmpeg
   ffmpeg -i video_audio.ac3 -acodec libfaac -ac 2 -ab 160k -threads 4 
video.aac
3) mux all 3 streams into mp4 with mp4box
   MP4Box -add video_video.h264 -add video.aac -add video_audio.ac3 -fps 25 -
nodrop video.mp4

Any thoughts as to how correct the audio sync? Or perhaps the wobbly video 
with ffmpeg? Or any other method of acheiving this for that matter?



More information about the MEncoder-users mailing list