LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-15-2013, 09:21 AM   #4171
kermitfan22
LQ Newbie
 
Registered: Apr 2012
Distribution: Ubuntu or mythbuntu
Posts: 7

Rep: Reputation: Disabled

Well.. the good news is, after beating my head against my keyboard for almost 2 hours I finally got the mlbhls to work, right after I finally figured out that the link for it IS NOT in the README file, but rather INSTALL file, and that it is, in fact, NOT THE RIGHT ONE EITHER!! Apparently you need the experimental version, not the trunk version, or you get a -F error when you try to use mlbhls.

Code:
svn checkout https://mlbtv-hls-nexdef.googlecode.com/svn/branches/experimental
Now I can watch my game again, but it is not so seakable. I tried to skip ahead and ended up at the beginning of the game. I miss rtmp working already.

-the geeky girl
Kermi
 
Old 08-15-2013, 09:39 AM   #4172
fang2415
Member
 
Registered: Jan 2007
Posts: 159

Rep: Reputation: 15
Quote:
Originally Posted by kermitfan22 View Post
Well.. the good news is, after beating my head against my keyboard for almost 2 hours I finally got the mlbhls to work, right after I finally figured out that the link for it IS NOT in the README file, but rather INSTALL file, and that it is, in fact, NOT THE RIGHT ONE EITHER!! Apparently you need the experimental version, not the trunk version, or you get a -F error when you try to use mlbhls.

Code:
svn checkout https://mlbtv-hls-nexdef.googlecode.com/svn/branches/experimental
Ah, yes, there is that little quirk. I usually have to search this thread for "googlecode" in order to find the correct URL whenever I install a new mlbhls...

Quote:
Originally Posted by kermitfan22 View Post
Now I can watch my game again, but it is not so seakable. I tried to skip ahead and ended up at the beginning of the game. I miss rtmp working already.
I think this is an mlbhls bug that I've been meaning to raise with thegryghost but haven't gotten around to it. I find that I can work around it by getting the 64-bit link from the mlbviewer log and then running mlbhls manually using the old -f option instead of -F.

So I go into mlbviewer, select the mlbhls version of the game I want, then quit when the stream starts. Then I do:

Code:
$ tail .mlb/log
$ mlbhls -B [long stream of gibberish from end of log starting with aHR0...] -L -s 1200000 -f 1 -o video.ts
I can watch these streams with any player (vlc, mplayer, or mplayer2) and seeking in mplayer and vlc works fine.

(BTW, the reason I'm fairly sure it's an mlbhls bug is that the problem can also be fixed by taking a fragment of a stream downloaded using -f and then using cat to glue a stream downloaded using -F onto the end of it. That plays fine, even if the "starter" fragment is <1M. That suggests to me that -F is writing something screwy into the file header that only mplayer2 can figure out, but with seeking broken.)

HTH. Also, as daftcat has pointed out to me numerous times in the past, the skip-to-innings feature (hit "i" at the listings page) makes life without seeking much more bearable!

Last edited by fang2415; 08-15-2013 at 10:08 AM.
 
Old 08-15-2013, 11:34 AM   #4173
kermitfan22
LQ Newbie
 
Registered: Apr 2012
Distribution: Ubuntu or mythbuntu
Posts: 7

Rep: Reputation: Disabled
*happy exhale*

It's SEEKABLE!! Eureaka! Now I need to figure out how to write a script to do this for me so I can just run a script to make yesterday's game happen.

I think I might have to wait for that, as my brain still hurts from getting mlbhls working right. (Seriously, I have a migraine.)

-Kermi
 
Old 08-15-2013, 02:49 PM   #4174
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,744

Rep: Reputation: 76
Quote:
Originally Posted by fang2415 View Post
I believe you can switch to the mlbhls/nexdef stream by hitting "n" at the listings screen within mlbviewer, or by setting "use_nexdef=1" in .mlb/config. I'm not sure whether you can cycle through the available mlbhls speeds from within mlbviewer; I believe it sets the speed from the max_bps option in the config file (mine is set to 1200000).

FWIW, Googling around for that rtmpdump error shows a bunch of issues that usually seem to be resolved by changing one of rtmpdump's rather baffling options. So it could be that MLBAM has changed one of these parameters? I have no idea how to figure out the right options to use though (even for easier streams than this)...
Can you please post a link to one of those google results you were reading about? It may be less baffling for me.
 
Old 08-15-2013, 03:01 PM   #4175
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,744

Rep: Reputation: 76
Quote:
Originally Posted by kermitfan22 View Post
*happy exhale*

It's SEEKABLE!! Eureaka! Now I need to figure out how to write a script to do this for me so I can just run a script to make yesterday's game happen.

I think I might have to wait for that, as my brain still hurts from getting mlbhls working right. (Seriously, I have a migraine.)

-Kermi
I believe you are looking for:

Code:
$ mlbplay.py v=kc n=1 nu=1
That will give you that nexdef base64 string that starts with aHR0 without having to look for it in the log file.

Quote:
v= video stream using broadcast (home or away) for selected team using the two or three letter teamcode (mlbplay.py without any options will spit out all the valid teamcodes)

n=1 Enable nexdef

nu=1 Just print out the nexdef url (the base64 "gibberish")
You can use j= parameter to jump to a specific date. i= to jump to a specific inning. The keys mostly mimic the same keys used in mlbviewer and you can get more information in the MLBPLAY readme.

The difference between the -f and -F is that -f was a line number offset in the time codes where each line was roughly 6 s of video. It was a best guess at where the stream playback should start. Often this guess would be wrong with as much as 30 minutes of "This Game Will Begin Shortly" splash screen before you would actually get to the head of the broadcast. -F takes the published start time in one of the XML responses and skips directly to that time code.

I am not sure why the -f streams are seekable and the -F ones are not. This is a question for thegryghost (mlbhls developer.)

URL errors for where to get mlbhls *experimental* code will be fixed in the README/INSTALL. Sorry about that.

Last edited by daftcat; 08-15-2013 at 03:03 PM.
 
1 members found this post helpful.
Old 08-15-2013, 03:07 PM   #4176
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,744

Rep: Reputation: 76
BTW, I was having the worst time with mlbhls streams until I realized the adaptive streaming part was messing up my version of mplayer2. If you get messages about changing height/width not supported and your stream video stops while the audio keeps going, you can either build a new mplayer2 from source taking the latest Libav from git (instructions in the mplayer2 build guide), or you can turn off adaptive streaming with adaptive_stream=0. Turns out my new internet is much quicker than internet at the old place (new modem and less neighbors) so adaptive streaming really isn't necessary for me anymore.
 
Old 08-15-2013, 03:32 PM   #4177
mkomko
Member
 
Registered: Mar 2010
Posts: 67

Rep: Reputation: 0
Well, I guess the seekable mlbhls stream is a workaround for now. Still, working rtmp streams would be awesome . Thanks for the great work (to the other guys here as well).
 
Old 08-15-2013, 04:45 PM   #4178
kermitfan22
LQ Newbie
 
Registered: Apr 2012
Distribution: Ubuntu or mythbuntu
Posts: 7

Rep: Reputation: Disabled
Thank you TONS, Daftcat! I was able to easily re-write my "yesterday" script with your clues! Now I'm as happy as any Cleveland Indians fan actually can be.

Sorry if I sounded crabby about the miss information previously. I honestly did have a migraine!

-The geeky Girl
Kermi
 
Old 08-16-2013, 02:26 AM   #4179
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,744

Rep: Reputation: 76
Quote:
Originally Posted by kermitfan22 View Post
Thank you TONS, Daftcat! I was able to easily re-write my "yesterday" script with your clues! Now I'm as happy as any Cleveland Indians fan actually can be.

Sorry if I sounded crabby about the miss information previously. I honestly did have a migraine!

-The geeky Girl
Kermi
If there was a "Like" button for LinuxQuestions...
 
Old 08-16-2013, 04:41 AM   #4180
fang2415
Member
 
Registered: Jan 2007
Posts: 159

