[mythtv-users] 720p HD content from WPVI in Philly periodic a/v sync issues
tralph11 at yahoo.com
Fri Dec 11 21:44:41 UTC 2009
--- On Fri, 12/11/09, Andrew Gallatin <gallatin at cs.duke.edu> wrote:
> > I checked out a fresh 22-fixes and applied the patch.
> > Unfortunately, it actually seemed to make things
> > I've attached -v playback from a problematic file.
> > This is using an Ion 330 using VDPAU, displaying to
> > a 1080p panel.
> I have a very high-level understanding of what's going on
> here, so I
> apologize if my assumptions are incorrect, but here is my
> theory: The
> broadcaster is using the mpeg2 video repeat flags to save
> So he's broadcasting, on average, about 54fps and marking
> about 10% of
> them repeatable, which brings the frame rate up to
> 60fps. But
> mythtv's mpeg2 decoder is not counting these repeats, and
> the a/v sync
> code thinks the frame rate is all messed up.
> From what I can tell,
> your patch adds a delay based on the repeat flags.
> Rather than adding delays, wouldn't it be simpler
> to use the actual decoded
> frame count (or rate, or whatever the code uses)?
The total video frame count is irrelevant to syncing the audio with video. The av-sync code has to compare the current audio timecode with the current video timecode of the frame being displayed. It then needs to make adjustments as necessary. If they are close enough then the added video frame delay is simply one frame interval (1/fps). If they are far enough apart then other measures are taken depending on if the audio is ahead or behind the video. This involves reducing or adding delay or for extreme cases skipping (dropping) frames or extending the frame interval.
The patch I provided simply adds video delay when a frame is to be repeated. It's odd that it made your video worse. Something else is then obviously wrong.
> Also, is the video portion of MythTV honoring the repeat flag?
That's what my patch was intended to do. The NVP player code controls the delays between displayed frames and my patch simply added additional delay when a video frame was flagged for repeating.
> I'm using VDPAU?
I use VDPAU also and it should not matter.
> Again, sorry if I'm being dumb, and thanks for the
A couple of questions for you:
1. What vsync method are you using: BusyWait, OpenGL, DRM?
2. Are you by any chance using "video as timebase"?
I look forward to your samples.
More information about the mythtv-users