Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   rtmpdump (http://stream-recorder.com/forum/forumdisplay.php?f=54)
-   -  

Mlb Rtmpdump Problem?

(http://stream-recorder.com/forum/showthread.php?t=22752)

lajvguy 03-13-2017 03:36 PM

Mlb Rtmpdump Problem?


 
http://yoursportsinhd.com/mlb/game/509721/

Tried to use rtmpdump with RTMPDumpHelper to play in VLC but nothing happens. Can anybody help? Thanks!

j_cool 03-13-2017 04:43 PM

Re: Mlb Rtmpdump Problem?


 
This is not rtmp stream.

http://mlblive-akc.mlb.com/ls01/mlba...r_wired60.m3u8
http://mlblive-akc.mlb.com/ls01/mlba..._complete.m3u8
http://mlblive-akc.mlb.com/ls01/mlba..._complete.m3u8


Here in England I can hear the sound only in my firefox browser, no video.

Those urls I can't play "as they are".

Good challenge.

lajvguy 03-13-2017 05:09 PM

Re: Mlb Rtmpdump Problem?


 
@ j cool,

Thanks for the help but the game ended. Here's the link to another mlb game that starts 600pm Pacific (US):

http://wiz1.net/channel105

Do you know how to get this stream to play in VLC? I don't know what parameters are needed. Can you help?

j_cool 03-13-2017 06:15 PM

Re: Mlb Rtmpdump Problem?


 
Game was on when I tried to see it in firefox, sound yes, but no video.

You get m3u8 with one of many sniffers like urlsnooper, httpfox or hls stream detector extensions for firefox,etc.

You can play m3u8 with vlc however you like if there are no other parameters needed.
This has to be looked at.

Hls stream detector gave me ready to use ffmpeg command, didn't work either.
I forgot to try livestreamer command, it would be compatible with streamlink.

There is one news channel that I can watch with VLC 3, but not with any other VLC older than VLC 3.

http://nightlies.videolan.org/

Streamlink plays the same m3u8 with whatever VLC i throw at it .

6pm your time is 2am here, I go to bed soon, but anyway If I do the same thing result is the same.

Solution would be to try some new trick.

j_cool 03-15-2017 03:05 AM

Re: Mlb Rtmpdump Problem?


 
Laj,

Every day I see something new somewhere on this forum.

Instal firefox extensions HLS stream detector and HDS stream detector,
and when your game is on in LA give them a try.

mckv 03-15-2017 06:07 AM

Re: Mlb Rtmpdump Problem?


 
you can monkey-patch streamlink to change the key retrival url, tho it works fine even without doing it

Code:

import sys
import struct
import streamlink
from Crypto.Cipher import AES
from streamlink.exceptions import StreamError
from base64 import b64encode

session = streamlink.session.Streamlink()

def num_to_iv(n):
    return struct.pack(">8xq", n)

def new_create_decryptor(self, key, sequence):
    if key.method != "AES-128":
        raise StreamError("Unable to decrypt cipher {0}", key.method)

    if not key.uri:
        raise StreamError("Missing URI to decryption key")

    if self.key_uri != key.uri:
        new_uri = b'http://www.zoomtv.me/k.php?q='+b64encode(b'p=mlb&id=1&v=tv&vw=1&s='+b64encode(bytes(key.uri,'utf8')))
        res = self.session.http.get(new_uri.decode('utf-8'), exception=StreamError,
                                    retries=self.retries,
                                    **self.reader.request_params)
        self.key_data = res.content
        self.key_uri = key.uri

    iv = key.iv or num_to_iv(sequence)

    # Pad IV if needed
    iv = b"\x00" * (16 - len(iv)) + iv

    return AES.new(self.key_data, AES.MODE_CBC, iv)

streamlink.stream.hls.HLSStreamWriter.create_decryptor = new_create_decryptor

session.set_option("http-headers", {'Referer':'http://www.zoomtv.me/kembed.php?p=mlb&id=1&v=tv'})
streams = session.streams('hlsvariant://http://mlblive-akc.mlb.com/ls01/mlbam/mlb_network/NETWORK_LINEAR_1/master_wired.m3u8')
stream = streams["worst"]
fd = stream.open()
while True:
    sys.stdout.buffer.write(fd.read(100 * 1024))

python player.py | vlc -

lajvguy 03-15-2017 12:37 PM

Re: Mlb Rtmpdump Problem?


 
@ mckv,

Thanks for the help. Can you explain how to use your python player.py file? What folder does python player.py belong in? What command should I use? Thanks again!

lajvguy 03-21-2017 12:46 PM

Re: Mlb Rtmpdump Problem?


 
@j cool,

Tried to use HLS Stream Detector but can't play mlb streams. Do you know how to use python player.py from mckv in previous post? He doesn't answer. Thanks!

j_cool 03-21-2017 01:18 PM

Re: Mlb Rtmpdump Problem?


 
I have not looked at python yet but as things go, I will have to.

Take for example rtmpdump, looks abandoned like livestreamer.

I see only streamlik on the horizon, or write my own rtmpsuck.

lajvguy 03-21-2017 02:26 PM

Re: Mlb Rtmpdump Problem?


 
@j cool,

http://yoursportsinhd.com/mlb/game/509624/

This game streams good with iPhone user agent change. How can I get it to play in VLC? Thanks again!

j_cool 03-21-2017 04:34 PM

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.

lajvguy 03-21-2017 09:33 PM

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>


JonDough 03-21-2017 10:28 PM

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.

j_cool 03-22-2017 02:46 AM

Re: Mlb Rtmpdump Problem?


 
MCKV,

There are 2 things here:

Quote:

Originally Posted by mckv (Post 90311)
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.

JonDough 03-22-2017 03:45 AM

Re: Mlb Rtmpdump Problem?


 
Quote:

Originally Posted by j_cool (Post 90508)
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.

lajvguy 03-22-2017 03:20 PM

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/

beardypig 04-05-2017 02:14 AM

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

JonDough 04-05-2017 01:11 PM

Re: Mlb Rtmpdump Problem?


 
Quote:

Originally Posted by beardypig (Post 90751)
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!

tvgplayer 04-05-2017 02:03 PM

Re: Mlb Rtmpdump Problem?


 
Quote:

Originally Posted by beardypig (Post 90751)
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!

JonDough 04-05-2017 02:25 PM

Re: Mlb Rtmpdump Problem?


 
Quote:

Originally Posted by tvgplayer (Post 90768)
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.

tvgplayer 04-05-2017 02:35 PM

Re: Mlb Rtmpdump Problem?


 
Quote:

Originally Posted by JonDough (Post 90769)
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.

There is a "Select Feed" option if you look at http://yoursportsinhd.com/mlb games. Home or Away feed. That's what I mean.

JonDough 04-05-2017 04:09 PM

Re: Mlb Rtmpdump Problem?


 
The home/away feed. You're correct, the plugin will probably have to be modified because the home/away feed is selected using post with csrftoken, csrfmiddlewaretoken and feed input parameters. Just adding the feed number using get doesn't change the feed, and only one feed is in the page source at a time based on those post input parameters.

YourSportsInHD 04-06-2017 12:08 AM

Re: Mlb Rtmpdump Problem?


 
Quote:

Originally Posted by JonDough (Post 90776)
The home/away feed. You're correct, the plugin will probably have to be modified because the home/away feed is selected using post with csrftoken, csrfmiddlewaretoken and feed input parameters. Just adding the feed number using get doesn't change the feed, and only one feed is in the page source at a time based on those post input parameters.

That's right. Check out RoboBrowser, it's a great tool to interact with forms, and it'll automatically submit the CSRF token for you. Just watch out for the cookies.

j_cool 04-06-2017 12:46 AM

Re: Mlb Rtmpdump Problem?


 
YourSportsInHD,

Can you tell me in a few simple words what is the advantage of RoboBrowser over Firefox?

( if you are willing to talk to simple people )

tvgplayer 04-24-2017 10:04 PM

Re: Mlb Rtmpdump Problem?


 
Anybody know how I can get any mlbstreams.net game to play in VLC? RTMPDumpHelper doesn't pick anything up. Thanks!

http://mlbstreams.net/los-angeles-do...b-live-stream/

confused.com 04-25-2017 02:19 AM

Re: Mlb Rtmpdump Problem?


 

tvgplayer 04-26-2017 03:56 PM

Re: Mlb Rtmpdump Problem?


 
@confused.com,

I don't need to sign-up or download an extension to watch in HD. You can get HD on the screen when the stream is playing. I just want to play it with VLC.

tvgplayer 04-26-2017 04:17 PM

Re: Mlb Rtmpdump Problem?


 
RTMPDumpHelper doesn't pick anything up. Can somebody help me get this 04stream to play in VLC? I want to watch some mlb games tonight and should be the same as this 04stream. Thanks!

http://myfeed2all.eu/watch/408918/1/watch-nba-tv.html

avsrf410 04-27-2017 01:04 AM

Re: Mlb Rtmpdump Problem?


 
Run url helper or url snooper on the link below and take should be able to created a link to play in vlc or other rtmp player...
http://myfeed2all.eu/watch/408918/1/watch-nba-tv.html

j_cool 04-27-2017 01:26 AM

Re: Mlb Rtmpdump Problem?


 
avsrf410,

Try something yourself before speaking in public.

TVG, if you give a try to this you may find that your browser gets infected with malware.

In that case uninstall your browser and take care that nothing is left from history before reinstalling it again.

If you don't know how to handle this you may end up reinstalling OS from scratch.

::::::::: profile

rd /s /q "%APPDATA%\mozilla"

rd /s /q "%USERPROFILE%\Local Settings\Application Data\Mozilla"

rd /s /q %TEMP%

md %TEMP%

rd /s /q "%USERPROFILE%\Recent"

md "%USERPROFILE%\Recent"

avsrf410 04-27-2017 01:27 AM

Re: Mlb Rtmpdump Problem?


 
This link was working for now.
http://mlblive-akc.mlb.com/ls01/mlba...ter_wired.m3u8

Quote:

Originally Posted by mckv (Post 90311)
you can monkey-patch streamlink to change the key retrival url, tho it works fine even without doing it

Code:

import sys
import struct
import streamlink
from Crypto.Cipher import AES
from streamlink.exceptions import StreamError
from base64 import b64encode

session = streamlink.session.Streamlink()

def num_to_iv(n):
    return struct.pack(">8xq", n)

def new_create_decryptor(self, key, sequence):
    if key.method != "AES-128":
        raise StreamError("Unable to decrypt cipher {0}", key.method)

    if not key.uri:
        raise StreamError("Missing URI to decryption key")

    if self.key_uri != key.uri:
        new_uri = b'http://www.zoomtv.me/k.php?q='+b64encode(b'p=mlb&id=1&v=tv&vw=1&s='+b64encode(bytes(key.uri,'utf8')))
        res = self.session.http.get(new_uri.decode('utf-8'), exception=StreamError,
                                    retries=self.retries,
                                    **self.reader.request_params)
        self.key_data = res.content
        self.key_uri = key.uri

    iv = key.iv or num_to_iv(sequence)

    # Pad IV if needed
    iv = b"\x00" * (16 - len(iv)) + iv

    return AES.new(self.key_data, AES.MODE_CBC, iv)

streamlink.stream.hls.HLSStreamWriter.create_decryptor = new_create_decryptor

session.set_option("http-headers", {'Referer':'http://www.zoomtv.me/kembed.php?p=mlb&id=1&v=tv'})
streams = session.streams('hlsvariant://http://mlblive-akc.mlb.com/ls01/mlbam/mlb_network/NETWORK_LINEAR_1/master_wired.m3u8')
stream = streams["worst"]
fd = stream.open()
while True:
    sys.stdout.buffer.write(fd.read(100 * 1024))

python player.py | vlc -


j_cool 04-27-2017 02:19 AM

Re: Mlb Rtmpdump Problem?


 

tvgplayer 04-27-2017 12:47 PM

Re: Mlb Rtmpdump Problem?


 
Quote:

Originally Posted by j_cool (Post 91189)
avsrf410,

Try something yourself before speaking in public.

TVG, if you give a try to this you may find that your browser gets infected with malware.

In that case uninstall your browser and take care that nothing is left from history before reinstalling it again.

If you don't know how to handle this you may end up reinstalling OS from scratch.

::::::::: profile

rd /s /q "%APPDATA%\mozilla"

rd /s /q "%USERPROFILE%\Local Settings\Application Data\Mozilla"

rd /s /q %TEMP%

md %TEMP%

rd /s /q "%USERPROFILE%\Recent"

md "%USERPROFILE%\Recent"

@j cool,

Thanks for looking out for me. I don't want my browser to get infected with malware.

tvgplayer 04-27-2017 12:55 PM

Re: Mlb Rtmpdump Problem?


 
@j cool,

Thanks. Do you know how I can get any mlbstreams.net game to play in VLC? RTMPDumpHelper doesn't pick anything up. Thanks!

http://mlbstreams.net/los-angeles-do...b-live-stream/

j_cool 04-27-2017 03:14 PM

Re: Mlb Rtmpdump Problem?


 
When I click on your link everything is against me to see the stream, webmasters like it like that for a reason beyond me.

When I clicked on avsrf410's link ton of garbage popped-up in matter of seconds and blocked my browser.

When I restarted the browser, the same garbage popped-up again and blocked the browser at the very start.

I had to uninstall and re-install the browser.

Ask avsrf410 how did he get m3u8, but don't click on his link.

troller12 04-27-2017 03:43 PM

Re: Mlb Rtmpdump Problem?


 
About your question too myfeed2all and why RTMPDumpHelper dosent grab any stream datas.So you have to enter the right ports / port ranges in RDH options to scan for.If the stream does run then open CMD and enter netstat -bn and in the Remoteadresse list of your flashplayer plugin process you can see the stream IP & port like this...
Code:

185.80.220.81:13396
....stream does use port 13396.Enter this into scan list.If you try it again then it will fail and if you check stream port again then you see it has changed if you reload the site so they are using dynamic ports but this you can also prevent if you just reload the player on that site alone again then same port will used again and you can grab the stream datas with RDH.
Code:

-r "rtmp://185.80.220.81:13396/stream/"
-a "stream/"
-f "WIN 25,0,0,148"
-W "http://thecdn.04stream.com/p/ooolo1.swf"
-p "http://www.04stream.com/ebb.php?adsp=ttother&width=600&height=460&a=.......=firstrowas1.cc"
-y "0f5Bo327y0yBobZcQBIw.stream?........"

I did short the long paths above.Just follow the important links in browser console to get more infos.

greetz

tvgplayer 04-27-2017 04:28 PM

Re: Mlb Rtmpdump Problem?


 
Quote:

Originally Posted by troller12 (Post 91210)
About your question too myfeed2all and why RTMPDumpHelper dosent grab any stream datas.So you have to enter the right ports / port ranges in RDH options to scan for.If the stream does run then open CMD and enter netstat -bn and in the Remoteadresse list of your flashplayer plugin process you can see the stream IP & port like this...
Code:

185.80.220.81:13396
....stream does use port 13396.Enter this into scan list.If you try it again then it will fail and if you check stream port again then you see it has changed if you reload the site so they are using dynamic ports but this you can also prevent if you just reload the player on that site alone again then same port will used again and you can grab the stream datas with RDH.
Code:

-r "rtmp://185.80.220.81:13396/stream/"
-a "stream/"
-f "WIN 25,0,0,148"
-W "http://thecdn.04stream.com/p/ooolo1.swf"
-p "http://www.04stream.com/ebb.php?adsp=ttother&width=600&height=460&a=.......=firstrowas1.cc"
-y "0f5Bo327y0yBobZcQBIw.stream?........"

I did short the long paths above.Just follow the important links in browser console to get more infos.

greetz

I always learn something from you. How do I just reload the player on that site alone again so same port will be used again? Thanks!

troller12 04-28-2017 01:05 PM

Re: Mlb Rtmpdump Problem?


 
Hi,

so the stream infos you can also read if you inspect the flash player on that site.Just use your browser console a little.

You can also use tools like uBlock Origin.Choose the picker then select the flash player and now you get a new preview window where you can choose elements to hide also with a preview function.Choose this and then undo it and the stream gets fresh loaded alone without to load whole site again.

greetz

JonDough 04-30-2017 01:32 AM

Re: Mlb Rtmpdump Problem?


 
It is all working fine. For mlbstreams.net, don't install any plugins or other crap. The same link on the page has to be clicked like three times. The first two clicks go to ads or that plugin install page. Ignore all of that. The third click will return the m3u8.

tvgplayer 04-30-2017 01:07 PM

Re: Mlb Rtmpdump Problem?


 
Quote:

Originally Posted by JonDough (Post 91277)
It is all working fine. For mlbstreams.net, don't install any plugins or other crap. The same link on the page has to be clicked like three times. The first two clicks go to ads or that plugin install page. Ignore all of that. The third click will return the m3u8.

You're right. You don't have to sign up or download the extension to get the HD stream. Just have to keep clicking the ads off to start the stream. You can get the HD stream setting on the player.

Do you know how to play the m3u8 in VLC? Thanks!


All times are GMT -6. The time now is 10:14 AM.