Rep: Reputation: 15
Quote:
Originally Posted by daftcat View Post
Can you please post a link to one of those google results you were reading about? It may be less baffling for me.
Sure, although I don't think they offer much detail...

Here's the search I did:
https://www.google.co.uk/search?q=ER...equested+close

And here's the links I followed:
http://stream-recorder.com/forum/err...p-t16466.html?
https://github.com/aajanki/yle-dl/issues/13
http://mplayerhq.hu/pipermail/rtmpdu...ay/001434.html
http://forum.xbmc.org/showthread.php?tid=149717
 
Old 08-16-2013, 05:31 AM   #4181
fang2415
Member
 
Registered: Jan 2007
Posts: 159

Rep: Reputation: 15
Quote:
Originally Posted by daftcat View Post
I believe you are looking for:

Code:
$ mlbplay.py v=kc n=1 nu=1
That will give you that nexdef base64 string that starts with aHR0 without having to look for it in the log file.

You can use j= parameter to jump to a specific date. i= to jump to a specific inning. The keys mostly mimic the same keys used in mlbviewer and you can get more information in the MLBPLAY readme.

URL errors for where to get mlbhls *experimental* code will be fixed in the README/INSTALL. Sorry about that.
Ooh, that is handy. I knew there'd probably be a way to do that, but I've been too lazy to do the work to find the right options so that I can do less work by using them.

Just to note, if you are adding stuff to the docs, I don't think the innings feature or the nu option are in the current MLBPLAY-HELP (or maybe anywhere), so it might be good to chuck 'em in there to alleviate the need to hunt through the thread...

Quote:
Originally Posted by daftcat View Post
The difference between the -f and -F is that -f was a line number offset in the time codes where each line was roughly 6 s of video. It was a best guess at where the stream playback should start. Often this guess would be wrong with as much as 30 minutes of "This Game Will Begin Shortly" splash screen before you would actually get to the head of the broadcast. -F takes the published start time in one of the XML responses and skips directly to that time code.

I am not sure why the -f streams are seekable and the -F ones are not. This is a question for thegryghost (mlbhls developer.)
I think MLBAM have recently cleaned up the video streams to get rid of the long "This game will begin shortly"s. I used to have to do like -f40, but this year I've used -f1 every time and never gotten more than a few seconds of blue screen.

The other big advantage to the -f streams is that they currently work with any player, so there's no need to force users to get mplayer2.

Last edited by fang2415; 08-16-2013 at 05:44 AM.
 
Old 08-16-2013, 02:55 PM   #4182
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,744

Rep: Reputation: 76
Update on the rtmp issue (and more...)

For archived RTMP, there were a lot of the "baffling" bits missing from the rtmpdump command-line because my regular expressions weren't working like they should. I managed to get archived working but now live isn't quite right. It's a lot harder to debug this remotely through an ssh session and I would kind of like to do it correctly than patchwork things together too quickly. I will spend some more time on this over the weekend. As this is a major restoration of core functionality, I want to get it right and clean because I'll have to update Sourceforge release.

So, for now, you can use test/mlbgame.py to access archived RTMP streams which is working. It's working because it is using quick and dirty code that is different (and in this case, a good kind of different) from the core code in MLBviewer.

Code:
test/mlbgame.py <event-id> ?<content-id>

<event-id> can be grabbed from mlblistings.py, and
<content-id> is optional but can be used to select a specific broadcast (home vs away) and can be retrieved from the 'z' key in mlbviewer.py or,
mlbplay.py v=<teamcode> z=1
For example, let's take the first game of the KC-DET doubleheader today (seeing as doubleheaders will give you the most challenge with mlbplay.py and/or test/mlbgame.py). I want to watch the KC broadcast of the first game, so let's get media debug ('z' key) from mlbplay.py:

