[MEncoder-users] some minutes delay between audio and video
Malte Schünemann
malte.schuenemann at web.de
Thu Jan 5 14:39:49 CET 2012
On 01/04/2012 03:45 AM, Bill Crockett wrote:
>
>
> On 31/12/2011 9:04 AM, Malte Schünemann wrote:
>> I am frequently converting videos coming via satellite as transport
>> stream. I recently experienced a strange delay between the audio and
>> the video part that is in the range of minutes.
>>
>> The problem happens only if I attempt to cut out advertisings - so
>> far I only observed the problem at the beginning of the file (cutting
>> off the first 5 minutes). I tried to overcome the problem with
>> -audio-delay, but had no success.
>>
>> My options are usually the following.
>>
>> -ofps 25 -hr-edl-seek -demuxer lavf -oac lavc -ovc lavc -of mpeg
>> -mpegopts format=dvd:tsaf -vf scale=720:576,harddup
>> -srate 48000 -af volnorm=2:0.15:lavcresample=48000 -lavcopts
>> vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=9800:keyint=25:vstrict=0:acodec=ac3:abitrate=192
>> -ofps 25 -edl file.edl -o video.mpg video.ts
>>
>> Thanks
>> Malte
>> _______________________________________________
>>
>
> I changed a few parameters to suit my test video "videoTS.mpg" which
> is an MPEG-TS
>
> mencoder -fps 25 -oac lavc -ovc lavc -of lavf -lavfopts format=mpg -vf
> crop=512:560:102:8,harddup -lavcopts
> vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=8000:vbitrate=4854:keyint=25:vstrict=0:acodec=
> /
> mp2:abitrate=192:autoaspect -delay 0.125 -ofps 25 -o video.mpg
> videoTS.mpg
>
> I did not use Edit Decision List options because I'm only trying to
> get the A/V in sync. I found using -demuxer lavf printed out a lot
> of errors. Also, -of mpeg caused many errors (I don't know why), so I
> changed it to -of lavf. -vf crop is for my video for testing. I
> dropped the -srate and -af as I did not need them. vbitrate and
> maxrate are for my taste. acodec=ac3 caused a problem, so changed to
> mp2.
>
> -audio-delay only works with -of avi. If you are using a different
> muxer, then you must use -delay instead. Delay relative to video:
> -125ms was retrieved via MediInfo from the videoTS.mpg file. I could
> not find this info via MPlayer or FFprobe. After the encode, the A/V
> in video.mpg was in sync. Without -delay, it was up to 300 ms out.
>
Many thanks for suggestions. However, my scenario appears to be
different. Without EDL I do not have this problem ... and if I use a
EDL, the delay in in the range of minutes and cannot be adjusted via
option -delay. I tried your cmd line, and the situation remained unchanged.
Malte
More information about the MEncoder-users
mailing list