-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
plugins.svtplay: rewrite plugin and add HLS #4994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Looks like the live channels are off-air now. Will check them out later today. |
SVT1, SVT2 and Kunskapskanalen are working. SVT24 is off-air till later. I notice with SVTBarn (
I'll have a look at SVT24 later and check a few VODs also. |
By adding python 3.9 to my opensuse leap 15.3 I got it to work. For www.svtplay.se/kanaler/svt1 I cannot use "best" to get best stream. |
VODs that have subs without using
With muxing, sometimes, but not always, closing the player results in Streamlink producing an exception. I imagine this is not specific to the plugin though and is timing related. The VODs otherwise play fine and display the subs (once selected in mpv). I'll just include this for info:
|
@DanOscarsson, I don't know if those streams are available now (although they could be via the API). The web player only seems to offer the default quality ( Looking at what the API returns, for example, for HLS:
would seem to indicate more resolutions, but it seems they only resolve to two:
|
If I use the web page in my firefox I get a very good resolution. |
OK, I looked at this a bit more, using mpv instead of Streamlink's hls plugin. There is something strange with Streamlink's parsing of the playlist it would seem. Here's what mpv reports for the stream types available for SVT1:
|
No, it just defaults to
|
Just worked that out at the same time! |
057ad5a
to
8322f88
Compare
I've set it to
|
This is an issue with the |
|
A have done just a very quick test with the new version at my place. How do you find the svt-secure-c URLs from the svtplay URL? |
|
Regarding SVTBarn, perhaps just maintaining a dict that can be updated as necessary will do the job...
|
The API channel names are mapped like this according to the JS: !function(n) {
n.SVT1 = "ch-svt1",
n.SVT2 = "ch-svt2",
n.BARNKANALEN = "ch-barnkanalen",
n.KUNSKAPSKANALEN = "ch-kunskapskanalen",
n.SVT24 = "ch-svt24"
}(le || (le = {})); switch (n) {
case Ae.SVT1:
return "svt1";
case Ae.SVT2:
return "svt2";
case Ae.BARNKANALEN:
return "svtbarn";
case Ae.KUNSKAPSKANALEN:
return "kunskapskanalen";
case Ae.SVT24:
return "svt24";
default:
return null
} |
I found those. I wasn't sure if it was worth mapping all of them and didn't think it would be worthwhile extracting from JS... Whatever you think is best. |
8322f88
to
bd222f0
Compare
Resolves #4992
This is a full plugin rewrite which cleans up the API request and validation schema, and it adds support for HLS streams.
As you can see, there's a stream priority list, because apparently there's a difference between the available qualities of the available stream types, and for some reason, some DASH streams offer higher resolutions and bitrates. It's probably an overkill having all kinds of formats there, but whatever... Also a pretty good reason for a rewrite of the stream selection, as described in #4902.
I can access the API and VOD content with my VPN, but HLS live streams return a 403, so I can't actually test all plugin changes.
@mkbloke, please have a look, thanks.