Audio/video stream recording forums

Attention Visitor:
You may have to register or log in before you can post:
  • Click the register link to sign up.
  • Registered members please fill in the form below and click the "Log in" button.
To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Audio/video stream recording forums > Streaming media recording forum > rtmpdump
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #11  
Old 03-21-2017, 05:34 PM
j_cool j_cool is offline
Senior Member
 
Join Date: Feb 2016
Posts: 515
j_cool is on a distinguished road
Default

Re: Mlb Rtmpdump Problem?


After hls stream detector detects 6 urls right click on game and select one of m3u8s'

I set my hls stream detector to copy m3u8 link as livestreamer command.

Here you see the result:


C:\>"C:\P\STREAMLINK\bin\streamlink.exe" --http-header "User-Agent=Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20
100101 Firefox/52.0" -o "C:\1800_complete.ts" "hls://http://mlblive-akc.mlb.com/ls01/mlbam/2017/03/21/MLB_GAME_VIDEO_ANA
CIN_HOME_20170321_1489603973041/1800K/1800_complete.m3u8" best
[cli][info] Found matching plugin stream for URL hls://http://mlblive-akc.mlb.com/ls01/mlbam/2017/03/21/MLB_GAME_VIDEO_A
NACIN_HOME_20170321_1489603973041/1800K/1800_complete.m3u8
[cli][info] Available streams: live (worst, best)
[cli][info] Opening stream: live (hls)
[stream.hls][error] Failed to create decryptor: Unable to open URL: https://mlb-ws-mf.media.mlb.com/pubajaxws/bamrest/Me
diaService2_0/op-generateKey/v-2.3?contentId=1239053383&kid=20269291 (400 Client Error: Bad Request for url: https://mlb
-ws-mf.media.mlb.com/pubajaxws/bamrest/MediaService2_0/op-generateKey/v-2.3?contentId=1239053383&kid=20269291)
[cli][error] No data returned from stream
[cli][info] Closing currently open stream...



You can copy m3u8 url and paste it in new tab's address bar and save "1800_complete.m3u8".

Open it and this is one of lines from "1800_complete.m3u8", maybe streamlink knows how to handle that.

#EXT-X-KEY:METHOD=AES-128,URI="https://mlb-ws-mf.media.mlb.com/pubajaxws/bamrest/MediaService2_0/op-generateKey/v-2.3?contentId=1239053383&kid=20269291",IV=0x948886 D04001BCB7CF97A4FA0218DC46



I looked at this website from time to time and never caught a stream until today, and it was as before sound only, no video.

You can install firefox extension "User Agent Switcher", set user agent to iphone 3.0 and get streamlink command as I did.
It will have iphone 3.0 user agent. See if you get the stream playing, as you know streamlink runs VLC.
Reply With Quote
  #12  
Old 03-21-2017, 10:33 PM
lajvguy lajvguy is offline
Senior Member
 
Join Date: Nov 2014
Posts: 203
lajvguy is on a distinguished road
Default

Re: Mlb Rtmpdump Problem?


I don't know what to do about "Failed to create decryptor" error. Can you help? Thanks!

Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Program Files (x86)\Streamlink\bin>"C:\Program Files (x86)\Streamlink\bin\str
eamlink.exe" --http-header "User-Agent=Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0
 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile
/7A341 Safari/528.16" -o "C:\Users\Lenovo\Videos\1800_complete.ts" "hls://http:/
/mlblive-l3c.mlb.com/ls01/mlbam/2017/03/22/MLB_GAME_VIDEO_OAKSEA_HOME_20170322_1
489604734582/1800K/1800_complete.m3u8" best
[cli][info] Found matching plugin stream for URL hls://http://mlblive-l3c.mlb.co
m/ls01/mlbam/2017/03/22/MLB_GAME_VIDEO_OAKSEA_HOME_20170322_1489604734582/1800K/
1800_complete.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://mlb-
ws-mf.media.mlb.com/pubajaxws/bamrest/MediaService2_0/op-generateKey/v-2.3?conte
ntId=1239066583&kid=20269327 (400 Client Error: Bad Request for url: https://mlb
-ws-mf.media.mlb.com/pubajaxws/bamrest/MediaService2_0/op-generateKey/v-2.3?cont
entId=1239066583&kid=20269327)
[cli][error] No data returned from stream
[cli][info] Closing currently open stream...

C:\Program Files (x86)\Streamlink\bin>
Reply With Quote
  #13  
Old 03-21-2017, 11:28 PM
JonDough JonDough is offline
Member
 
Join Date: Feb 2016
Posts: 90
JonDough is on a distinguished road
Default

Re: Mlb Rtmpdump Problem?


The yoursportsinhd website is using the m3u8 and ts directly from the mlbtv service servers. Then, the yoursportsinhd video player ignores the key url in the m3u8 because it requires secure retrieval with mlbtv service cookies.

Instead, the yoursportsinhd video player substitutes the key off their own server on-the-fly. See proxying the hls aes keys.

If won't be easy to play in vlc directly because you'd have to do the key substitution yourself instead of having the yoursportsinhd video player do it. You can do the monkeypatch idea with livestreamer, mentioned by mckv in post #6 - or you can download the key from yoursportsinhd and setup a local server on your machine and redirect key requests there so that livestreamer will work with vlc.
Reply With Quote
  #14  
Old 03-22-2017, 03:46 AM
j_cool j_cool is offline
Senior Member
 
Join Date: Feb 2016
Posts: 515
j_cool is on a distinguished road
Default

Re: Mlb Rtmpdump Problem?


MCKV,

There are 2 things here:

Quote:
Originally Posted by mckv View Post
you can monkey-patch streamlink to change the key retrival url, tho it works fine even without doing it
How it works fine without monkey-patch, we're not getting it for now ?

May I pass your code to Streamlink team to see if they can make some use of it?
I'm not able to until I learn python.

Last edited by j_cool : 03-22-2017 at 04:25 AM.
Reply With Quote
  #15  
Old 03-22-2017, 04:45 AM
JonDough JonDough is offline
Member
 
Join Date: Feb 2016
Posts: 90
JonDough is on a distinguished road
Default

Re: Mlb Rtmpdump Problem?


Quote:
Originally Posted by j_cool View Post
How it works fine without monkey-patch, we're not getting it for now ?
It works fine without the monkey-patch in the example quoted by mckv because the stream shown in his quote is for the MLB Network Channel, which does not use a secure url for the key. The MLB Network Channel only occasionally shows games and mostly has US baseball reporting and commentary.

The livestreams which exclusively stream games always use a secure url for the key.
Reply With Quote
  #16  
Old 03-22-2017, 04:20 PM
lajvguy lajvguy is offline
Senior Member
 
Join Date: Nov 2014
Posts: 203
lajvguy is on a distinguished road
Default

Re: Mlb Rtmpdump Problem?


@ JonDough,

Can you give me an example of how I can do the monkeypatch idea with livestreamer, mentioned by mckv in post #6, using this game? Thanks again!

http://yoursportsinhd.com/mlb/game/509724/
Reply With Quote
  #17  
Old 04-05-2017, 03:14 AM
beardypig beardypig is offline
Streamlink Maintainer
 
Join Date: Apr 2017
Posts: 3
beardypig is on a distinguished road
Default

Re: Mlb Rtmpdump Problem?


Streamlink plugin: yoursportsinhd.py.

Save it to
Code:
%APPDATA%\streamlink\plugins\yoursportsinhd.py
on Windows or
Code:
~/.config/streamlink/plugins/yoursportsinhd.py
on macOS/Linux
Reply With Quote
  #18  
Old 04-05-2017, 02:11 PM
JonDough JonDough is offline
Member
 
Join Date: Feb 2016
Posts: 90
JonDough is on a distinguished road
Default

Re: Mlb Rtmpdump Problem?


Quote:
Originally Posted by beardypig View Post
Streamlink plugin
Sweet! Thanks beardypig!

This is great for the specfic site. As a general mater, it would be great if streamlink had a command variable to override/substitute the aes key urls in a hls playlist with data from a local copy of the key(s) or in a config file.

Too often the key retrieval from the hls playlist url requires complex cookie parameters or intermittent access of another url that is not in the playlist. If streamlink had some dynamic options to override the playlist key urls and utilize local copies of the keys, it would be very useful for these cases.

Thanks again for the plugin!
Reply With Quote
  #19  
Old 04-05-2017, 03:03 PM
tvgplayer tvgplayer is offline
Member
 
Join Date: Nov 2016
Posts: 42
tvgplayer is on a distinguished road
Default

Re: Mlb Rtmpdump Problem?


Quote:
Originally Posted by beardypig View Post
Streamlink plugin: yoursportsinhd.py.

Save it to
Code:
%APPDATA%\streamlink\plugins\yoursportsinhd.py
on Windows or
Code:
~/.config/streamlink/plugins/yoursportsinhd.py
on macOS/Linux
Thank you very much for the help! Is it possible to include "Select Feed" option in yoursportsinhd.py? Thanks again!
Reply With Quote
  #20  
Old 04-05-2017, 03:25 PM
JonDough JonDough is offline
Member
 
Join Date: Feb 2016
Posts: 90
JonDough is on a distinguished road
Default

Re: Mlb Rtmpdump Problem?


Quote:
Originally Posted by tvgplayer View Post
Thank you very much for the help! Is it possible to include "Select Feed" option in yoursportsinhd.py? Thanks again!
By feed, do you mean the quality? If so, that can be selected using the usual hls parameters of streamlink. In this case: 540p, 720, best, etc.
If you mean something else by feed, explain.
Reply With Quote
Reply Post New Thread
Tags: ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 11:24 PM.


Powered by All-streaming-media.com; 2006-2011
vB forum hacked with Zoints add-ons