Streamlink: PSVue plugin?

Created on 12 Nov 2016  Â·  42Comments  Â·  Source: streamlink/streamlink

I want to have a PSVue plugin, because right now, it requests a auth from key.totsuko.tv, but instead recives a 401 code.

enhancement plugin request

All 42 comments

I assume you are talking about the PlayStation Live TV service? I don't have a subscription, but with a bit more information we might be able to tell if it is possible or not.
Do you have any more information about the request it makes? How did you find out that it makes that request? What are you using to access the service?
I would assume that the streams would be encrypted and, at the moment, we might not be able to support decrypting them.

no, i do not have anymore info about the request, how i found it was through livestreamer requesting it, and i use the browser client. yes, they are encrypted

I see. How did you invoke livestreamer, which URL did you tell it to open?

I invoked Livestreamer via CLI, and I cant give the link out, however I can tell you that they are HLS streams, for all channels, and all of them require auth through totsuko.

OK. When you watch it in the browser (which browser do you use?), are you able to turn the developer tools on to see the key request that it makes? If so you might be able to grab the cookie header and get streamlink to use the cookie to auth and get the key, either with --http-cookie or --http-header.

I found the cookie, but i get a pyCrypto required message with streamlink. I installed it, but it wont pick it up.

Another reason they require totsuko is EPG services.

OK, so I got pyCrypto installed, but totsuko still returns a 401 code.

EDIT: that's even with the cookie.

Well, sounds like it might work. Maybe there are some other headers you need to include, or the cookie header was sent correctly. How did you set it? Paste the command you ran (replace the sensitive stuff with *). I'll have to sign up for an account to write a plugin though.

streamlink hls://_/PROD01/sony/NBC_NBCSPORTSNETWORK/live/2016/10/25/4942649/4500K/4500_slide.m3u8 best --http-cookie reqPayload="REDACTED";
[cli][info] Found matching plugin stream for URL hls://_/PROD01/sony/NBC_NBCSPORTSNETWORK/live/2016/10/25/4942649/4500K/4500_slide.m3u8
[cli][info] Available streams: live (best, worst)
[cli][info] Opening stream: live (hls)
[stream.hls][error] Failed to create decryptor: Unable to open URL: https://key-service.totsuko.tv/key-service/key/key?contentId=12419675&channelId=25159&kid=21298206 (401 Client Error: Unauthorized for url: https://key-service.totsuko.tv/key-service/key/key?contentId=12419675&channelId=25159&kid=21298206)
[cli][error] No data returned from stream

