[MPlayer-users] implicit (?) delay when writing a mpeg

Lobster lobo at lobs.sytes.net
Sat Sep 25 00:18:36 CEST 2010


  On 24/09/2010 7:13 p.m., Alexander Roalter wrote:
> Am 23.09.2010 22:50, schrieb Lobster:
>>    On 23/09/2010 11:26 a.m., Alexander Roalter wrote:
>>> Hi,
>>>
>>> when I create a video with mencoder using the following settings:
>>>
>>> -of mpeg
>>> -ovc lavc
>>> -lavcopts vcodec=mpeg2video:vqmin=2:vqscale=2:keyint=12
>>> -ofps 24
>>> -oac mp3lame
>>> -lameopts abr:padding=2
>>> -srate 44100
>>>
>>> I get a video, where the audio is out of sync (by around 0.4 to 0.5
>>> seconds).
>>>
>>> Playing the video with -delay 0.4 has the correct sync, but why is this
>>> asynchronizity there in the first place?
>>>
>>>
>> A Lot of it all depends on your source file.
>> I would highly recommend you add -vf harddup  to your command line, if
>> you notice any
>> duplicate frame messages at the beginning of the encode they may be what
>> cause your
>> current av offset.
>> The harddup filter will make MEncoder encode those duplicate frames to
>> keep av sync.
>
> Unfortunately, it didn't solve the problem, now the delay is ~0.2.
> I'll try the same without changing the frame rate, but are the other 
> suggestions?
>

Maybe set your fps to 24000/1001  (which is the correct syntax for 
23.97fps which it
seems a lot of US based film DVD's are done at)

Do a test removing the -srate option and see if that changes anything.

I'd also try using another audio encoder, such as -oac pcm , This will 
give an
indication if maybe the audio encoder is adding the delay.

Just out of curiosity, why are you mixing mp3 audio with mpeg2 video in 
a mpeg-ps
container anyway?




More information about the MPlayer-users mailing list