Code:
$ mlbplay.py v=kc z=1
media = [[('FSD-HD', u'116', '29502373', '14-347039-2013-08-16')], [('FSD-HD', u'116', '29502907', '14-348559-2013-08-16'), ('FSKC-HD', u'118', '29502911', '14-348559-2013-08-16')]]
prefer = ('FSKC-HD', u'118', '29502911', '14-348559-2013-08-16')
We can see there are two games (two different event-id's: 14-347039-2013-08-16 and 14-348559-2013-08-16) and preferred media is messing up by selecting the second game. How do I know this?

Code:
$ ./mlblistings.py
MLB.TV Listings for 8/16/2013
 I: 10:08 AM: 2013/08/16/kcamlb-detmlb-1 E: 14-347039-2013-08-16
 P:  4:08 PM: 2013/08/16/kcamlb-detmlb-2 E: 14-348559-2013-08-16
Event-id for the first game is 14-347039-2013-08-16 so prefer media should be ('FSD-HD', u'116', '29502373', '14-347039-2013-08-16').

No biggie. We already know mlbplay.py isn't going to work until I check in my fixes so we're just interested in getting the content-id (29502373, the third field) and the event-id (14-347039-2013-08-16, the fourth field.)

So the final command to watch the RTMP stream for the KC broadcast of the first game of the doubleheader:

Code:
test/mlbgame.py 14-347039-2013-08-16 29502373
Which incidentally may not work correctly with live games right now but I expect most of you won't see this example until this game is archived anyway.

-----

The '-f' vs. '-F' mlbhls debate:

Not sure I was so adamant about -F other than I think it's absolutely fantastic to start the stream from the real beginning of the stream rather than the guesswork involved with "-f".

However, if "-f 1" is working reliably now at getting the head of the broadcast rather than a half hour of blue screen, I'll add in a config file option to let you guys choose "-f".

----

Mouse support broke copy-paste. Honestly, I really only need mouse support for one machine, and it's kind of getting in the way everywhere else. I will check in a fix to disable mouse support by default.

If you want to disable it right now, change line 89 from:

Code:
    curses.mousemask(1)
to

Code:
    if mycfg.get('enable_mouse'):
        curses.mousemask(1)
You must preserve original indentation for if statement, and insert 4 more spaces before curses.mousemask(1) to be syntactically correct for Python. This means that if you want to re-enable mouse support, you can add enable_mouse=1 to your config.

---

Documentation

Yep. It needs a lot of updating.
 
Old 08-16-2013, 03:53 PM   #4183
mkomko
Member
 
Registered: Mar 2010
Posts: 67

Rep: Reputation: 0
Thanks for trying to fix the RTMP streams! Great that you already know what it is :-).
 
Old 08-16-2013, 07:15 PM   #4184
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,744

Rep: Reputation: 76
Ugh! Bugs suck! Looks like I have listings issues with the KC-DET doubleheader showing the second game currently In Progress as Final - Condensed Game Available.

If you're trying to watch it or encounter something similar, just use the jump to innings feature.

Also, back to -f vs -F, I don't believe jump to innings can be supported with -f.
 
Old 08-18-2013, 11:48 AM   #4185
fang2415
Member
 
Registered: Jan 2007
Posts: 159

Rep: Reputation: 15
daftcat, that sounds great on the rtmp front, glad you could identify what was going wrong.

As for -f vs -F, I completely agree that -F would be far better if it worked properly, and that innings support won't work without it.

As I mentioned, there is a workaround that can get inning support for -f-header'd streams, but boy is it a hack:

Start a stream with -f and save it to fvid.ts, then cut it off shortly after the stream gets rolling.

Then do this:
Code:
$ dd if=fvid.ts of=video_starter bs=5830 count=1
(5830 bytes seems to be the minimum that I can get to work.)

Then set the mlbviewer player line to something like this:
Code:
video_player=cat /home/fang2415/mlb/video_starter %s | mplayer -cache 10000 -
That should yield a stream that a stock mplayer installation should be able to play and seek through at least as much as the cache allows. (Of course, there might also be unsupported functionality that might save the stream to disk and make it 100% seekable...)

As I say, it's mighty ugly, but that's how I use the innings feature with a stock version of mplayer.

Maybe I'll send thegryghost an email to see if he can advise on a proper fix for mlbhls -F...
 
  


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


All times are GMT -5. The time now is 06:57 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration