LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 05-09-2017, 05:10 PM   #4951
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,878

Rep: Reputation: 83
HLS ("nexdef") for audio and condensed games?


Hi guys,

The author of mlbhls has ceased development support of it. If there is another developer here who wants to pitch in some code, I'd like to get HLS audio and condensed games supported. I don't know how much longer MLB.TV will support RTMP now that all media has an HLS option.

I have added test/nexdefaudio.py and test/nexdefaudiodl.py to SVN revision 671.

At a minimum, you'll need to add another line to the case statements for the audio bandwidth in mlbhls/mlb.c. What else is needed, I'm not sure. It's segfaulting after "Fetching Master URL".

To test, make sure you have at least made that change in mlbhls, rebuilt, and reinstalled. Then find a game to stream via mlblistings.py. Use the E: value for test/nexdefaudio.py or test/nexdefaudiodl.py (this one downloads the audio to a file, or it would if mlbhls wasn't falling over.)

Once we have audio working, I can give you another tool in test directory for condensed games. I will also integrate the test code into the mlbviewer/mlbplay tools once it is tested and working.

Thanks in advance!
 
Old 05-10-2017, 03:50 AM   #4952
larshenric
Member
 
Registered: Aug 2012
Location: Flensburg, Germany
Distribution: Ubuntu 12.04
Posts: 66

Rep: Reputation: Disabled
Quote:
Originally Posted by daftcat View Post
What day and what game? Don't make me guess or I'll come back with "works for me."

Could be a firewall issue. You said you used your laptop at work. That's the same output I get from work except mplayer gets nothing to play so its window never appears. The work firewall filters out RTMP.

Can you try again from home?
Thanks for replying! :-)
Unfortunately condensed games don't work for any game, neither an laptop at work nor on laptop at home. Live and re-live games work fine. And I'm using the "traditional" version, without nexdef/mlbhls.
Hm...
 
Old 05-10-2017, 01:22 PM   #4953
bunglebungle
LQ Newbie
 
Registered: Nov 2007
Posts: 14

Rep: Reputation: 0
There is active development on the MLB.TV Kodi plugin, which is also Python. I just tried it and was able to start a condensed game from yesterday. Perhaps some of that code could be utilized here? I'd actually love to see some of the code be shared because I'd love for the Kodi plugin to be able to start at certain innings like this can. I was going to work on integrating that but haven't found time yet.
 
Old 05-11-2017, 01:48 PM   #4954
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,878

Rep: Reputation: 83
Quote:
Originally Posted by bunglebungle View Post
There is active development on the MLB.TV Kodi plugin, which is also Python. I just tried it and was able to start a condensed game from yesterday. Perhaps some of that code could be utilized here? I'd actually love to see some of the code be shared because I'd love for the Kodi plugin to be able to start at certain innings like this can. I was going to work on integrating that but haven't found time yet.
I don't have the time or frankly the desire to take this on. My day job has been overwhelming enough that if I can leave the laptops closed when I get home, all the better. That said, if you wanted to take a stab at it, I'd be happy to help you understand my code (if I can understand it myself this many years later.)

I believe Kodi started with mlbviewer code from years and years ago. But innings support should be there. That's a very old feature. It's more likely they never implemented a frontend for it.
 
Old 05-11-2017, 02:25 PM   #4955
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,878

Rep: Reputation: 83
SVN revision 672: Fix for condensed games

Quote:
Originally Posted by larshenric View Post
Thanks for replying! :-)
Unfortunately condensed games don't work for any game, neither an laptop at work nor on laptop at home. Live and re-live games work fine. And I'm using the "traditional" version, without nexdef/mlbhls.
Hm...
It looks like condensed games no longer require rtmpdump. I checked in a new revision (672) that treats condensed games like highlights (no rtmpdump needed.) As a bonus, there is now support for the 2500K stream for condensed games. I'm not sure when this stream speed option showed up. But I noticed it while digging into why CG's weren't working. Your non-nexdef speed= setting will be used to determine which condensed stream to use. If your speed is 1800, use the 1800 stream. If it's 2500, use the 2500 stream. Default to 1200K stream for any other speed setting.

If you're not currently on the SVN version or you need help remembering how to do checkout/update, "grep svn README".

Code:
user@mlblive-debian:~/mlbviewer-code$ grep svn README
svn checkout https://svn.code.sf.net/p/mlbviewer/code/trunk mlbviewer-svn
cd mlbviewer-svn
svn up
 
2 members found this post helpful.
Old 05-15-2017, 05:26 AM   #4956
icelancer
LQ Newbie
 
Registered: May 2013
Posts: 26

Rep: Reputation: Disabled
Stumbled back on this thread 4 years later. Have a need to use it again. Thanks so much for all your hard work. Pleasantly surprised it's still kicking

Ran the install and got it all working just like it was four years ago.
 
Old 05-15-2017, 11:06 AM   #4957
larshenric
Member
 
Registered: Aug 2012
Location: Flensburg, Germany
Distribution: Ubuntu 12.04
Posts: 66

Rep: Reputation: Disabled
Damned... I don't get it...
I updated version (672, right?), but don't know what to do with those config settings you mentioned.
Here are my settings:

video_player=mplayer -cache 4096

audio_player=mplayer -cache 128

favorite=chc

use_nexdef=0

speed=1200

min_bps=1200

max_bps=2400

adaptive_stream=0

Everything works except condensed games (always the same error message quoted above) and highlights (image of error message attached).

Any other hint? Thanks again a lot for all your work and help!!
Attached Thumbnails
Click image for larger version

Name:	mlbviewer.jpeg
Views:	10
Size:	23.4 KB
ID:	25018  
 
Old 05-15-2017, 04:00 PM   #4958
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,878

Rep: Reputation: 83
Quote:
Originally Posted by larshenric View Post
Damned... I don't get it...
I updated version (672, right?), but don't know what to do with those config settings you mentioned.
Here are my settings:

video_player=mplayer -cache 4096

audio_player=mplayer -cache 128

favorite=chc

use_nexdef=0

speed=1200

min_bps=1200

max_bps=2400

adaptive_stream=0

Everything works except condensed games (always the same error message quoted above) and highlights (image of error message attached).

Any other hint? Thanks again a lot for all your work and help!!
Two suggestions:

1. Try testing with an individual highlight rather than the playlist (highlight a game, select t to get the highlights.)
2. Enable debug with the d key. Then select an individual highlight or condensed game. It will display the mplayer command without executing it. Copy and paste that to a terminal. If the command extends over two lines, you will have to copy and paste to an editor and reconstruct the command as a single line. It's because there will be newlines in curses output (the mlbviewer GUI) that get copied when you highlight and copy-paste the mlbviewer window.

Try the individual commands in a separate terminal where curses/mplayer won't immediately overwrite the output.

Check your top_plays_player= setting too. This is used first before video_player= setting allowing you to specify different cache/playback settings for highlights vs full games. If you don't have a top_plays_player= setting, it will default to video_player instead.
 
Old 05-15-2017, 04:17 PM   #4959
larshenric
Member
 
Registered: Aug 2012
Location: Flensburg, Germany
Distribution: Ubuntu 12.04
Posts: 66

Rep: Reputation: Disabled
Quote:
Originally Posted by daftcat View Post
Two suggestions:

1. Try testing with an individual highlight rather than the playlist (highlight a game, select t to get the highlights.)
Okay... Before going to sleep I just tried this first suggestion... Result: I don't get any top play no matter which game and date I try. Always the same message "No top plays available"
Is this normal?

I'll try your 2. suggestion tomorrow...
 
Old 05-16-2017, 02:08 PM   #4960
larshenric
Member
 
Registered: Aug 2012
Location: Flensburg, Germany
Distribution: Ubuntu 12.04
Posts: 66

Rep: Reputation: Disabled
Quote:
~/mlbviewer$ rtmpdump -o - -r http://mediadownloads.mlb.com/mlbam/...6/1392700783/1
RTMPDump v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
WARNING: Unknown protocol!

Connecting ...
ERROR: RTMP_Connect0, failed to connect socket. 110 (Connection timed out)
lars@acer:~/mlbviewer$ 494909569077/asset_1200K.mp4 | mplayer -cache 4096 -
bash: 494909569077/asset_1200K.mp4: Datei oder Verzeichnis nicht gefunden
MPlayer 1.2.1 (Debian), built with gcc-5.3.1 (C) 2000-2016 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing -.
Reading from stdin...
Cache fill: 0.00% (0 bytes)

libavformat version 56.40.101 (external)


Exiting... (End of file)
So, I tried 2. suggestion, this is the result message (not knowing if I did everything right...)

The setting for top_plays-player=... What do I put in? mplayer again? And a certain -cache value? If so, which one...?
 
Old 05-16-2017, 03:32 PM   #4961
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,878

Rep: Reputation: 83
Quote:
Originally Posted by larshenric View Post
So, I tried 2. suggestion, this is the result message (not knowing if I did everything right...)

