[mythtv] [PATCH] A/V sync for streaming transcoder (retry)
ijr at po.cwru.edu
Wed Aug 20 11:40:13 EDT 2003
On Wednesday 20 August 2003 10:21 am, Geoffrey Hausheer wrote:
> Well, I guess I'm having mail trouble again. I sent this 24hrs ago, and
> it never hit the list, so here it is again...
> Here is a patch which implements audio-video sync while using the
> streaming output of the transcoder. I have tested it a bit, and it seems
> to do something, but I haven't found any shows which exhibit significant
> enough A/V seperation to notice if it works.
> There is no elegant way of doing A/V sync when streaming output (unlike
> watching video, you can't modify the rate that you display frames). The
> only solution is to either add/remove audio, or add/remove video frames.
> I chose the latter approach, since I find stuttering audio to be much
> more noticable than slightly choppy video. The code tries to gradually
> catch up over several frames so as not to be as noticable. In general, I
> am seeing that audio is more likely to lag the video than lead it, which
> means that we will drop video frames (somewhat less obtrusive than adding
> duplicates). All I can say is, try it and see if it works for you.
> If you see lots of messages about adjusting sync, something is probably
> very wrong. I get perhaps 10 or so messages on a half-hour program.
> The code will try to keep the audio synced to within 0.1sec of the video,
> which is about what myth tries to do as well.
It tries (and usually succeeds) to keep it synced down to the video frame
rate, not 0.1 sec. Do you want this applied to CVS? Wasn't sure if it's
just something you're testing or not..
More information about the mythtv-dev