Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
...move that mlbdvr.py code into a downloader script. I'm officially not supporting mlbdvr.py anymore and it will probably disappear from future revisions. I've been testing the piped command to mplayer and I'm satisfied with the results. It can and does stay up for a full game which is all that's necessary to get the sourceforge users going starting next week. After next week, I can work on a download script for special cases like yours where playing immediately is not practical...
daftcat,
First let me thank you for all of your efforts! I followed mlbviewer last year, though I used my own hack to download games. I've relied on mlbdvr.py this year for my mlb fix So Thanks!
Reading the above quote about the disappearance of mlbdvr-download-only support is disappointing to me. I am a "non-premium" subscriber and downloading to watch later is my preferred method of watching. (I have two kids, 6 and 3, so needless to say, I *never* watch a live game )
However, I'll back up my griping with this. I am a developer and am willing to develop and maintain the "download for later viewing" portions of mlbviewer (or companion program) if you desire it and are willing to meet me somewhere like irc, skype, mumble, or something and give me the 30-minute up-to-speed-talk on how the mlb interaction works.
First let me thank you for all of your efforts! I followed mlbviewer last year, though I used my own hack to download games. I've relied on mlbdvr.py this year for my mlb fix So Thanks!
Reading the above quote about the disappearance of mlbdvr-download-only support is disappointing to me. I am a "non-premium" subscriber and downloading to watch later is my preferred method of watching. (I have two kids, 6 and 3, so needless to say, I *never* watch a live game )
However, I'll back up my griping with this. I am a developer and am willing to develop and maintain the "download for later viewing" portions of mlbviewer (or companion program) if you desire it and are willing to meet me somewhere like irc, skype, mumble, or something and give me the 30-minute up-to-speed-talk on how the mlb interaction works.
Thanks again for your efforts!
Download code is not going away, but I'm no longer going to support mlbdvr.py. Not only is it a hack job, it's a duplication of effort. If mlbdvr.py revision 170 or whatever the last working revision was works for you, keep it. For Monday, I want to get just the play model working and I know with the new bit of code I'm working on to support HD indicator and condensed games, mlbdvr is going to break if it hasn't already. I don't want to merge changes to mlbviewer back into mlbdvr because it's a duplication of effort.
That said, you have most of what you need for a download script in mlblistings.py and soapevent.py. After I get the sourceforge release posted next week, I'll likely expand the work on mlblistings.py to include the GameStream bits of MLBviewer (the library code) along with decent command-line support so you can say something like:
The nice thing about this approach is a) I won't have to support curses which put a lot of strain on what could and couldn't be done, b) I can implement the retry code that you rely on in mlbdvr that won't be in mlbviewer into the get_mlb_basic script itself, and c) I can add things like schedule the download so you really don't need the listings. You would just say, "I want to watch the KC game, so 'tape' it when it comes on." Since I don't have to mess with a curses gui (and the input event loop), you wouldn't mind if it said, "okay, boss, game comes on at 12:30, so I'm going to take a siesta until then."
I'm telling you that by this time next month, you're going to be as ready to shred mlbdvr as I am today because this script will be able to do things that I was straining to do confined to the mlbviewer "gui" interface.
But as of today, recording is not as high on my priority list as getting a decent playback release out first.
As for you premium users, well, you're just going to have to hack the get_mlb_basic script because letting you guys download games in HD is like pissing rocket fuel near an open flame. It's not something I want to do if I want MLBAM to continue to tolerate our project. That said, I have every confidence that you guys will figure it out anyway even without my help.
No, this won't work because the server starts up as 127.0.0.1.
But...
If you enter that url in your YDL browser, you should see a garbage stream pour down the web page as the nexdef attempts to stream to firefox. Again, I'm just guessing here. I won't be able to test this for awhile.
Okay, this will work if nexdef is actually working.
1. Edit nexdef.py and uncomment the sys.exit() line three lines from the bottom (exit just before the player_process = subprocess.Popen(...) line.
2. Find that url near the bottom that has the base64: string and the "describe" directory between the "adaptive-live" and "base64:". You may have to cat this into a file to remove any newlines your cut and paste job might create. Once you're certain there are no newlines...
That should bring up an XML page describing the streams available. Then simply remove the "describe/" part from the URL and hit <enter>. This will produce a Save/Open dialog for a file named something in base64: of type video/x-flv if nexdef is actually working, e.g. fetching the stream from the swarmcast network.
If that works for you, nexdef is working and now you have to figure out why mplayer isn't.
I watched the SD-LA game tonite (my Giants had the night off). I decided to try watching on the TV. I do not have an HDTV. I hooked up my Ubuntu laptop to my 26" standard Toshiba TV via S-Video out on the laptop. I got a 2200K stream of the game. In full screen mode, output to the TV, it looked pretty damn good. In fact I think it looked better than a standard digital TV (we have DISH Network) does. I told my wife it felt like I was cheating...watching an HD feed on my standard TV. I am not an expert on resolutions and differences between regular and all the flavors of HD and such so I can't really relate how good or comparable to real HDTV it looked. I can't wait to see how a 3000K stream looks in this setup though.
Congratulations! Your nexdef is working just fine.
Now you have to figure out why mplayer is unhappy.
Are you using the very latest mplayer built from svn source?
Code:
$ svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
$ cd mplayer
$ sh configure --enable-dynamic-plugins --prefix=/usr
$ make
$ sudo make install
Oo. I'm excited now. I did do a fresh install of mplayer yesterday but I just configured it with ./configure. I'll dump it again tonight and re-configure it how you say.
Quote:
Two questions:
1. Do you remove the 14*mp4 file in between retries (you should!)
2. How long does it take to "Core dumped"? Unfortunately, some mplayer developer thought it would be cute to put "Core dumped" as the "download complete" message for dumpstream. To me, this is just bad coding practice because it would a) confuse the user, and b) potentially mask a real core dump (like crying wolf.)
1. Where is it?
2. What a what? Please don't mistake me for someone who has a clue what he is doing
Oo. I'm excited now. I did do a fresh install of mplayer yesterday but I just configured it with ./configure. I'll dump it again tonight and re-configure it how you say.
1. Where is it?
2. What a what? Please don't mistake me for someone who has a clue what he is doing
1. If you use the nexdef.py test tool, it defaults to creating a dump file in the test directory (or in the mlbviewer directory if you call it as test/nexdef.py.) You should run "rm 14*mp4" between running the test tool.
2. See the next few posts (the most recent would be the most helpful.) It will help you verify that autobahn.jar is working even if mplayer isn't yet.
So if you just ran ./configure, it installs mplayer in /usr/local/bin by default. Almost every distribution installs their binary packages in /usr/bin. This means you've probably been using the distribution's package (without the latest fixes) all this time.
I had a pretty good coding night which means I should have a pretty code-free weekend.
WHAT'S NEW
+ rtmpdump integration for non-premium users (playback only!)
+ nexdef toggle 'n' key to toggle between nexdef and rtmpdump without having to change the configuration file
+ HD indicator - if the highlighted stream is in HD (if the call letters have "-HD" in them), a [HD] indicator will "light up" on the status line. "[--]" is the non-HD indicator.
+ condensed games
So where are we for this first Sourceforge release?
WHAT WORKS:
Non-premium (Playback only!):
Archived video
Archived audio
Live audio
Condensed games
Top Plays
Premium Users (Playback only!):
Archived video
Archived audio
Live video
Live audio
Condensed games
Top Plays
Speed preference through max_bps
HD indicator
Home and Away feeds
video_follow
WHAT DOESN'T WORK:
Non-premium users:
Live video (there is an open issue with ffmpeg and we expect a quick resolution)
Recording (dumpstream won't work for video because I didn't put the retry code into mlbviewer. Be patient. A better downloader script is in the works.)
Game recaps (they are out there on one of the xml's. I'm just not parsing them yet.)
Premium users:
Quality Bar (or turning off the adaptive streaming)
Jump to Innings
NOTES:
Non-premium users will need rtmpdump version 1.5. I'm not going to support version 1.4. There is a patch for version 1.5 in the rtmpdump-patches directory.
Premium users will need the autobahn.jar from http://mlb.com/nexdef-jars/. Premium users will also need to use the latest svn source of mplayer as the h264 fix is only about two or three weeks old (much to young to be in any distro's package yet.) Probably wouldn't hurt for non-premium users to use the latest mplayer source as well.
Finally, mlbdvr.py has been removed from SVN. You can still checkout an older version but you should keep it out of your mlbviewer directory. Future svn updates (including this one) will remove mlbdvr.py if it's in your mlbviewer directory. I do plan on writing a downloader script but I won't support mlbdvr.py.
I suspect there are still a few soft spots in the code and have left a few places where mlbviewer can crash if it encounters an error. This is intentional as I want to see if the logic is sane and if not, what's going on.
Video and audio follow, and live audio are probably the weakest spots as far as my testing.
I'm very impressed with streaming rtmpdump into mplayer. So much so, that for my low end machine, I actually prefer it over the nexdef because the stream is much more stable. Maybe as the season progresses, the stability of nexdef will improve.
Good job guys! We've come a long ways and your testing and investigations and troubleshooting have made this quite a package in such a short time. Unless you guys find me some good bugs, I'm going to spend this weekend on the documentation and collecting all the tips and tricks that have accumulated on these pages.
So if you just ran ./configure, it installs mplayer in /usr/local/bin by default. Almost every distribution installs their binary packages in /usr/bin. This means you've probably been using the distribution's package (without the latest fixes) all this time.
Bit of a noob question, but what's the best way to get rid of mplayer before re-svning-it? Can I simply su and delete from /usr/local/bin and /usr/bin?
Not sure if I have been using the distrib package as each time I delete mplayer I type mplayer in a terminal and get back "bash: mplayer not found".
I'll retry tonight before the Cubs/Marlins game at 7.20PM.
Ahhhhhhhhh don't do that...! If you have mplayer installed through your distro's package management system, remove it using that system. If you have a previous version from svn, no need to remove it. Just install over it.
If you just delete binaries, you will leave behind all the libraries and things will get very, very badly broken.
I did all you said and it's DEFINITELY using the right version of mplayer but when mplayer starts (or tries to) I get these errors in the autobahn.jar terminal:
Exception in thread "AdaptiveMediaScheduler-1999097233" java.lang.ExceptionInInitializerError
at java.lang.Class.initializeClass(libgcj.so.7rh)
at com.onionnetworks.net.AbstractHttpURLConnection.<init>(AbstractHttpURLConnection.java:27)
at com.onionnetworks.directcache.DirectCacheConnection.<init>(DirectCacheConnection.java:134)
at com.onionnetworks.directcache.DirectCacheConnection$3.openConnection(DirectCacheConnection.java:1690 )
at java.net.URL.openConnection(libgcj.so.7rh)
at com.swarmcast.livestreamer.adaptive.BasicMediaDownloader.download(BasicMediaDownloader.java:100)
at com.swarmcast.livestreamer.adaptive.MediaScheduler.run(MediaScheduler.java:197)
at java.lang.Thread.run(libgcj.so.7rh)
Caused by: java.util.regex.PatternSyntaxException: At position 9 in regular expression pattern:
At position 0 in regular expression pattern:
unsupported name ASCII
^([\p{ASCII}&&[^\p{Cntrl}\p{Blank}()<>@,;:\"/\[\]?={}]]+)[ \t]*:[ \t]*(.*?)[ \t]*$
^
at java.util.regex.Pattern.<init>(libgcj.so.7rh)
at java.util.regex.Pattern.compile(libgcj.so.7rh)
at java.util.regex.Pattern.compile(libgcj.so.7rh)
at com.onionnetworks.net.HttpHeadersImpl.<clinit>(HttpHeadersImpl.java:763)
at java.lang.Class.initializeClass(libgcj.so.7rh)
...7 more
Caused by: gnu.java.util.regex.REException: At position 9 in regular expression pattern:
At position 0 in regular expression pattern:
unsupported name ASCII
at gnu.java.util.regex.RE.getRETokenNamedProperty(libgcj.so.7rh)
at gnu.java.util.regex.RE.parseCharClass(libgcj.so.7rh)
at gnu.java.util.regex.RE.initialize(libgcj.so.7rh)
at gnu.java.util.regex.RE.<init>(libgcj.so.7rh)
at gnu.java.util.regex.RE.initialize(libgcj.so.7rh)
at gnu.java.util.regex.RE.<init>(libgcj.so.7rh)
at gnu.java.util.regex.RE.<init>(libgcj.so.7rh)
at java.util.regex.Pattern.<init>(libgcj.so.7rh)
...11 more
Caused by: gnu.java.util.regex.REException: At position 0 in regular expression pattern:
unsupported name ASCII
at gnu.java.util.regex.RETokenNamedProperty.getHandler(libgcj.so.7rh)
at gnu.java.util.regex.RETokenNamedProperty.<init>(libgcj.so.7rh)
at gnu.java.util.regex.RE.getRETokenNamedProperty(libgcj.so.7rh)
...18 more
I am getting "There was a parser problem with the listings page" error when I load mlbviewer.py, any ideas? Also, how do I run the patch for rtmpdump?
Thanks
For the parser problem, add:
Code:
debug=True
to your config file post the full traceback to pastebin.com.
For the rtmpdump patch, make sure you have rtmpdump version 1.5 and untar it somewhere. Then you just run the Patch.sh in the rtmpdump-patches. It will ask you where you untarred rtmpdump, perform the patches, and tell you if they applied successfully.
I am getting "There was a parser problem with the listings page" error when I load mlbviewer.py, any ideas? Also, how do I run the patch for rtmpdump?
Thanks
Found the problem. Reproduced it. Fixed it. Checked it in in already.
Give the new rev a go and let me know if you still have parser problems.
On my development machine, I leave debug=True in the config file so I usually catch these. I guess they added some media elements that weren't there earlier this morning.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.