add-ons / service.iptv.manager

Integrate TV and radio channels with EPG data from other add-ons in Kodi PVR.
https://github.com/add-ons/service.iptv.manager/wiki
GNU General Public License v3.0
98 stars 28 forks source link

Starting a live stream takes 5 seconds or more #28

Closed dagwieers closed 3 years ago

dagwieers commented 4 years ago

Now that we have a bunch of live streams listed in Kodi using pvr.iptvsimple, the user experience is not that great when channel hopping. It takes 5 seconds or more switching from one channel to the next, which is poor TV behaviour.

(The same is true for any stream, whether it is Netflix or another VOD content provider)

Kodi takes a lot longer to start playback, whereas other devices and online players start playback immediately.

We should be able to do better.

michaelarnauts commented 4 years ago

Streams for VRT Nu are quite fast, but I also see that VTM Go streams can take up to a few seconds to start. There might be improvements we can do there.

dagwieers commented 4 years ago

@davilla I remember you mentioned something about this, e.g. that we should start playback immediately rather than wait for buffers to be filled, but I cannot find the reference to those comments. If I remember correctly, can you maybe elaborate here?

Update: It was this comment https://github.com/xbmc/xbmc/pull/17646#issuecomment-612396865, but rereading this it is unclear to me whether this is already implemented or not.

mediaminister commented 4 years ago

If you input a number, you also have to input enter to zap immediately.

dagwieers commented 4 years ago

@mediaminister I know.

mediaminister commented 4 years ago

This should speed up zapping for VRT NU: https://github.com/add-ons/plugin.video.vrt.nu/pull/772 Please test.

dagwieers commented 4 years ago

I hadn't clarified that disabling DRM makes a huge difference (on RPI at least). So this is related to ISA or ISH, or both. But even disabling ISH doesn't make a noticable difference. So most of the slowness is due to ISA/Widevine.

Without DRM audio starts earlier than video, which gives the impression to be faster too. But even switching between Eén and Canvas without DRM is about 2 seconds for audio and 3.5 seconds for video.

With DRM video starts before audio (after 5 seconds) andt it takes 6.5 seconds before things are working fine.

Starting live TV via VRT NU add-on is slower than via IPTV Manager. (I guess the caching will help there).

(These timings were measured with a chronometer, so rough numbers...)

During testing I also noticed that after channel hopping once, I can no longer hop to another channel.

mediaminister commented 4 years ago

Is this a Raspberry Pi issue or does this happen on other devices too? Which Raspberry Pi version? Does this happen running Chromium browser with Widevine and browsing to VRT NU website on Raspberry Pi?

Meanwhile I added caching for the livestream jsons, which should be ready to merge: https://github.com/add-ons/plugin.video.vrt.nu/pull/772

Does caching the livestream json allows faster zapping on Raspberry Pi?

dagwieers commented 4 years ago

FYI Other projects are also looking at channel switching time: https://github.com/xbmc/inputstream.ffmpegdirect/issues/57

michaelarnauts commented 3 years ago

I would rather close this issue. Any optimisations of speed have to be with caching of tokens used for a live stream at the Add-on side. IPTV Manager isn't in the code path when switching channels or using the Guide.

dagwieers commented 3 years ago

Correct, although: