LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 04-03-2009, 03:40 PM   #1081
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,876

Rep: Reputation: 83

Quote:
Originally Posted by Onip View Post
needed to be restarted at somewhere near 82%

I left my pc downloading and I found the "Hope it worked" screen. Firstly I tought that it would have finished the donwload, but the last couple of innings were missing
I'm making changes in the recorder process management to look at the return code before declaring "Command completed." The basic algorithm is, not including mlb errors like login and logout errors, the recorder process gets five retries. If the return code is non-zero and there are retries remaining, kick off a new soap request and rtmpdump process. If the retries get exhausted and the return code is still non-zero, put up a "out of retries but return code non-zero" error. Assuming there's nothing wrong with the file or the server, you should be able to re-select the stream from the list for another five retries.

Still, assuming there's nothing wrong with the partial game you downloaded, you might still be able to resume the download by re-selecting it from the list.

Assuming rtmpdump and mlbdvr play together nicely even with the required restarts, this is a huge advantage over last year being able to resume interrupted downloads.

I might have the new code checked in later today or tonight if I can figure out this live games thing. Otherwise, there isn't much advantage to having the new code since it's still only the games listed on that custom page (minus the duds) that would be available to you.
 
Old 04-03-2009, 07:21 PM   #1082
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,876

Rep: Reputation: 83
Bad news: live games not supported by rtmpdump