The setting for top_plays-player=... What do I put in? mplayer again? And a certain -cache value? If so, which one...?
That doesn't look like 672. The command should be a more normal looking mplayer command like:

Code:
mplayer -cache 4096 http://mediadownloads.mlb.com/mlbam/mp4/2017/05/14/1387768983/1494798548610/asset_1200K.mp4
Also, you have to copy-paste into an editor and remove the newline. You cannot just copy-paste directly from the mlbviewer window or your command will be split across two lines like so:

Quote:
lars@acer:~/mlbviewer$ 494909569077/asset_1200K.mp4 | mplayer -cache 4096 -
bash: 494909569077/asset_1200K.mp4: Datei oder Verzeichnis nicht gefunden
Can you do "svn info" and verify it says Revision: 672? If you do an "svn up" and "svn info" doesn't show 672, move this directory aside and proceed with the "svn checkout" command in the README.

For top_plays_player, if you don't have it specified, you don't need it. It is there so that you can specify different cache values for highlights and condensed games vs regular broadcasts.
 
Old 05-16-2017, 05:09 PM   #4962
larshenric
Member
 
Registered: Aug 2012
Location: Flensburg, Germany
Distribution: Ubuntu 12.04
Posts: 66

Rep: Reputation: Disabled
Revision check:
Quote:
~/mlbviewer/mlbviewer-svn$ svn info
Pfad: .
Wurzelpfad der Arbeitskopie: /home/lars/mlbviewer/mlbviewer-svn
URL: https://svn.code.sf.net/p/mlbviewer/code/trunk
Relative URL: ^/trunk
Basis des Projektarchivs: https://svn.code.sf.net/p/mlbviewer/code
UUID des Projektarchivs: d37ac8f2-af4a-0410-91f3-abd50a2159f9
Revision: 672
Knotentyp: Verzeichnis
Plan: normal
Letzter Autor: daftcat75
Letzte geänderte Rev: 672
Letztes Änderungsdatum: 2017-05-11 20:15:53 +0200 (Do, 11. Mai 2017)
The result of the Copy-and-paste-oneline-mplayer-command shows the attached image...

Could a complete new install be usefull? How would I have to manage a complete uninstall?
Attached Thumbnails
Click image for larger version

Name:	Bildschirmfoto_2017-05-16_23-08-25.png
Views:	13
Size:	87.1 KB
ID:	25027  
 
Old 05-19-2017, 01:50 AM   #4963
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,878

Rep: Reputation: 83
I don't understand how you are using revision 672 but still seeing the old behavior.

Try this:

Code:
cd /tmp
svn checkout https://svn.code.sf.net/p/mlbviewer/code/trunk mlbviewer-code
cd mlbviewer-code
./mlbviewer.py
Select a game where condensed game is available and play condensed game with "c" key.

If this works, maybe remove where you have mlbviewer now, and cp that /tmp/mlbviewer-code over. I don't see any problems with your config so you don't need to touch that.

The only other thing I can think of is that there may be one or two distribution packages like apt or yum that have centrally installed the python code but the svn update has no such procedure to replace/upgrade the centrally installed package (the site-package.) If you used one of those, then remove it with the same tool you used to install it. Then proceed to the example above. If that works, mv /tmp/mlbviewer-code $HOME. Then if you have any aliases or icons to mlbviewer, point them to $HOME/mlbviewer-code/mlbviewer.py.
 
Old 05-19-2017, 11:18 AM   #4964
larshenric
Member
 
Registered: Aug 2012
Location: Flensburg, Germany
Distribution: Ubuntu 12.04
Posts: 66

Rep: Reputation: Disabled
THE TMP-THING WORKED...!! :-))

Thanks again so much for the help and your work. It's such a great tool, fitting perfectly with the whole Linux idea... ;-)
 
Old 05-22-2017, 07:52 PM   #4965
icelancer
LQ Newbie
 
Registered: May 2013
Posts: 26

Rep: Reputation: Disabled
daftcat,

Can't find out where to send a donation. Can you provide me a Paypal email or link otherwise? Thank you.
 
  


Reply

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 11:16 PM
link dies intermittently-seemingly at random- between win<->linux not linux<->linux?? takahaya Linux - Networking 10 03-09-2007 11:37 PM
triple boot linux/linux/linux No Windows involved toastermaker Linux - Newbie 12 03-02-2006 11:40 PM
Redhat (rhel v2.1) bootup problem with linux (linux vs linux-up) namgor Linux - Software 2 06-24-2004 03:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 08:40 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration