[mythtv] AVSync Problem on entering recorded playback

Mark Buechler mark.buechler at gmail.com
Tue Mar 28 18:23:11 UTC 2006


Question, are you seeing this ONLY with recordings? A few people have
reported seeing this with LiveTV until they pause/unpause. I have the same
issue but mine seems to loose sync at times with 720p content and eventually
regains it. I'm wondering if all of these could be symptoms of the same
problem.

- Mark.

On 3/28/06, Stephen Williams <stephen.gw at gmail.com> wrote:
>
> I'm seeing stuttering playback on entry to recorded program playback
> (DVB source), a pause/unpause clears this up.
>
> Having performed some debugging I have determined that the AVSync code
> is never managing to get a sync. The following excerpt is from the
> frontend log with "-v playback":
>
> 2006-03-28 12:49:33.919 Using OpenGLVideoSync
> 2006-03-28 12:49:33.929 Using video as timebase
> 2006-03-28 12:49:33.929 Video timing method: SGI OpenGL
> 2006-03-28 12:49:33.929 Refresh rate: 40000, frame interval: 40000
> 2006-03-28 12:49:33.948 NVP: Waiting for prebuffer.. 0
> AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
> 2006-03-28 12:49:34.046 OSDImgCache: Can't find
> '/usr/local/share/mythtv/themes/Titivillus-OSD/edit'
> 2006-03-28 12:49:34.128 NVP: Waiting for prebuffer.. 1
> AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
> 2006-03-28 12:49:34.129 OSDImgCache: Can't find
> '/usr/local/share/mythtv/themes/Titivillus-OSD/edit'
> 2006-03-28 12:49:34.176 NVP: ClearAfterSeek()
> 2006-03-28 12:49:34.177 VideoOutputXv: ClearAfterSeek()
> 2006-03-28 12:49:34.177 VideoBuffers::DiscardFrames(0):
> AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
> 2006-03-28 12:49:34.177 VideoBuffers::DiscardFrames(0):
> AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -- done
> 2006-03-28 12:49:34.177 detectInterlace(Detect Scan, Interlaced Scan,
> 25, 576) ->Interlaced Scan
> 2006-03-28 12:49:34.177 Interlaced: Interlaced Scan  video_height:
> 576  fps: 25
> 2006-03-28 12:49:34.308 NVP: Waiting for prebuffer.. 2
> UUUUuUULAAAAAAAAAAAAAAAAAAAAAAA
> 2006-03-28 12:49:34.650 NVP: Audio is 3.2878 frames ahead of video,
>                         doubling video frame interval.
> 2006-03-28 12:49:34.690 NVP: Audio is 3.54085 frames ahead of video,
>                         doubling video frame interval.
> 2006-03-28 12:49:34.750 NVP: Audio is 3.73062 frames ahead of video,
>                         doubling video frame interval.
> 2006-03-28 12:49:34.810 NVP: Audio is 3.7167 frames ahead of video,
>                         doubling video frame interval.
> 2006-03-28 12:49:34.870 NVP: Audio is 3.58127 frames ahead of video,
>                         doubling video frame interval.
> 2006-03-28 12:49:34.930 NVP: Audio is 3.3422 frames ahead of video,
>                         doubling video frame interval.
> 2006-03-28 12:49:34.990 NVP: Audio is 3.0379 frames ahead of video,
>                         doubling video frame interval.
> 2006-03-28 12:49:35.730 NVP: Audio is 3.0963 frames ahead of video,
>                         doubling video frame interval.
> 2006-03-28 12:49:35.790 NVP: Audio is 3.20972 frames ahead of video,
>                         doubling video frame interval.
> 2006-03-28 12:49:35.850 NVP: Audio is 3.17602 frames ahead of video,
>                         doubling video frame interval.
> 2006-03-28 12:49:35.910 NVP: Audio is 3.02575 frames ahead of video,
>                         doubling video frame interval.
> 2006-03-28 12:49:36.590 NVP: Audio is 3.0866 frames ahead of video,
>                         doubling video frame interval.
> 2006-03-28 12:49:36.630 NVP: Audio is 3.17745 frames ahead of video,
>                         doubling video frame interval.
> 2006-03-28 12:49:36.690 NVP: Audio is 3.25183 frames ahead of video,
>                         doubling video frame interval.
>
> We continually get the above "doubling video frame interval." messages
> until playback has been paused / unpaused. It appears that the system
> is never able to sync in the case where audio is ahead of video.
>
> Having added more debugging to NuppelVideoPlayer it appears that
> something it deliberately 'correcting' for the doubled video frame
> interval used to regain sync. This has been determined by timestamping
> calls to NuppelVideoPlayer::DisplayNormalFrame, the results are as
> follows:
>
> 1. During normal (correctly AVSynced playback)
> NuppelVideoPlayer::DisplayNormalFrame is called at a very regular rate
> every 40ms (25fps).
> 2. When attempting to regain AVSync by doubling the video frame
> interval this increases to 60ms (this is expected and temporarily
> brings the AVSync to within 3 frames).
> 3. However, as soon as we stop doubling the video frame interval this
> timing is reduced to 20ms, it appears that something is trying to
> compensate for the 60ms frames.
>
> I'm looking for some further guidance on how to debug this issue. Is
> anybody able to tell me what is controlling the rate at which
> NuppelVideoPlayer::DisplayNormalFrame is called during normal
> playback, i.e. what mechanism is causing those 20ms frames that are so
> effectively counteracting the attempt to gain AVSync?
>
> Some further system information is supplied below in case it is required:
> - Using OpenGL Vsync to a PAL TV (using an interlaced modeline).
> - I've tried with and without OpenGL Vsync, there is no difference.
> - Running 0.19-Fixes branch.
>
> If I can provide any more data then please let me know.
>
> Thanks in advance,
> Stephen
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-dev/attachments/20060328/14822fbe/attachment.htm 


More information about the mythtv-dev mailing list