[mythtv] DVD playback issues, patch

Johnny Stenback mythtv-dev at jstenback.com
Sun Nov 15 19:54:06 UTC 2009


Hello Davin,

Davin McCall wrote:
> That's odd, it sounds almost like the exact problem that the patch is
> meant to (and does, for me) fix. Basically, I was seeing video run at
> about 2x at the start (occasionally it would flatten out to normal speed
> after a few seconds, but the audio would then always lag the video).
>
> Essentially the patch *should* make what you're seeing impossible. That
> is, if video gets ahead of audio then it gets slowed down, pretty much
> straight away, until they are in sync. So, I have no idea what's going
> wrong, it may be a decoder issue (wrong timestamps in the audio or
> video) or a media issue. What version of Myth did you apply the patch to
> (trunk, hopefully?)

0.22-fixes, but read on...

> Do you see the problem behaviour that you described on all DVDs?
> And, if I sent you an updated version (with some debugs thrown in) would
> you be able to get the frontend log to me?

So I was able to test your patch with the latest suggested change you 
mentioned on my real installation (where I actually have audio to 
compare against :) and there it seems like your patch fixes the problem! 
This system uses VDPAU for playback, also 0.22-fixes from last week 
sometime.

On my test system however, which is just a linux box that I vnc into, 
and there's no audio support on that box at all, what I see with your 
patch is that not only does the problem not go away, but with your patch 
the video seems to constantly play too fast. Without your patch, I see 
the fast playback as well when I start, but changing the playback speed 
(fastforward for a second or two) and then back to normal (i.e. hitting 
play again), resets the video speed to what *looks* normal, and it seems 
to stay normal from then on. Since there's no audio to compare to it's 
hard to say whether it's right or not, but it looks like a 2x speed when 
starting playback of a DVD, and normal (1x) after fastforwarding. So 
with your patch the re-sync after fastforwarding does not seem to happen 
at all.

So essentially I think there's still a problem, but your patch does make 
DVD playback work much better in a real environment where there's actual 
audio to sync with and so on.

And yeah, I can generate logs and what not if you need them, but I think 
you could probably reproduce this yourself in a vnc session w/o any 
audio support as well if you're interested in digging in there as well. 
Let me know what logs you'd be interested in, if any. And there's a log 
from my test system in ticket 7067 w/o your patch if that's of any use.

Thanks again for digging in here!
Johnny

> Davin
>
>
> On 15/11/09 16:52, Johnny Stenback wrote:
>> Davin McCall wrote:
>>> Hi,
>>>
>>> What do you mean by "off by 2x" ... 2x what? Do you mean video is
>>> playing twice as fast as audio (or the other way around)?
>>> Or, does video lag audio by a consistent amount (2 frames, 2 seconds?)
>>> or the other way around?
>>
>> Sorry for not clarifying that, what I see is that the video playback
>> speed is ~2x of the audio speed. Audio plays at normal speed as far as
>> I can tell, but video is ~2x too fast.
>>
>>> Thanks,
>>>
>>> Davin
>>>
>>>
>>> On 15/11/09 04:36, Johnny Stenback wrote:
>>>> Hello David,
>>>>
>>>> Thanks for digging in here. I haven't been able to test your patch on
>>>> my primary system where I use VDPAU for playback yet, but I did test
>>>> using software decoding and software rendering and it does not seem
>>>> like your patch fixes the problem I'm seeing, and in a way it seems to
>>>> make it worse :(
>>>>
>>>> Without your patch, if I fast forward for just a second after starting
>>>> DVD playback, the audio/video speeds sync up and remains in sync from
>>>> then on, but with your patch I can't seem to get audio and video to
>>>> ever be in sync, it's always off by what looks like ~2x.
>>>>
>>>> I wish I could help more here, but I don't know this code at all and
>>>> I'm unable to spend any serious time on this in the foreseeable future.
>>>>
>>>> Davin McCall wrote:
>>>>> Here's an updated patch. The main change is that it avoids
>>>>> advancing the
>>>>> vsync trigger if a frame is dropped. Otherwise, WaitForFrame will
>>>>> effectively wait for the frame anyway, so dropping it has no effect.
>>>>> This caused problems on some media files I have.
>>>>>
>>>>> Davin.
>>>>>
>>>>>
>>>>> On 13/11/09 23:35, Davin McCall wrote:
>>>>>> Hi all,
>>>>>>
>>>>>> Regarding the DVD playback issues I mentioned earlier. This is
>>>>>> (possibly) related to the following tickets:
>>>>>> http://svn.mythtv.org/trac/ticket/7067
>>>>>> http://svn.mythtv.org/trac/ticket/7349
>>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> mythtv-dev mailing list
>>>>> mythtv-dev at mythtv.org
>>>>> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>>>> _______________________________________________
>>>> mythtv-dev mailing list
>>>> mythtv-dev at mythtv.org
>>>> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>>>>
>>>
>>> _______________________________________________
>>> mythtv-dev mailing list
>>> mythtv-dev at mythtv.org
>>> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>>>
>> _______________________________________________
>> mythtv-dev mailing list
>> mythtv-dev at mythtv.org
>> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>>
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>


More information about the mythtv-dev mailing list