[mythtv] [PATCH] A/V sync for streaming transcoder (retry)

Geoffrey Hausheer ou401cru02 at sneakemail.com
Wed Aug 20 10:21:57 EDT 2003


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.

.Geoff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: transcode13.patch
Type: application/unknown
Size: 5817 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20030820/c4505548/transcode13.bin


More information about the mythtv-dev mailing list