[MEncoder-users] audio sync problens when encoding realtime TV

James Hastings-Trew jimht at shaw.ca
Mon Sep 24 15:18:26 CEST 2007


Roberto Hradec wrote:
> Yeah... my first choice was to save straight to MP4... But the mp4 
> output of mencoder does not play on ITunes. And thats my problem... I 
> need to generate ITunes compatible files to publish as podcasts.
>
> I endup saving as ASF for no particular reason... I did tests saving 
> straight to MP4,MPEG, PSP MP4 and AVI from mencoder. All of then save 
> correclty, with no sync problems (just like asf). But when I try to 
> remux using mp4creator I get the same problem (just sometimes... again, 
> the sync problem happens just sometimes when theres loads of frame 
> droppings).
>
> I've being testing this file-format combinations for about 5 weeks 
> now... its hard because I need to wait for a frame-dropping situation to 
> check if the file format is holding or not when de-muxing and muxing 
> back to mp4. All file formats works fine on 80% of the encodings.
>
> When you say to use YAMB, what exactly you talking about? is there 
> something on yamb (mp4box) to fix a mencoder mp4 file without 
> demuxing/muxing it, to be able to run in quicktime/itunes?
>
> maybe I'm missing something here... I would love to encode the video and 
> just publish it, whitout the need to remux it...
>
> -H
>   
Splitting audio and video up and re-muxing them back together is just 
asking for synch problems. Avoid if possible.

You didn't say if you were doing this on Windows or Linux. There is is a 
utility called NicMP4Box ( http://nic.dnsalias.com/ ) that will add the 
iTunes "atom" to the file after MEncoder creates it. You'll also need a 
couple of other parameters in your MEncoder command line: Here is a 
skeleton command line that will create a compliant MP4 file that will 
work in iTunes and the iPod:

|mencoder INPUT -sws 9 -vf scale=640:-10,harddup -oac faac -faacopts 
br=128:mpeg=4:object=2:raw -ovc x264 -x264encopts 
bitrate=900:vbv_maxrate=1500:vbv_bufsize=2000:nocabac:level_idc=13:global_header 
-ofps 30000/1001 -of lavf -lavfopts format=mp4 -o OUTPUT

nicmp4box -add OUTPUT FINALFILE|

You'll need to supply the appropriate -ofps 30000/1001 or -ofps 
24000/1001 (depending on the frame rate of your source).



More information about the MEncoder-users mailing list