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

Radio audio streams not included in m3u8 #6

Open
enjoymoreradio opened this issue Jun 27, 2024 · 6 comments
Open

Radio audio streams not included in m3u8 #6

enjoymoreradio opened this issue Jun 27, 2024 · 6 comments

Comments

@enjoymoreradio
Copy link

Don't know if there's a good fix on our end, but the .m3u8 playlist files that are found by mlbv no longer point to the correct radio playlists for multiple audio streams, as of June 25, 2024. Games June 24, 2024 and earlier are unaffected. Video streams and TV audio continue to work as expected.

@enjoymoreradio
Copy link
Author

image

As far as I can tell, MLB has disabled these streams. Very unfortunate.

@enjoymoreradio
Copy link
Author

Working on an alternative to pull the radio streams from a different source, but it will require additional work on the authentication side.

@enjoymoreradio
Copy link
Author

enjoymoreradio commented Jul 8, 2024 via email

@mattiasa
Copy link

mattiasa commented Jul 8, 2024

@enjoymoreradio I've also been looking at this and concluded the same thing as you, that the stream the web player uses contains the radio audio. Do you need any help with this?

@enjoymoreradio
Copy link
Author

enjoymoreradio commented Jul 8, 2024 via email

@mattiasa
Copy link

mattiasa commented Jul 8, 2024

It turned out to be fairly simple actually once I managed to wrap my head around the media-gateway graphql interface.

Assuming that you have a game_id and a Bearer token (which is the OKTA_ACCESS_TOKEN from the stored session), you have to make 3 calls to https://media-gateway.mlb.com/graphql

  1. initSession - to create a deviceId and a sessionId. Maybe this is something you can save in the session state?
  2. contentSearch - to find the mediaId for the tracks you want. You'll have both the home and away TV and radio feeds, but the TV feeds have the radio audio embedded the way they used to via the old access method before June 25.
  3. initPlaybackSession - This returns the URL to the HLS feed which includes the authentication token in the URL so you just have to point streamlink at the URL without having to add any cookies or headers.

I created a POC python script which downloads a game to show how it works at https://gist.github.com/mattiasa/750d3ecec2694c9ce908592266dc8f49

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

No branches or pull requests

2 participants