LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-30-2018, 02:25 PM   #5056
tonycpsu
Member
 
Registered: Apr 2014
Posts: 71

Rep: Reputation: Disabled

Yeah, it's broken for me as well. Quick peek at things suggests they changed things on the backend.

Will investigate and try to come up with a fix, but I'm on vacation and heading out in a bit so it might not happen today.
 
Old 03-30-2018, 02:54 PM   #5057
tonycpsu
Member
 
Registered: Apr 2014
Posts: 71

Rep: Reputation: Disabled
A quick look suggests that there are two issues. The one jgshier discovered seems to occur when games are postponed, as both the PIT-DET and WSH-CIN games were yesterday. A totally separate issue is that MLB changed one of the URLs for getting stream data. I'll work something up ASAP.
 
Old 03-30-2018, 03:11 PM   #5058
mkomko
Member
 
Registered: Mar 2010
Posts: 97

Rep: Reputation: 3
Never mind.

Last edited by mkomko; 03-30-2018 at 03:13 PM.
 
Old 03-30-2018, 03:29 PM   #5059
snipermatze
LQ Newbie
 
Registered: Mar 2018
Posts: 3

Rep: Reputation: Disabled
Quote:
Originally Posted by tonycpsu View Post
A quick look suggests that there are two issues. The one jgshier discovered seems to occur when games are postponed, as both the PIT-DET and WSH-CIN games were yesterday. A totally separate issue is that MLB changed one of the URLs for getting stream data. I'll work something up ASAP.
Thank you for the work you've done. For me as a new baseball fan it's just great to find a tool by randomly browsing github supporting native media players. It's an even greater joy to see the actual development and debugging of this tool unfold at the same time I was downloading it and trying to get it to work.

I just made it run on my Mac but I've experienced the same problems with the postponed games mentioned earlier. An earlier recording is running perfectly in MPV.

Edit: I also just created a pull request: https://github.com/tonycpsu/mlbstreamer/pull/14

Last edited by snipermatze; 03-30-2018 at 04:04 PM.
 
Old 03-30-2018, 04:49 PM   #5060
snipermatze
LQ Newbie
 
Registered: Mar 2018
Posts: 3

Rep: Reputation: Disabled
Quote:
Originally Posted by tonycpsu View Post
A quick look suggests that there are two issues. The one jgshier discovered seems to occur when games are postponed, as both the PIT-DET and WSH-CIN games were yesterday. A totally separate issue is that MLB changed one of the URLs for getting stream data. I'll work something up ASAP.
Okay I just added a fix for the postponed games to the pull request I've created earlier. Both PIT - DET and WSH - CIN are working for me now and are streaming.

Pull Request: https://github.com/tonycpsu/mlbstreamer/pull/14
 
Old 03-30-2018, 06:04 PM   #5061
x-9er
LQ Newbie
 
Registered: Mar 2018
Posts: 24

Rep: Reputation: Disabled
Thanks to everyone working on fixing this to work for this season. I have one question, though: previously the HLS streams contained all available audio streams for that team: TV broadcast, spanish TV, radio, spanish radio, and park audio (when available). The streams being produced out of streamlink only contain, as far as I can tell, a single audio stream. Is this due to a change on MLB's end or something in streamlink that in muxing the streams is stripping away all but the primary audio?

Edit: It appears this is a function of streamlink that it only passes one video and one audio stream from any source. That's unfortunate, because with something like ffmpeg we'd have "-map 0" to copy all streams. "--hls-audio-select" exists as a streamlink option but it's unclear how to use it here. Again, it would be best to just have streamlink copy all streams and allow the user to select which one they want which is extremely easy to do in VLC or really any other media player.

Last edited by x-9er; 03-30-2018 at 11:25 PM.
 
Old 03-31-2018, 03:26 AM   #5062
tonycpsu
Member
 
Registered: Apr 2014
Posts: 71

Rep: Reputation: Disabled
Thanks much to everyone for the bug reports and especially the pull requests. Everything looks great on my end now. Really nice to be able to watch the Phillies game after a long day of traveling without having to fix more bugs.

The second "bug" I noticed this morning seems to not actually be a problem. The web interface does seem to be using a different URL now for one of the components, but the old URL seems to be working. Might switch to the new one just in case they disable the old one, but things look great for now.

