Skip to content
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

livestream.com stop working #1272

Closed
framirez99 opened this issue Apr 5, 2016 · 7 comments
Closed

livestream.com stop working #1272

framirez99 opened this issue Apr 5, 2016 · 7 comments

Comments

@framirez99
Copy link

Live streams form livestream.com are not working.

Ej. http://livestream.com/accounts/17275479/events/4945175

You get the following error:

[cli][error] Could not open stream: Unable to open URL: http://viewerplus.livestream.com/assets/swf/hdplayer-2.0-viewerplus.swf (404 Client Error: Not Found for url: http://viewerplus.livestream.com/assets/swf/hdplayer-2.0-viewerplus.swf)

@DanGoodman92
Copy link

I have the same issue.

C:\Users\briti>livestreamer --http-no-ssl-verify --loglevel debug "http://livestream.com/accounts/5057055/naploi2016court1" best
[cli][info] Found matching plugin livestream for URL http://livestream.com/accounts/5057055/naploi2016court1
[cli][info] Available streams: 216p (worst), 216p_hls, 432p (best), 432p_hls
[cli][info] Opening stream: 432p (akamaihd)
[stream.akamaihd][debug] Opening host=http://livestream-f.akamaihd.net streamname=5057055_5082539_FqTCfyvX_1_728@175370
[stream.akamaihd][debug] Attempting to handshake
[stream.akamaihd][debug] onEdge data
[stream.akamaihd][debug] session=AQC279E1PP6PZqrsBFd4ycfjgZU/9a8Gs1sJFFNOOZuhm1d2NX
[stream.akamaihd][debug] tat=4043.4209969
[stream.akamaihd][debug] dvrWindow=-1.0
[stream.akamaihd][debug] timeBase=4042.20000005
[stream.akamaihd][debug] timeOfLastTAT=1459940523.5
[stream.akamaihd][debug] errorNumber=0.0
[stream.akamaihd][debug] status=0.0
[stream.akamaihd][debug] streamType=3.0
[stream.akamaihd][debug] streamStartTime=1459936464.32
[stream.akamaihd][debug] liveDelay=14.0
[stream.akamaihd][debug] isLive=True
[stream.akamaihd][debug] switchFail=False
[stream.akamaihd][debug] streamName=5057055_5082539_FqTCfyvX_1_728@175370
[stream.akamaihd][debug] transferToken=XUc3Db1o
[stream.akamaihd][debug] data64=Q1dTCnEkAQB4nLy8B1hURxcwfGfm3ju7NFEsCNGsZjHRWBC7sQ
[stream.akamaihd][debug] edgeVersion=7.4.4
[stream.akamaihd][debug] edgeIP=60.254.143.102
[stream.akamaihd][debug] playerIP=182.239.209.53
[cli][error] Could not open stream: Unable to open URL: http://viewerplus.livestream.com/assets/swf/hdplayer-2.0-viewerplus.swf (404 Client Error: Not Found)

@karlo2105
Copy link

I have different output.

livestreamer "http://livestream.com/accounts/17275479/events/4945175" best
[cli][info] Found matching plugin livestream for URL http://livestream.com/accounts/17275479/events/4945175
[cli][info] Available streams: 272p_hls, 272p (worst, best)
[cli][info] Opening stream: 272p (akamaihd)
[cli][error] Could not open stream: Unable to open URL: http://viewerplus.livest
ream.com/assets/swf/hdplayer-2.0-viewerplus.swf (404 Client Error: Not Found)

but it's working with hls.

livestreamer "http://livestream.com/accounts/17275479/events/4945175" 272p_hls
[cli][info] Found matching plugin livestream for URL http://livestream.com/accou
nts/17275479/events/4945175
[cli][info] Available streams: 272p_hls, 272p (worst, best)
[cli][info] Opening stream: 272p_hls (hls)
[cli][info] Starting player: 'C:\Program Files\VideoLAN\VLC\vlc.exe'
[cli][info] Player closed
[cli][info] Stream ended

@scottbernstein-zz
Copy link

I see the problem here. Breaking it down into its actual Akamai HD stream URL, which if you find the SMIL request in the page source here:
http://api.new.livestream.com/accounts/17275479/events/4945175/broadcasts/118284313.smil

The SMIL gives us the Akamai URL here:
http://livestream-f.akamaihd.net/17275479_4945175_59865394_1_198@24128

But an Akamai protocol URL requires an SWF to be passed in. There are 2 SWF URLs on the page, both of which the plugin knows about:
http://cdn.livestream.com/swf/LSPlayer.swf
https://viewerplus.livestream.com/assets/swf/hdplayer-2.0-viewerplus.swf

For whatever reason, the 2nd of these SWFs is no longer working. If you request it from the server, you get a 404 File Not Found error.

Since the plugin already knows about both of them but seems to prefer the 2nd, it would be relatively trivial to update the plugin to do one of the following:

  1. prefer the OTHER url (this is easy and it works but is not the best solution)
  2. Even better: Make a request to retrieve the SWF file that it prefers, and if that request returns an error, then try the other SWF URL, and assuming that is successful use it (or fail with an error if none succeeds).
  3. Best: If you don't succeed with either SWF URL, then fallback to the HLS stream.

Frankly I think it might be better to always prefer the HLS stream for Livestream streams anyway because the Akamai stream will always cut you off after sending you exactly 2GB of data on the stream, and the streams I request from Livestream are often more than 2GB.

I am tempted to make these fixes myself unless anyone has any better ideas?

@intact
Copy link
Contributor

intact commented Apr 6, 2016

  1. is OK, because you can always use something like:

livestreamer http://livestream.com/stream 720p_hsl

@DanGoodman92
Copy link

@scottbernstein A fix would be fantastic. For odd reasons that aren't worth going into, I need to use the Akamai stream, so any assistance you could give regarding a fix (even just pointing me in the right direction) would be much appreciated!

Edit: I had a bit of a stuff around myself (bearing in mind my lack of experience), and I've got it working by amending:

 play_url = stream_info.get("play_url")
        if play_url:
            swf_url = info.get("viewerPlusSwfUrl") or info.get("hdPlayerSwfUrl")
            if not swf_url.startswith("http"):
                swf_url = "http://" + swf_url

to:

play_url = stream_info.get("play_url")
        if play_url:
            swf_url = "http://cdn.livestream.com/swf/LSPlayer.swf" #info.get("viewerPlusSwfUrl") or info.get("hdPlayerSwfUrl")
            if not swf_url.startswith("http"):
                swf_url = "http://" + swf_url`

I'm sure this is a cringeworthy fix for anyone who knows what they are doing, but it has fixed the issue for me!

@intact
Copy link
Contributor

intact commented Apr 9, 2016

@DanGoodman92 you can try #1277

@framirez99
Copy link
Author

intact solution worked for me. Thanks.
So I'm closing this issue and expecting a commit soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants