[MEncoder-users] some minutes delay between audio and video

Malte Schünemann malte.schuenemann at web.de
Fri Dec 30 23:04:45 CET 2011


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. Indeed, the mencoder output 
shows

1 duplicate frame(s)!
Pos:   4.6s    108f ( 4%) 13.14fps Trem:   3min   0mb  A-V:-0.047 [5221:0]
Pos:   4.7s    109f ( 4%) 13.25fps Trem:   3min   0mb  A-V:-0.051 [5182:0]
Pos:   4.8s    110f ( 4%) 13.36fps Trem:   3min   0mb  A-V:-0.055 [5185:0]
Pos:   4.8s    111f ( 4%) 13.46fps Trem:   3min   0mb  A-V:-0.059 [5184:0]
Pos:   4.8s    112f ( 4%) 13.57fps Trem:   3min   0mb  A-V:-0.063 [5189:0]

and then later

Pos:  65.1s   1482f ( 4%) 65.87fps Trem:   8min   0mb  A-V:-0.063 [7214:0]
Pos:  65.2s   1483f ( 4%) 65.88fps Trem:   8min   0mb  A-V:-0.067 [7216:0]

Too many video packets in the buffer: (93 in 33778112 bytes).
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.
Pos:  65.2s   1484f ( 5%) 64.46fps Trem:   7min 816mb  A-V:-0.063 
[7217:192]
Pos:  65.2s   1485f ( 5%) 64.48fps Trem:   7min 816mb  A-V:-0.059 [7220:192]
...

When playing the resulting video, audio starts immediately - but is 
shifted - approximately by the 65.2 sec from the output above (when the 
audio rate turns 192).

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.

How can I overcome this problem ? Any suggestion welcome :-)

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


More information about the MEncoder-users mailing list