[mythtv-users] 30 second skip == stutter

Jesper Sörensen jesper at datapartner.se
Sat Aug 21 19:50:20 EDT 2004


Doug Larrick wrote:

> I think the problem here is that we're not managing to seek to exactly 
> the same spot in the video and audio streams, and so it takes a little 
> while for them to be back in sync.  I have not done any investigation 
> to confirm my suspicion.
>
> I also think there's something odd going on with your setup that I 
> don't see here... you seem to get audio timestamps that are way off 
> after a seek; the patch that pins the adjustment to 200 frames masks 
> this problem, but doesn't actually fix it.  Unfortunately without 
> being able to reproduce it there's not a lot I can do except offer 
> encouragement.


Doug, first I'd like to tell you that I really appreciate your work on this!

Sorry for butting in but I'm also (still) having troubles with the 
A/V-syncing. I don't know how Myth handles A/V timestamps for DVB (does 
it use the PTS?), but sometimes I'm getting completely screwed up 
timestamps (either they're broken from the start or they get mangled 
somewhere in Myth). Without proper (or at least semi proper) timestamps 
the video stream (live TV or recorded) is unwatchable - it's just a 
slide show with some staccato sounds.

To me this seems like a two part problem:
1) Fix the cause of the broken timestamps (jump/seek bugs?, DVB errors...)
2) Handle bad timestamps better - even if we fix #1 I think Myth should 
deal gracefully with broken time stamps (old recordings, bad data from 
the DVB broadcaster and so on...)

I'm currently investigating this and trying to come up with a 
workaround/patch but it's a pretty slow process since I'm not that 
familiar with the Myth code yet. If you (or anyone else) are interested 
I have a 5 minute DVB recording (~170 MB) with bad timestamps (I 
assume). Let me know if you would like to take a look at it.

This is a log excerpt from trying to watch the recording, with some 
timestamp debug printing from AVSync():

2004-08-21 22:03:35 detectInterlace(Detect Scan, Detect Scan, 25, 576) 
->Interlaced Scan
2004-08-21 22:03:35 Interlaced: Interlaced Scan  video_height: 576  fps: 25
2004-08-21 22:03:35 Estimated bitrate = 256000
2004-08-21 22:03:35 detectInterlace(Ignore Scan, Interlaced Scan, 25, 
576) ->Interlaced Scan
2004-08-21 22:03:35 Interlaced: Interlaced Scan  video_height: 576  fps: -1
2004-08-21 22:03:35 Position map found
2004-08-21 22:03:35 Opening OSS audio device '/dev/adsp'.
2004-08-21 22:03:35 Audio fragment size: 4096
2004-08-21 22:03:35 Over/underscan. V: 0, H: 0, XOff: 0, YOff: 0
2004-08-21 22:03:35 Using XV port 67
2004-08-21 22:03:35 Image size. dispxoff 159, dispyoff: 0, dispwoff: 
961, disphoff: 720
2004-08-21 22:03:35 Image size. imgx 0, imgy: 0, imgw: 704, imgh: 576
2004-08-21 22:03:35 Changing from None to WatchingPreRecorded
2004-08-21 22:03:35 Using deinterlace method linearblend
2004-08-21 22:03:35 nVidiaVideoSync: Could not open device /dev/nvidia0, 
No such file or directory
2004-08-21 22:03:35 DRMVideoSync: VBlank ioctl did not work, 
unimplemented in this driver?
2004-08-21 22:03:35 OpenGLVideoSync: GLX Video Sync extension not present.
2004-08-21 22:03:35 Using audio as timebase
2004-08-21 22:03:35 Video timing method: RTC
2004-08-21 22:03:35 Refresh rate: 20000, frame interval: 40000
2004-08-21 22:03:35 waiting for prebuffer...
lastaudiotime = 175, buffer->timecode = 80188658
2004-08-21 22:03:36 A/V diverged by -200 frames, dropping frame to keep 
audio in sync
lastaudiotime = 177, buffer->timecode = 80188698
lastaudiotime = 180, buffer->timecode = 80188738
2004-08-21 22:03:36 A/V diverged by -200 frames, dropping frame to keep 
audio in sync
lastaudiotime = 181, buffer->timecode = 80188778
2004-08-21 22:03:36 A/V diverged by -200 frames, dropping frame to keep 
audio in sync
lastaudiotime = 184, buffer->timecode = 80188818
lastaudiotime = 186, buffer->timecode = 80188858
2004-08-21 22:03:36 A/V diverged by -200 frames, dropping frame to keep 
audio in sync
lastaudiotime = 188, buffer->timecode = 80188898
2004-08-21 22:03:36 A/V diverged by -200 frames, dropping frame to keep 
audio in sync
lastaudiotime = 189, buffer->timecode = 80188938
lastaudiotime = 193, buffer->timecode = 80188978
2004-08-21 22:03:36 A/V diverged by -200 frames, dropping frame to keep 
audio in sync
lastaudiotime = 194, buffer->timecode = 80189018
2004-08-21 22:03:36 prebuffering pause
2004-08-21 22:03:36 waiting for prebuffer...
2004-08-21 22:03:36 A/V diverged by -200 frames, dropping frame to keep 
audio in sync
lastaudiotime = 207, buffer->timecode = 80189058
lastaudiotime = 210, buffer->timecode = 80189098
2004-08-21 22:03:36 A/V diverged by -200 frames, dropping frame to keep 
audio in sync
lastaudiotime = 211, buffer->timecode = 80189138
2004-08-21 22:03:36 A/V diverged by -200 frames, dropping frame to keep 
audio in sync
lastaudiotime = 213, buffer->timecode = 80189178
lastaudiotime = 216, buffer->timecode = 80189218
2004-08-21 22:03:36 A/V diverged by -200 frames, dropping frame to keep 
audio in sync

/JS



More information about the mythtv-users mailing list