[FFmpeg-user] A/V sync problems with h264/aac video fragment

Konrad Karl kk_konrad at gmx.at
Fri Apr 13 13:42:18 CEST 2012


I am experiencing A/V sync issue with one of my movies rendered
with kdenlive (1080p50 H264 25Mbit/s / AAC 384 kbit/s mp4)

The same movie rendered to mp4v/mp3 (mp4 container) does not show any A/V sync problems.

a sample is available at: (~ 140 MB)

Out of the 6 movies (durations: ~6min..~20min) the first 5 are playing fine
on the WD TV Live and mplayer but the last one begins to stutter at about 00:03:25.
(white elephant scene)

The WD TV Live turns off the sound and when pressing PAUSE on the
remote control the video continues for several seconds before it
actually stops. When continuing A/V is ok for some seconds before the
same happens again. 

Mplayer using vdpau and without the -async option shows video suddenly 
starting to go ahead to audio before it turns off sound and complains:

    Too many video packets in the buffer (102 in 33851544) 

After 30 seconds or so all is in sync again until the end of the movie.

The WD TV Live only recovers if PAUSE button is operated at the and of
the problematic area, waiting until video really stops and then

Any ideas where to start looking? 

All the movies with the exception of the problematic area play fine in
mplayer and the A/V offset goes to almost zero after a few seconds, then 
most of the time only the millisecond digit jitters, rarely the 0.01 sec digit.

Sorry for the long post but H264 looks definitely better than mp4 ASP.



things tried:

* remuxing to mpegts and back to mp4 does not help.

* playing video only or audio only seems OK

* rendering from this 1080p50 to PAL 576i50 DVD format seems OK using:
    ffmpeg -i t6.mp4 -target pal-dvd -b:v 8000k -vf 'tinterlace=4' -flags \
       +ilme+ildct out.mpg
    suggestions for improvement welcome - e.g a vertical only smoothing
    filter might reduce some interlace flickering as the source has too
    high resolution.

* rendering only the interesting part in kdenlive is almost OK
  (mplayer shows more a/v jitter than in other regions but keeps
   below 10 msec)

* rendering the movie using a much lower bitrate (12Mb/s) makes it 
  better but not OK.

kdenlive, mlt, ffmpeg, mplayer all self compiled about Mar 25, 2012.

More information about the ffmpeg-user mailing list