[mythtv-users] Why does going to live TV take so long?

Marco Nelissen marcone at xs4all.nl
Fri Mar 10 18:38:24 UTC 2006


>On 10/03/06, Michael T. Dean <mtdean at thirdcontact.com> wrote:
>> >> Let's see.  At a minimum, Myth requires 2 or 3 seconds of buffer in
>> >> order to provide the PVR features while watching LiveTV,
>> >
>> > That seems rather excessive. There's really no reason to buffer that
>> > much data before starting to play it.
>>
>> Says the guy who didn't write/debug the LiveTV code...  ;)
>>
>> Mike
>
>Mike, this is something that I've never understood.  I'm not being
>facetious, but why do we need to buffer before starting to play?

The main reason for buffering in any playback scenario is to avoid
running out of data. By its nature, audio and video data requires
a smooth output stream or you'll notice dropouts and pauses. This
in turn means you need a fairly consistent input stream. If the input
isn't consistent enough, you might run out of data and you'd have
to halt playback while you wait for more input data. This can happen
when you're streaming over the Internet for example, but also when
reading from a very busy disk.
Even when your input stream is guaranteed to be consistent and fast
enough, you might still want to buffer for simplicity's sake: by
buffering you can guarantee that the decoder never has to deal with
partial data, which greatly simplifies its design.
You might even want to buffer *de*coded data to allow you to overcome
spikes in CPU usage.
The *size* of the buffer is something that should be decided based
on these and other factors. I can't think of anything that would
require a 3 second buffer for watching live TV with a single-machine
myth setup though. A few frames, sure. But 90 frames seems a bit over
the top.

Marco



More information about the mythtv-users mailing list