As near as I can tell from the Wireshark trace, there is a FCSubscribe object (element or whatever it's called in AMF/RTMP-speak) that needs to be sent to subscribe to the stream on the content servers. This does not appear to be supported by rtmpdump.

I'll be looking closer at the wireshark traces, the rtmpdump source, and any google information I can find on AMF/RTMP. If there are some C++ programmers who want to help out, I can furnish the wireshark traces.

Here's a thread that sort of gives an algorithm.
http://flowplayer.org/forum/5/14450

So that seems to be the state of live games.

I've also posted a message to the rtmpdump forums. If necessary, I can buy him a month of mlb.tv to test against with the donations I've received already.

Lucky for you international folks, this probably won't be an issue for archived games.
 
Old 04-03-2009, 10:54 PM   #1083
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,876

Rep: Reputation: 83
SVN revision 128: Read carefully

Checked in a lot of changes.

If you want to continue to test with the WBC games (because we know at least a few of them work), make a bookmark of them using the 'm' key. Access your bookmarks in the 'b' screen. With revision 128, you will get the real listings. This is a good time to test the date navigation like forward and backward and jump and return.

If you use mlbdvr.py in single window mode (e.g. your player command is not an xterm -e command, you'll want to comment out the printf's in rtmpdump that print out the download status. There are four of them and you can find them by searching for "KB" in rtmpdump.cpp. Really, they aren't necessary since the 'ls' output will show you that the file is growing. In this latest revision, unlike previous revisions, I don't let the player process block the 'ls' updates so where you used to see the rtmpdump statusline, you'll now see mplayer's status line (unless you're not using single window mode.) Now if you didn't comment out the printf's in rtmpdump.cpp, you'll have the two competing for that line and it will get really ugly, really fast.

I added the process poll() status and retry counters mostly for my own debugging but you may also find them useful.

You can toggle between record_only mode and play/record mode with the 'o' key when in the recorder status screen. The status will be updated on the screen in the next refresh interval.

You can cancel a player by quitting the player process and then hitting 'o' to switch to record only. You can cancel a record with a Ctrl-C which sets the retries to zero, hence the "out of retries" message you'll get before returning to the listings. When the recorder finishes before the player, DO NOT "press any key to continue" if you are in single window mode because the player process that continues to run will mess up your screen.

I made some minor fixes like the status line and the media indicators. You will not be able to use the old 2008 code for listings after 3/30/09. But that code won't work for 2009 in a few days anyway. It will still work for 2008 and 2007 games.

I'm doing my best to make the "uncaught error"s more meaningful. I'm not sure what JiBX marshalling is so that error is left as is.

WHAT WORKS:

The player / recorder process management code is there but probably still unstable. I do a combination of checking for process return codes (the poll() status on refresh) and retries. If a process returns zero or exhausts its retries, I consider that process done and won't restart it.

The listings should work, though I haven't implemented blackout (local or national.)

WHAT DOESN'T WORK:

Gameday audio doesn't work because there's been no public beta to figure out how they are going to do it.

Live games don't work because of a limitation in rtmpdump. I'm looking into it this weekend to see how hard it would be to write myself. I'm not great with C++ but I can do a little monkey-see, monkey-do code work that might get us what we need.

Archived games are hit and miss. I don't display which ones are archived yet because I haven't looked too deeply at the xml yet to see what's available to me. If it's in Final, and it doesn't have a (no media available) indicator, you can test it. Archived games aren't likely to work reliably until next week.

I would like to add code to remove the 5 byte stubs of unsuccessful rtmpdump streams (NetStream.Stop and NetStream.Fail) but I haven't yet. You'll need to remove these manually or the resume code will complain that you are trying to resume an invalid FLV file.

DON'T INSTALL these SVN revisions globally (setup.py) if you don't have to. These libraries are still considered unstable. If I could decrement the version number to reflect that, I would. But that would confuse the heck out of y'all. :-) Is there something more alpha than alpha?

Good luck and remember to report bugs.
 
Old 04-04-2009, 01:42 PM   #1084
goffa
LQ Newbie
 
Registered: Jul 2004
Location: Montana
Distribution: Arch, gentoo
Posts: 5

Rep: Reputation: 0
working 4/4/09

Didn't read all of the entries, but i thought i'd mention that i'm watching the mets vs the red sox. I'm using opera on archlinux.

When i tried to use firefox it looks like its going to work, but the player says connecting to 127.0.0.1. So, guess ill stick with opera.
 
Old 04-04-2009, 01:53 PM   #1085
goffa
LQ Newbie
 
Registered: Jul 2004
Location: Montana
Distribution: Arch, gentoo
Posts: 5

Rep: Reputation: 0
well, after reading on previous posts, i disabled adblock plus. I can now view the games on firefox.
 
Old 04-05-2009, 03:37 AM   #1086
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,876

Rep: Reputation: 83
Quote:
Originally Posted by goffa View Post
well, after reading on previous posts, i disabled adblock plus. I can now view the games on firefox.
It's a big boon that they support Linux this year, at least for the default player. It would still be nice if they could port nexdef.

Last year, it wasn't this easy though. Most of the posts in this thread revolve around a python+curses program written last year called mlbviewer. This year they made a lot of changes to the mlb.com authorization, stream location, and content delivery network that's not nearly so easy for mlbviewer. Still, a lot of people like mlbviewer and I'm going to do my best to get it working again for the 2009 season.
 
Old 04-05-2009, 04:05 AM   #1087
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,876

Rep: Reputation: 83
I'm currently recording/watching the Cubs at Yankees game. There still seems to be quite a bit of instability in both the record and play processes, as well as login/logout, and uncaught errors. Looks like I have some hardening to do. But at least mlbdvr supports archived games.

As for live games, it wasn't nearly so hard to implement the FCSubscribe method in rtmpdump like I thought it might be but I'm still not able to get live games working. Tomorrow I will most likely do byte-wise comparison of the mlb messages vs my messages to see if I can't finally get this working.
 
Old 04-05-2009, 02:46 PM   #1088
bodly
LQ Newbie
 
Registered: Mar 2009
Distribution: Kubuntu
Posts: 24

Rep: Reputation: 16
I got nexdef working under linux using the flash player. You need to download the lastest version here and unpack the autobahn.jar file. Then on the command line run java -jar autobahn.jar.

I was amazed that it worked through the firewall at work. Let me know if you need any help getting it working and I'll do what I can.

bodly
 
Old 04-05-2009, 03:42 PM   #1089
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,876

Rep: Reputation: 83
Quote:
Originally Posted by bodly View Post
I got nexdef working under linux using the flash player. You need to download the lastest version here and unpack the autobahn.jar file. Then on the command line run java -jar autobahn.jar.

I was amazed that it worked through the firewall at work. Let me know if you need any help getting it working and I'll do what I can.

bodly
Can you remind me how to unpack the dmg? I have an older dmg and finally got it to an img (don't remember how) but the Archive.pax.gz won't open. Gzip says it's not in gzip format and pax displays cpio errors.

Please post the steps and I'll include them in the howto after I've verified nexdef is working.

By the way, I might have live games working. I'm downloading the Dodgers-Giants game right now but it's not exactly playing yet. I'll try on another machine. If it works on the other machine, I'll post my modifications to rtmpdump and check in the modified soapevent.py file. Once I've verified it works for playing without having to transcode, I'll merge the changes into mlbdvr.py.
 
Old 04-05-2009, 07:24 PM   #1090
Wolfvorkian
Member
 
Registered: Sep 2007
Distribution: Arch
Posts: 108

Rep: Reputation: 15
Quote:
Originally Posted by daftcat View Post
It's a big boon that they support Linux this year, at least for the default player. It would still be nice if they could port nexdef.

Last year, it wasn't this easy though. Most of the posts in this thread revolve around a python+curses program written last year called mlbviewer. This year they made a lot of changes to the mlb.com authorization, stream location, and content delivery network that's not nearly so easy for mlbviewer. Still, a lot of people like mlbviewer and I'm going to do my best to get it working again for the 2009 season.
I certainly hope you'll continue to develop Mlbviewer. I prefer it even if the flash player is working in a Linux browser right now.

Also, who can say it will work next year? If you lose interest in keeping Mlbviewer up, we could very well be SOL next year when they decide to make some more drastic changes.

I could go on and on .... but I'll end with simply... thanks again for what you have so creatively accomplished thus far.
 
Old 04-05-2009, 07:30 PM   #1091
bodly
LQ Newbie
 
Registered: Mar 2009
Distribution: Kubuntu
Posts: 24

Rep: Reputation: 16
Quote:
Originally Posted by daftcat View Post
Can you remind me how to unpack the dmg? I have an older dmg and finally got it to an img (don't remember how) but the Archive.pax.gz won't open. Gzip says it's not in gzip format and pax displays cpio errors.

Please post the steps and I'll include them in the howto after I've verified nexdef is working.
I used 7zip on windows to do it. I had a lot of issues getting the dmg file unpacked under linux, so I gave up and took the easy way out. And the jar file is like 10 directories down from the top level.

Since it's such a pain in the butt, I've put autobahn.jar up on my webserver. If this is a breach of terms of service or something I'll take it down if mlb requests. But I hope they don't. I'm just trying to make things better for us linux people. You can get it here.

Great news that live streaming might work. I'm impressed how quickly you've gotten this all to work. Or at least semi-work. :-)

EDIT: Edited to point to the official MLB repository for nexdef jar files. I've also removed the file from my server.

Last edited by bodly; 04-10-2009 at 07:25 PM.
 
Old 04-06-2009, 01:12 AM   #1092
dmandell
Member
 
Registered: Apr 2008
Posts: 30

Rep: Reputation: 15
Quote:
Originally Posted by daftcat View Post
Still, a lot of people like mlbviewer and I'm going to do my best to get it working again for the 2009 season.
I for one would greatly appreciate it if mlbviewer could be made to work. I really liked the interface, and don't really need all of the bells and whistles MLB provides (I'm an audio-only user).

Thanks a ton for the work you've put in on this,

Doug
 
Old 04-06-2009, 01:58 AM   #1093
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,876

Rep: Reputation: 83
It seems that audio and video are streamed separately and there are many more audio packets than video packets which produces, "Too many audio packets in buffer" errors when trying to play. The video packets might also be compressed and on top of that, may be referenced frames. I'm not really sure on this. But when I play the file as "mplayer -novideo", the audio stream plays perfectly. When I play with "mplayer -nosound", mplayer says things like:

Code:
[h264 @ 0x88aa1a0]AVC: Consumed only 1 bytes instead of 336
[h264 @ 0x88aa1a0]no frame!
Error while decoding frame!
I could release the rtmpdump patches and work in a request for MLB_FLASH_164K_STREAM as a temporary method of implementing gameday audio until I figure out how they do the audio. Of course, that's still a lot of bandwidth and a lot of wasted disk space just to get an audio stream. Also, I'm not entirely sure they're keyed up to support anything other than MLB_FLASH_800K_STREAM at the moment.

As for the video, I need to learn more about h264 and flash media streaming.

My biggest hope is that since Adobe announced it would release the flash media specifications this year, some brave Linux developer will make a high quality streamer client that sorts out whatever weirdness might happen on the network.
 
Old 04-06-2009, 02:17 AM   #1094
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,876

Rep: Reputation: 83
SVN revision 131: rtmpdump patch and minor fixes

Quick summary of revision 131

* Patch your rtmpdump with the Patch.sh script in rtmpdump-patches.
* Tweaking went into test/soapevent.py to support streaming of live games. This does not really work yet. I'm making it available to those who want to test it and see what they can make of the recorded stream.
* To use test/soapevent.py, find the event-id by highlighting a game listing in mlbdvr.py, then open the 'z' screen. Quit mlbdvr.py. Execute test/soapevent.py with the event-id as the argument.
* Added the auth string to the play path in archived stream requests in mlbdvr.py.

For those brave souls who want to see what they can make of live streams, I have included a patch file for rtmpdump that implements the necessary FCSubscribe() method for subscribing to the live game stream.

In the rtmpdump-patches directory, run the Patch.sh script and tell it the location of your rtmpdump source directory.

See below for an example:

Code:
matthew@tango:~/mlbtv/svn/mlbviewer/rtmpdump-patches$ ./Patch.sh 
Enter path to rtmpdump source directory: /home/matthew/source/rtmpdump
Source directory : /home/matthew/source/rtmpdump
Patch file       : /home/matthew/mlbtv/svn/mlbviewer/rtmpdump-patches/mlbviewer-rtmpdump.patch
Applying patch...
patching file log.h
patching file rtmp.cpp
patching file rtmpdump.cpp
patching file rtmp.h
Patch succeeded.  Please run 'make clean' before 'make'.
Remember to cp rtmpdump to a directory in your path.
matthew@tango:~/mlbtv/svn/mlbviewer/rtmpdump-patches$
For those curious types, the patch includes the following:

[ul]
[li]Disable debug.[/li]
[li]Disable printf() of KB and % status to work better with mlbdvr.py in dual-process mode (e.g. player and recorder running at the same time.)[/li]
[li]Implement a -b|--subcribe option that takes the name of the stream to subscribe to (I have no idea whether this will work for any other streams other than the mlb.com streams.[/li]
[li]Implement public methods to send FCSubscribe message.[/li]
[li]Increase the allocated message body for PlayStream commands to accommodate the auth string that mlb.com requires.[/li]
[/ul]
 
Old 04-06-2009, 02:30 AM   #1095
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,876

Rep: Reputation: 83
Quote:
Originally Posted by dmandell View Post
I for one would greatly appreciate it if mlbviewer could be made to work. I really liked the interface, and don't really need all of the bells and whistles MLB provides (I'm an audio-only user).

Thanks a ton for the work you've put in on this,

Doug
I'll do what I can but this conversion to flash has really thrown a wrench in the machine. I'm hoping that 1) mlb.com sticks with this technology for more than one season, and 2) Adobe makes good on their promise to open the Flash Media specification and a better flash player comes out than rtmpdump.

In the meantime, I continue to read and learn about Flash Media like everyone else who has gone down this road (Google and Wireshark. ;-)

For audio-only, it seems like that should be easy enough to implement once I've seen a working example of how mlb.com has implemented it themselves. In the meantime, if you feel up to a bit of hacking, you can try the following:

Code:
0. Update to the latest svn revision and patch your rtmpdump using Patch.sh in rtmpdump-patches directory.

1. Use the 'z' screen in mlbdvr.py to locate the event-id (it looks like "14-257635-2009-03-26")

2.  Try test/soapevent.py with the event-id plus the scenario which can be one of the following: "MLB_FLASH_800K_STREAM", "MLB_FLASH_600K_STREAM", "MLB_FLASH_400K_STREAM", or "MLB_FLASH_164K_STREAM".

Example: 
matthew@tango ~/mlbtv/svn/mlbviewer/test$ ./soapevent.py 14-256310-2009-04-04 MLB_FLASH_164K_STREAM

For this, you may actually want to uncomment the printf()'s in rtmpdump.cpp just to verify that it's actually streaming.

Once you're certain it is streaming, you can play the recorded file with:

mplayer -novideo 14-256310-2009-04-04.mp4

Good luck!
 
  


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 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 - Distributions > Fedora

All times are GMT -5. The time now is 05:03 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration