[mythtv-users] LiveTV zapping speed

Raymond Wagner raymond at wagnerrp.com
Sat Sep 3 19:31:07 UTC 2011


On 9/3/2011 14:03, Josu Lazkano wrote:
> I have 2 DVB-T and 1 DVB-S2 card and it takes 4-7 seconds. I have 2
> other 2 dvb receptors, and both take much less time to change channels
> (less than a second).

Half a second to a second is absolute best case scenario for a tuner.  
There is a lot more going on here than most people realize.  First, you 
have to physically retune the tuner.  On some devices, this may take a 
fraction of a second.  On others, this may be a second or longer.  Look 
at how many people on the MythTV and LinuxTV mailing lists find their 
problems are solved by increasing various timeouts.  If you are changing 
to a different channel on the same multiplex, some devices may skip this 
step, artificially improving performance in those situations.

Once you tune the multiplex, you have to wait for a channel table to 
decide specifically what stream to pull out.  If you store enough 
information, you can skip this step in what MythTV calls 'quick tune'.  
It shaves off a bit of time, but it is also less robust.  As before, if 
changing to a channel on the same multiplex, some devices may keep the 
last broadcast table, and don't need to wait for a new one.

Once you have picked out your stream, you still have to contend with the 
issue that it is compressed digital video, and most of the frames are 
incapable of standing on their own.  You have to wait for an I-frame 
before you can begin playback.  On broadcast MPEG2 in North America, 
this generally comes once every half second.  With broadcast H264 in 
Europe and Australia, this has been known to happen several seconds 
apart.  Some devices may be set up to store the last few seconds of the 
entire broadcast stream, so if changing to another channel on the same 
multiplex, it will already have this information and doesn't have to 
wait for the next good frame to come by.  MythTV does not operate in 
this manner.

Depending on your hardware and provider, several seconds may have 
passed, and you're just not getting to the point that MythTV has any 
effect over.  MythTV is set up as a DVR, meaning it records everything, 
and has a division between playback and recording.  Whether the frontend 
is accessing the content from the filesystem directly, or streaming it 
from the backend, the recorded video is read back off the disk 
independently of writing to it.  In order to ensure the frontend does 
not get starved of data, it enforces a couple second lag.

There is some that can be done to improve channel chaning (zapping) 
speed, but there is just as much, if not more, that is completely 
outside of MythTV's control.


More information about the mythtv-users mailing list