[mythtv-users] Playback problem -- random short pauses
Kenneth Emerson
kenneth.emerson at gmail.com
Fri May 6 13:46:30 UTC 2011
On Tue, May 3, 2011 at 12:46 PM, Kenneth Emerson
<kenneth.emerson at gmail.com>wrote:
>
>
> On Tue, May 3, 2011 at 6:28 AM, Steve Curtis <scurtis at fixation.net> wrote:
>
On 24 March 2011 15:03, Kenneth Emerson <kenneth.emerson at gmail.com> wrote:
>>
> I have been following several of the threads on this list (and the commit
>>> list) that have talked about "stuttering" during playback.
>>
>>
>> I get this too. I notice that it will always stutter in between
>> programmes such as when the news is about to start - almost without fail.
>> This leads me to think that it must be recording related as one programme
>> ends and new one starts.
>>
>
>>
> IIRC, there have been numerous complaints about pauses/stuttering while
> watching recordings when other recordings started/stopped. This is really
> starting to look like disk contention where the recording being watched is
> not buffering enough to get through the (perfect storm?) disruption. I
> haven't studied the code that much, but I believe this is what is called the
> "Ring Buffer"? I have seen several commits regarding the size of it, and I
> was asked (by Taylor Ralph) to apply a patch that affected how the size was
> determined.
>
> Maybe one of the devs can point me to a place where I can try making this
> larger or at least putting some debug in to see if this is the problem.
>
> -- Ken E.
>
Last night I modified the routine RingBuffer.cpp
(method: RingBuffer::CalcReadAheadThresh) to always choose the largest read
block size. Whether this was a proper change or not it did seem to
eliminate the pauses I had been seeing. I watched approximately four hours
of recordings without any pausing of the video or audio. I will leave this
change in for a week to see if it has really solved the symptoms (if not the
problem). At that point I might open a ticket with the patch.
Here is the diff for anyone else brave enough to give it a try:
diff --git a/mythtv/libs/libmythtv/RingBuffer.cpp
b/mythtv/libs/libmythtv/RingBu
index 8b59616..d4613d6 100644
--- a/mythtv/libs/libmythtv/RingBuffer.cpp
+++ b/mythtv/libs/libmythtv/RingBuffer.cpp
@@ -816,7 +816,10 @@ void RingBuffer::CalcReadAheadThresh(void)
rbs = (estbitrate > 5000) ? KB128 : rbs;
rbs = (estbitrate > 9000) ? KB256 : rbs;
rbs = (estbitrate > 18000) ? KB512 : rbs;
- readblocksize = max(rbs,readblocksize);
+ // readblocksize = max(rbs,readblocksize); Ticket #8706:
8706_debug.diff
+ // Try to maximize readahead buffer. By KRE 05/04/2011
+ rbs = KB512;
+ readblocksize = rbs;
// minumum seconds of buffering before allowing read
float secs_min = 0.25;
Regards,
Ken E.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.mythtv.org/pipermail/mythtv-users/attachments/20110506/094addd0/attachment.html
More information about the mythtv-users
mailing list