[mythtv] Re:jerky live tv with latest cvs(5/28)

Vinton Coffman vintonc at redzone.com
Fri May 30 17:44:24 EDT 2003

I too experience the live tv rebuffering issues.  I'm using cvs as of 
7:00 p.m. 5/29.  I've been having this issue since I installed mythtv 
several weeks ago.  I originally posted the message below over the 
holiday weekend on the user list but didn't get any responses.  So I 
was using cvs versions before 5/27.

Nobody mentioned what capture hardware they're using.  Can you post 
that info?  I'm wondering if this is only being exhibited on pvr-250 
based systems.

I haven't completely ruled out hardware issues but Kingston just 
swapped the memory I was using and it doesn't seem to change anything.  
It rebuffers at random intervals, sometimes recovers, sometimes locks 
the frontend, and sometimes locks the entire system.

When I looked at RingBuffer.cpp I noticed the section of code below.  I 
am not a developer on the project or all that intimate with this code.  
So here goes nothing.  Does the fact I'm using the pvr-250 at the 
default bitrate 8/16Mb/s cause an issue with this piece of code?  Is 
the ringbuffer not reading far enough ahead?

void RingBuffer::CalcReadAheadThresh(int estbitrate)
     wantseek = true;
     wantseek = false;

     fill_threshold = 0;
     fill_min = 0;

     if (remotefile)
         fill_threshold += 256000;

     if (estbitrate > 6000)
         fill_threshold += 256000;

     if (estbitrate > 10000)
         fill_threshold += 256000;

     if (estbitrate > 14000)
         fill_threshold += 256000;

     if (fill_threshold == 256000)
         fill_min = 128000;
     if (fill_threshold > 256000)
         fill_min = 256000;

     readsallowed = false;

     if (fill_threshold == 0)
         fill_threshold = -1;
     if (fill_min == 0)
         fill_min = -1;


 >>>>>> Original message from May 25  follows <<<<<<<<<

  This may be a hardware issue that I'm trying to chase down. I have a
Athlon 2500 and PVR-250 running RH9 with kernel 2.4.21rc2 that seems to
lock up completely with the FSB set to 166 MHz and doesn't crash with
FSB at 133 MHz. Memory bus is 333 MHz with PC2700 dimms speed set by
SPD in bios in both cases. With the FSB at 133 things don't lock up
but my audio starts stuttering and video freezes. It usually recovers
after a few seconds or up to a minute. This happens at random
intervals and duration.

When I check the output of mythfrontend I get the messages shown below.
I have an 120 GB ata100 seagate drive and hdparm reports dma is on.
Top reports mythfrontend is only using 17% of the CPU. The ringbuffer
was set to 6GB but I can't seem to find this setting since the setup
menus changed. Did I just overlook it or is not accessible from the
new menus yet?

The pvr-250 is still using the default settings for audio and video.

I included the piece of code that generates the rebuffering message. I
couldn't figure out what the variable ateof represented. Can someone
explain what this code does? It might help me figure out what's going.


rebuffering (139265 256000)
rebuffering (144385 256000)
rebuffering (149505 256000)

 >>>>>>>>> The message below doesn't always show up
Changing from None to WatchingLiveTV
Over/underscanning. V: 0.000000, H: 0.000000, XOff: 0, YOff: 0
Using XV port 105

Delaying to next trigger: 316423
Delaying to next trigger: 267058
Delaying to next trigger: 209758
rebuffering (133121 256000)
rebuffering (133121 256000)

 >>>> output from hdparm
[root at localhost mythtv]# /sbin/hdparm -d /dev/hda

using_dma = 1 (on)

 >>>>> from RingBuffer.cpp
if (ateof)
readsallowed = true;
totfree = 0;

if (!readsallowed && used >= fill_threshold)
readsallowed = true;

if (readsallowed && used < fill_min && !ateof)
readsallowed = false;
cerr << "rebuffering (" << used << " " << fill_min << ")\n";

More information about the mythtv-dev mailing list