[mythtv-users] Stuttering in DVD menus
Richard
peper03 at yahoo.com
Sun Nov 11 01:01:35 UTC 2012
On 10/11/12 21:55, Mike Perkins wrote:
> On 10/11/12 19:56, Richard wrote:
>> On 10/11/12 14:52, Richard wrote:
>>>
>>> I still don't understand why this should only affect playback of DVD
>>> menus. What's different about a menu? The traces seem to indicate that
>>> video decoding is ahead of audio but is there a some way to determine
>>> whether it's a video or an audio problem?
>>
>> Ok, I tried comparing the log messages between ffmpeg and VDPAU
>> decoding. The
>> only difference that appears significant is this when VDPAU is selected:
>>
>> Player(0): Forcing decode extra audio option on (Video method requires
>> it).
>>
>> I searched through the source code and found this log entry eventually
>> causes
>> the 'lowbuffers' variable in avformatdecoder.cpp to be set to true.
>> Looking at
>> where 'lowbuffers' is used, I found this:
>>
>> -------------------------------
>> else if (lowbuffers && ((decodetype & kDecodeAV) == kDecodeAV) &&
>> storedPackets.count() < max_video_queue_size &&
>> lastapts < lastvpts + 100 &&
>> !ringBuffer->IsInDiscMenuOrStillFrame())
>> {
>> storevideoframes = true;
>> }
>> -------------------------------
>>
> That's the sort of compound conditional which I would automatically
> group with parenthesis. Doing it like that is asking for trouble.
Yes, although that isn't what's causing the issue. I added some more
logging around this code (including additional parentheses) and all of
the conditions are true whilst in the menu. Commenting out the
'IsInDiscMenuOrStillFrame' condition improves things, but it still isn't
right.
If I set the deinterlace mode to None, the problem seems to go away.
Re-enabling one of the deinterlace modes usually seems to introduce the
problem again, but often not immediately. That feels like some sort of
load problem, but I'm not sure where the load is coming from because the
rest of the DVD will play fine at Advanced x2 but just selecting 'One
Field' deinterlacing is enough to cause problems in the menu.
Why does VDPAU decoding require additional buffering anyway? Can I turn
on any more logging? I tried 'playback,timestamp' but that produces so
much that I've no idea what to look for (or even whether what I'm after
is even in there).
Could this have anything to do with the interleaving of video and audio
frames? It seems that only video frames are buffered and as soon as a
non-video frame appears, a video frame is processed from the buffer. If
the ratio of video to non-video frames were too low, could that not
potentially cause issues?
Would this discussion be better on the -dev list?
Richard.
More information about the mythtv-users
mailing list