Why is VideoPlayer so much slower than DVDPlayer when playing streams?
#1
@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!
Reply
#2
Are those HLS streams?
Reply
#3
@eracknaphobia
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#4
(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?
Reply
#5
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.
Reply
#6
(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.
Reply
#7
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.
Reply
#8
(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.ad.../issues/49
Reply
#9
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...
Reply
#10
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.
Reply
#11
(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/for...ptive.html
Reply
#12
I sent a patch to ffmpeg mailing list. Let's see what they say: http://ffmpeg.org/pipermail/ffmpeg-devel...20717.html
Reply
#13
Thumbs Up 
(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

Nice!<holding fingers crossed>
Reply
#14
(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.
Reply
#15
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.
Reply

Logout Mark Read Team Forum Stats Members Help
Why is VideoPlayer so much slower than DVDPlayer when playing streams?0