Kodi Community Forum

Full Version: Channel switching duration
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I have the following problem:
When changing a channel in WMC it takes like 2 seconds. However, when changing the channel in XBMC, it takes like 6 seconds! Is that a known problem / normal? Any way to speed this up?

Technical stuff:
I am on Windows 8.1 x64, WMC + ServerWMC are installed on the same machine.
I am using the latest software: Install_ServerWMC-1118.zip and pvr.wmc-windows-0.1.93.zip on XBMC 12.3 (Frodo).
Hardware: Intel Core i3-4330, 2x 3.50GHz; 4 GB RAM; Crucial M4 SSD


Thanks for any hint on this :-)
Yes it is a known situation, but there isnt alot that we can do about it (what you have now is already tweaked from an even longer delay that occured initially!). If you have a look at your ServerWMC log you can see the time taken on the backend. The backend needs to perform the following tasks (with some average times from my setup listed).

start the channel recording and wait for the WTV file to initialise (2.04s)
analyze the WTV file to identify audio/video streams (1s)
start the remux to TS process (because XBMC cant play a growing WTV file natively) (0.2s)

So that's a total of 3.24s on the backend. We have already optimised our backend to the point where we can't squeeze much more out of it... If you look for the line in the log "Finished reeeequewst OpenLiveStream in X.yy s" that will show you how quick the backend is. It is dependent on the tuners you are using and the storage you have, in your particular case you dont have any problems there, so your backend times are likely as good as they are going to get for now. We can't get any/many more gains on the backend unless we could do away with the requirement to remux to TS in the first place (which doesnt seem possible currently, since XBMC/ffmpeg arent able to play a WTV file that is being recorded to/growing).

A few seconds is probably acceptable to most, however unfortunately then XBMC itself also has to analyze the TS file streams and then finally play it, which takes another handful of seconds (too long really, because XBMC waits a minimum length of time before proceeding, even if it found the streams sooner). In the gotham version of XBMC some improvements have been made to this although one of the major changes that was proposed to speed things up quite significantly didnt make it into Gotham I dont believe, due to causing some other issues for some users. It seems to work great for alot of users too though... If you search on XBMC PVR developer "margro" he has published his own builds containing this fast channel switching change so you could give one of those a try. It reduces the XBMC side by quite a bit and people have reported being generally happy. Things on our addon will never be as fast as WMC native (and nor can we access the COPY ONCE DRM content) so we will always have these limitations. Still, being able to have liveTV in XBMC at all can be useful for alot of people in their situations, and in alot of countries the DRM isnt as heavily used as it is in the states... it just depends on your individual requirements and usage, whether this addon (or infact any of the XBMC LiveTV addons) are suitable for you.

Let us know what your backend times are, and give the margro build a go as well!
Thanks for your explanation, also interesting to hear how the video is "received" ;-)
My backend times are around yours. Also with the special builds the total time is still quite long. Probably I'll go with another Plugin (that uses direct streaming - I assume others without WMC do?) or stick with WMC. I really like your plugin - it simply works, afst to set up and including EPG stuff etc. But personally I find the switching times too long ):
Yeah it depends how often you switch channels I guess. How many tuners do you have and do you also typically have recordings going or are you mainly a live/timeshift viewer? We would like to implement some features such as using multiple tuners in the bakground to keep channels you changed away from still running, so if you change back it is much faster etc. But obviously that depends on how many unique channels you are watching plus how many tuners you have and whether any recordings are also happening! Another suggestion was to pre-tune channels either side of the current channel, good for "zappers" who shift up and down, although again it really depends on how frequently etc.

Addons that do streaming themselves might be faster although xbmc/ffmpeg still has to analyse those streams as well, the margro build helps there too. Like you say though, the backends are seemingly more difficult to get up and going as opposed to WMC and ServerWMC which are quite straight forward. If you do try other ones out let us know your thoughts