Kodi Community Forum
Why is VideoPlayer so much slower than DVDPlayer when playing streams? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+---- Forum: VideoPlayer Development (https://forum.kodi.tv/forumdisplay.php?fid=240)
+---- Thread: Why is VideoPlayer so much slower than DVDPlayer when playing streams? (/showthread.php?tid=324371)

Pages: 1 2


Why is VideoPlayer so much slower than DVDPlayer when playing streams? - coremailrx8 - 2017-11-20

@Fernet:

I am using the PSVue addon (from official repository) to watch TV using my PSVue subscription. If you are unfamiliar, as it is only available in the US, this is subscription based internet live TV through Sony Playstation, called PS Vue.
 
I have tested the addon with Jarvis, Krypton and Leia on a beefy Windows pc. Jarvis pulls the channel streams within a couple of seconds (I believe Jarvis uses dvdplayer, right?). Krypton is slow, takes about 3+ seconds to pull the stream, or refresh the channels directory, which is annoying if you are flipping channels. Leia cuts it down by half/one second less on average when compared to Krypton, but nowhere near the speed of Jarvis.

On Krypton and Leia, you can also speed it up another second by enabling inputstream, but comes at the cost of reliability, as inputstreams causes the channel to close and it is unable to recall the stream, unless we restart kodi. I don't know if inputstream is still buggy or if it is some incompatibility with PSVue addon, but it is a no go so far. At any rate, Jarvis still beats Leia with inputstream enabled.  BTW, this is not only me, everyone using the addon can attest to this.

Is there is a technical reason for this? Does the video addon itself not using code optimized for videoplayer which causes this lag? Or is it videoplayer still not developed enough to improve on internet stream performance?

Hope you can help provide some insight. Addons like PSVue showing legal subscription based content takes Kodi to the next level.

Thanks!


RE: Why is VideoPlayer so much slower than DVDPlayer when playing streams? - FernetMenta - 2017-11-20

Are those HLS streams?


RE: Why is VideoPlayer so much slower than DVDPlayer when playing streams? - nickr - 2017-11-20

@eracknaphobia


RE: Why is VideoPlayer so much slower than DVDPlayer when playing streams? - coremailrx8 - 2017-11-20

(2017-11-20, 08:43)FernetMenta Wrote: Are those HLS streams?
 How can i tell what kind of streams and i will let you know?


RE: Why is VideoPlayer so much slower than DVDPlayer when playing streams? - eracknaphobia - 2017-11-20

Yes, they are HLS streams.

I've noticed the issue as well, but chalked it up to my android boxes. So basically non-inpustream = slow stream start-up but reliable, where inputstream = fast stream start but unreliable.


RE: Why is VideoPlayer so much slower than DVDPlayer when playing streams? - coremailrx8 - 2017-11-20

(2017-11-20, 20:55)eracknaphobia Wrote: Yes, they are HLS streams.

I've noticed the issue as well, but chalked it up to my android boxes. So basically non-inpustream = slow stream start-up but reliable, where inputstream = fast stream start but unreliable.
I just want to reiterate that even with inputstream (assuming it becomes reliable), it is nowhere as fast as using the addon with Jarvis. That's why I wanted to know what changes on videoplayer from dvdplayers affect this, or if there was a way to optimize the addon for videoplayer, depending on where the culprit lies.


RE: Why is VideoPlayer so much slower than DVDPlayer when playing streams? - FernetMenta - 2017-11-20

Until Jarvis Kodi had some unmaintained buggy code that did parsing of the m3u playlist and selected a program based on network settings. This code failed in various situation making some hls sources unplayable. I dropped this old code and delegated parsing to ffmpeg.
Maybe ffmpeg's behaviour can be optimized but so far nobody was able to provide a source to me that is playable without any additional tweaks of .i.e. tunneling to another region.


RE: Why is VideoPlayer so much slower than DVDPlayer when playing streams? - eracknaphobia - 2017-11-20

(2017-11-20, 21:29)FernetMenta Wrote: Until Jarvis Kodi had some unmaintained buggy code that did parsing of the m3u playlist and selected a program based on network settings. This code failed in various situation making some hls sources unplayable. I dropped this old code and delegated parsing to ffmpeg.
Maybe ffmpeg's behaviour can be optimized but so far nobody was able to provide a source to me that is playable without any additional tweaks of .i.e. tunneling to another region.

The stream in this post should not be geoblocked, would that be a sufficient test case?

https://github.com/peak3d/inputstream.adaptive/issues/49


RE: Why is VideoPlayer so much slower than DVDPlayer when playing streams? - Atreyu - 2017-11-21

The difference between jarvis and krypton for these kind of streams is indeed very noticable.

Thanks @FernetMenta for the explanation; i was wondering about this, hope some progress can be made...


RE: Why is VideoPlayer so much slower than DVDPlayer when playing streams? - FernetMenta - 2017-11-21

The problem with ffmpeg opening a hls playlist is that it does not only parse the master playlist but all individual playlists in the master playlist. In addition it creates a demuxer for every playlist it has found. That is a lot of overhead that is responsible for the slow startup. I will think about a way of fixing ffmpeg but this won't be finished tomorrow.


RE: Why is VideoPlayer so much slower than DVDPlayer when playing streams? - coremailrx8 - 2017-11-21

(2017-11-21, 18:43)FernetMenta Wrote: The problem with ffmpeg opening a hls playlist is that it does not only parse the master playlist but all individual playlists in the master playlist. In addition it creates a demuxer for every playlist it has found. That is a lot of overhead that is responsible for the slow startup. I will think about a way of fixing ffmpeg but this won't be finished tomorrow.
 The day after tomorrow then? Smile

Thanks for looking into it and improve videoplayer.

If it is of any help, I found the following that seems to be similar to the problem you mentioned:

https://trac.ffmpeg.org/ticket/2886

which leads to:

http://zo2m4bie.blogspot.com/2016/08/force-ffmpeg-to-work-with-hls-adaptive.html


RE: Why is VideoPlayer so much slower than DVDPlayer when playing streams? - FernetMenta - 2017-11-24

I sent a patch to ffmpeg mailing list. Let's see what they say: http://ffmpeg.org/pipermail/ffmpeg-devel/2017-November/220717.html


RE: Why is VideoPlayer so much slower than DVDPlayer when playing streams? - Atreyu - 2017-11-26

(2017-11-24, 00:27)FernetMenta Wrote: I sent a patch to ffmpeg mailing list. Let's see what they say: http://ffmpeg.org/pipermail/ffmpeg-devel/2017-November/220717.html

Nice!<holding fingers crossed>


RE: Why is VideoPlayer so much slower than DVDPlayer when playing streams? - coremailrx8 - 2018-01-09

(2017-11-24, 00:27)FernetMenta Wrote: I sent a patch to ffmpeg mailing list. Let's see what they say: http://ffmpeg.org/pipermail/ffmpeg-devel...20717.html

@FernetMenta   has there been any progress on this front? I don't see any more correspondence beyond Nov 28. Will FFMPEG apply your patch? Thanks.


RE: Why is VideoPlayer so much slower than DVDPlayer when playing streams? - FernetMenta - 2018-01-10

The maintainer of this part wanted to provide some testing version. I pinged him a couple of days ago but have not gotten any response so far.