Maybe try putting single quotes (') around the cookie string. Are you using Windows, Linux or macOS?

I put single quotes, and it also doesn't work, I am using windows, and i found something interesting. When played in osmfhls.kutu.ru, it seems to request the same server, but then be successfully authed to play.

I can give one link out. It is a channel not avail. screen, but it still requires auth. http://sonycobra.vod.sonytv.adaptive.level3.net/media/hls/sony/vue_slates/ch_no_avail/4500K/Vue_Slate_ChNotAvail_4500k.m3u8

I'm pretty sure the cookie you're using is wrong. I inserted my cookie into the command, and it worked fine.

@colt082295 "It worked fine," as in you were successfully able to play a feed?

Edit: Tried it myself. Also worked fine via Streamlink -- even Vue's 720p60 feeds.

How do I get this cookie?

You need to have a PSN account, with a PSVue subscription. Then you can use your browser's' developer tools to find the cookies that it sends when you watch a stream.

I am also getting

[stream.hls][error] Failed to create decryptor: Unable to open URL: https://key-service.totsuko.tv/key-service/key/key?contentId=12419675&channelId=25159&kid=21298206 (401 Client Error: Unauthorized for url: https://key-service.totsuko.tv/key-service/key/key?contentId=12419675&channelId=25159&kid=21298206)
[cli][error] No data returned from stream

The link posted above does works for me (Vue_Slate_ChNotAvail_4500k.m3u8)
but this is not a real video stream.

When using streamlink on a real video, I get this error

You have to add --http-header "reqPayload=keyhere" to the command.

I'm able to get it working, but I'm running into an issue where after _exactly_ 3 hours both streamlink and livestreamer throw an error relating to the auth token, and I have to go to the Vue page and get a new one. Obviously the actual Vue client doesn't do this or else everyone would be complaining. I believe the error might be due to the cookie not having an expiration date in it, but not sure. Anyone got an idea?

@enigma, believe this would be the are you still vueing screen on mobile

I assume you'd need a script that can refresh the page automatically and strip the new cookie automatically.

@jacob1218 I'm not, only had Vue open in the browser and closed it after I got the cookie.

@besweeet sounds interesting, do you know of any way I could make streamlink do this? I figured out where to grab the cookie when you arrive on the landing page, but am unsure if you can script the cookie into livestreamer like that.

@enigma1400 Others may know of an easier way, but I imagine you can use automation software to automatically refresh your browser every hour, grab the cookie / reqPayload value and put it into a streamlink command.

@besweeet Yeah, I figured you could do that too, but how would you put the cookie into streamlink without stopping streamlink, or is that not possible?

Ah, doing it all without it stopping could be iffy. One idea might be to use Streamlink's --player-external-http and --player-external-http-port commands. Have VLC play the IP:port, then after the brief downtime, VLC might be able to pick up without having to do anything else with it.

I'll try it with an FSGO feed real quick (start Streamlink, open in VLC via IP:port, stop Streamlink, start Streamlink, see if VLC resumes).

And that didn't work. VLC crashes while Windows Media Player just stops. MPC was taking too long to start initially so I closed it.

Hmm, seems like the issue is related with the cookie/streamlink. I recall hearing people were able to open the streams and have the cookies persist via Kodi, but it seems that it's been patched out by Sony themselves.

hello guys, I could be of some help to you guys, the streams are HLS and static, as your aware they just need cookie to release them, ive been working on this and got streams working in browser via chrome with HLS add on, unfortunately im in the UK so cannot sign up for a trial to psvue, ive also had the streams working in kodi, get in touch if u want to explore this more

@markeymark How were you able to execute the streams via Chrome? I've been experimenting with this for days (and with several HLS add-ons), and can't seem to solve it. Of true interest is the fact that I've discovered two separate sites that appear to be pulling from various Vue m3u8 streams, and displaying them via a web-based media player. No idea how they're authenticating for the key.

they are cookie authenticated, what sites are you pulling from?

On Wed, Sep 13, 2017 at 4:41 AM, eyealaska notifications@github.com wrote:

@markeymark https://github.com/markeymark How were you able to execute
the streams via Chrome? I've been experimenting with this for days (and
with several HLS add-ons), and can't seem to solve it. Of true interest is
the fact that I've discovered two separate sites that appear to be pulling
from various Vue m3u8 streams, and displaying them via a web-based media
player. No idea how they're authenticating for the key.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/streamlink/streamlink/issues/160#issuecomment-329050323,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFjZ2wESuqoViP2vmw4i11XQYNXRX1zHks5sh07ygaJpZM4KwgZ3
.

Hey folks, i have some experience with this system. At the moment what we require beardypig is a login based plugin similar to wwe network or ufc network to accomplish whats needed. They have updated the system recently and it requires too frequent of a reauthentication. while the payload value might not change, the urls are now hash signed which are timed. So this requires the login system to get the required details then to also get the latest url. This is why its required that a plugin is made for the system.

I have a current login that i pay for, and i can provide samples and examples to assist you beardypig. I wont waste your time as i have experience with this methodology.

Its important to add, i believe with the web version now being available, we can feed direct pages in like you have configured for wwe and ufc respectively.

I would like to see this looked at again. Having the cookie or key renewed automatically for long running streams

@markeymark

@fivehorizons We've had this question/discussion on several other plugins regarding cookie/stream reneawal and it's just not something that Streamlink was designed for. If you want to open a new copy of a stream after it closes via cookie expiration you can just write a little wrapper that calls multiple Streamlink commands in a row.

@gravyboat thank you for response.

I have seen the m3u8 links expire rather quickly. do you think inserting the http token would prevent that?

@fivehorizons I don't know, I haven't been keeping much of an eye on how the token system works for PSVue.

@enigma1400 have you had any joy with longer lasting cookies?

No but have not tried again for some time.
On Tue, Apr 10, 2018 at 11:28 AM markeymark notifications@github.com
wrote:

@enigma1400 https://github.com/enigma1400 have you had any joy with
longer lasting cookies?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/streamlink/streamlink/issues/160#issuecomment-380164010,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AhWZ_DHMMYFJaiUJ747UEYRVFlBM731Aks5tnN2lgaJpZM4KwgZ3
.

@fivehorizons drop me an email, might be able to help

[email protected]

Are ps vue streams not able o go thru streamlink anymore?

Anybody have success with this?

closing, as nobody found a good way for this or just nobody has an account to even look at this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

whady picture whady  Â·  35Comments

cdrage picture cdrage  Â·  55Comments

cdrage picture cdrage  Â·  43Comments

aykuter picture aykuter  Â·  36Comments

wangminqi picture wangminqi  Â·  39Comments