To those who have open pull requests / issues -- I'll be getting to those ASAP. Should have more time to play with this stuff when I return home next week.
 
Old 03-31-2018, 04:28 AM   #5063
tonycpsu
Member
 
Registered: Apr 2014
Posts: 71

Rep: Reputation: Disabled
For those asking for home/away stream selection, my latest commit should allow you to pass a team code in and it should play the stream for that team, if available. Not extensively tested, but works for me so far.
 
Old 03-31-2018, 04:32 AM   #5064
tonycpsu
Member
 
Registered: Apr 2014
Posts: 71

Rep: Reputation: Disabled
x-9er, I feel your pain re: the missing radio/natural sound streams. I always liked to switch over to radio to hear their calls of the games from time to time. I haven't looked closely at the HLS plugin for streamlink yet to see what would need to be done to fix it, but if nobody else gets around to it, I'll take a look.
 
Old 03-31-2018, 08:20 AM   #5065
x-9er
LQ Newbie
 
Registered: Mar 2018
Posts: 24

Rep: Reputation: Disabled
Quote:
Originally Posted by tonycpsu View Post
x-9er, I feel your pain re: the missing radio/natural sound streams. I always liked to switch over to radio to hear their calls of the games from time to time. I haven't looked closely at the HLS plugin for streamlink yet to see what would need to be done to fix it, but if nobody else gets around to it, I'll take a look.
Thanks! I'm guessing the relevant part is here:

Code:
class MuxedHLSStream(MuxedStream):
    __shortname__ = "hls-multi"

    def __init__(self, session, video, audio, force_restart=False, ffmpeg_options=None, **args):
        substreams = map(lambda url: HLSStream(session, url, force_restart=force_restart, **args), [video, audio])
        ffmpeg_options = ffmpeg_options or {}

        super(MuxedHLSStream, self).__init__(session, *substreams, format="mpegts", **ffmpeg_options)
...where the ffmpeg_options need to include "map -0" or something along those lines. The problem is if there's a weird extra track that isn't video *or* audio that ffmpeg won't know how to handle, though there's another ffmpeg flag that can be added to have it ignore that.

Previously, mlbhls just stitched together the HLS packets without doing anything else to them so whatever was contained inside the stream came along with it.
 
Old 03-31-2018, 08:59 AM   #5066
CCRS8
LQ Newbie
 
Registered: Apr 2010
Location: NC, USA
Distribution: Xubuntu
Posts: 29

Rep: Reputation: 1
Long time user of mlbviewer (starting with the initial season when MLB moved to Silverlight, making this project necessary). Thanks to daftcat for all of his work over the years and now tonycpsu and others for picking up on this new project. It sounds promising.

Now that it appears that I need to learn how to do something other than 'svn up' to get this working for 2018, I have an honest question - in what scenarios are people using this for? I'm in no way questioning the need for this project, I'm just honestly curious and sort of polling the community. I've found over the years, between my roku and AtBat app, the need to watch on my computer itself has greatly diminished, and when I do watch on my computer, the browser player now seems to work OK on Linux. The one thing I liked about mlbviewer/mplayer instead of the browser is that I could pick a player size somewhere between regular and full-screen, and it was outside of a Firefox session so it wouldn't interfere with any web browsing you were doing. To me, that alone would be enough if my computer was my primary viewer for games.

Anyway, I probably will try to start using this new solution simply because I like to tinker and play with new things - just want to hear from others.
 
Old 03-31-2018, 09:08 AM   #5067
mkomko
Member
 
Registered: Mar 2010
Posts: 97

Rep: Reputation: 3
Smile

Quote:
Originally Posted by CCRS8 View Post
I have an honest question - in what scenarios are people using this for?
I like to watch all of my favorite team's games. But I don't have the time to do it in real time. And while I love baseball, sitting through a four hour game in front of a screen feels quite boring to me.

So I save the streams to my computer and then use the fast forward feature of my video player a lot to skip dead time. This allows me to watch a game in 30 to 45 minutes.

I do the same with NFL Gamepass, but that allows me to do that kind of fast forwarding with my cursor keys directly in the web player and it even is surprisingly and impressively fast. Sadly, the MLB.TV player does not have the same functionality.
 
Old 03-31-2018, 01:47 PM   #5068
tonycpsu
Member
 
Registered: Apr 2014
Posts: 71

Rep: Reputation: Disabled
Basically, what mkomko said. I have a Roku as well, but I've pretty much seen every pitch of every Phillies game in the past few years, something that would be impossible if I were watching the games on TV or having to use the browser interface and its crude seek controls. A lot of times I end up multi-tasking the game along with whatever my wife wants to watch on the big TV. I also play fantasy baseball, and with mlbviewer (and now mlbstreamer) I can watch multiple game streams simultaneously to check in on how my players are doing. (I actually have another app that I use to manage my fantasy teams that has the ability to launch an mlbiewer stream from the MLB standings screen, but I haven't replaced that code with mlbstreamer yet.)

Oh, and the MLB.tv browser interface chews a *lot* of resources. I have a pretty high-end Macbook Pro and it's just so slow. With MPV and mlbviewer/mlbstreamer, I can literally watch a dozen games at once.

Menawhile, there are a lot of other possible features that I have yet to integrate but hope to. MLB tracks timestamps of every individual play, and I'd like to add the ability to advance batter-by-batter or even pitch-by-pitch. The former was actually part of the MLB.tv web interface at one time, and getting that back would be great. The latter would just make it even easier to seek than it already is.
 
Old 03-31-2018, 03:43 PM   #5069
chrisVV
Member
 
Registered: Aug 2010
Posts: 548

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by x-9er View Post
Thanks! I'm guessing the relevant part is here:

Code:
class MuxedHLSStream(MuxedStream):
    __shortname__ = "hls-multi"

    def __init__(self, session, video, audio, force_restart=False, ffmpeg_options=None, **args):
        substreams = map(lambda url: HLSStream(session, url, force_restart=force_restart, **args), [video, audio])
        ffmpeg_options = ffmpeg_options or {}

        super(MuxedHLSStream, self).__init__(session, *substreams, format="mpegts", **ffmpeg_options)
...where the ffmpeg_options need to include "map -0" or something along those lines. The problem is if there's a weird extra track that isn't video *or* audio that ffmpeg won't know how to handle, though there's another ffmpeg flag that can be added to have it ignore that.

Previously, mlbhls just stitched together the HLS packets without doing anything else to them so whatever was contained inside the stream came along with it.
The effect of the --hls-audio-select option can be seen in line 393-397 of hls.py. The documentation states this option takes a locale but it can be seen from the code that in fact it can also take a stream name. The three audio stream names that MLB.TV currently supplies are "English" (which is the main TV feed), "Natural Sounds" (which seems intended to be the uncommentated "park" sounds), and "English Radio" (which seems to be intended to be the English radio commentary). There is no Spanish channel that I can see on any of this year's audio channels.

However choosing these alternative feeds seems to make no difference to the audio output, which seems to be the main TV commentary in all three cases. I am therefore not certain that MLV.TV actually provides audio overlay at present this year. It doesn't appear on this years browser interface for example, whereas it was on last years browser interface when using HLS.

Does anyone have something like a Roku or X box which actually provides audio overlay or spanish channels this year?
 
1 members found this post helpful.
Old 03-31-2018, 11:54 PM   #5070
jowski
Member
 
Registered: Aug 2007
Posts: 117

Rep: Reputation: 9
I have a Roku and the alternate audio has been available for the regular season. The other day I watched Fox Sports Detroit and listened to WXYT. I prefer radio audio to the tv stuff since it's usually more descriptive.

Jim
 
  


Reply

Tags
help, install, installation, instructions, seek, vlc, windows



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mlb.com gameday audio stream statmobile Linux - Newbie 6 05-06-2008 10:16 PM
link dies intermittently-seemingly at random- between win<->linux not linux<->linux?? takahaya Linux - Networking 10 03-09-2007 10:37 PM
triple boot linux/linux/linux No Windows involved toastermaker Linux - Newbie 12 03-02-2006 10:40 PM
Redhat (rhel v2.1) bootup problem with linux (linux vs linux-up) namgor Linux - Software 2 06-24-2004 02:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration