LinuxQuestions.org
Visit Jeremy's Blog.
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-02-2013, 02:43 PM   #3901
thegryghost
LQ Newbie
 
Registered: Mar 2009
Distribution: Gentoo
Posts: 28

Rep: Reputation: 1

Quote:
Originally Posted by daftcat View Post
Have they fixed the problem with the streams having way too much "This Game Will Start Shortly" at the beginning of the stream ? (e.g. the reason why -F was created in the first place?) Also, this doesn't fix the jump to innings issue. I can implement a short-term config file option to use this until we can get the real issue sorted. Look for a patch tonight/tomorrow morning.
It looks like the HLS playlist files and the innings.xml are now all in GMT. Using the Orioles at Rays for testing (content id: 25902727, event-id: 14-346754-2013-04-02):

The HLS playlist starts at 2013-04-02T18:10:55+00:00.

The innings xml (346754.xml) has:

<inningTimes inning_number="1" top="true">
<inningTime type="SCAST" start="19:13:35" end="19:22:43"/>
<inningTimes inning_number="1" top="false">
<inningTime type="SCAST" start="19:24:50" end="19:30:26"/>
<inningTimes inning_number="2" top="true">
<inningTime type="SCAST" start="19:32:38"/>


You should be able to pass the SCAST number to mlbhls and it'll start at the proper time. The following started me at the top of the 2nd:
Code:
mlbhls -B <b64_url> -F 19:32:38 -o tmp
You may need to keep everything in GMT and only convert to local when the it's displayed in the UI.
 
Old 04-02-2013, 02:46 PM   #3902
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,749

Rep: Reputation: 76
I don't understand C well enough to create the patch myself, but it looks like mlbhls is inserting a GMT offset on top of the -F timecode already given. That or it is doing an extra conversion or something. For me, localtime is PDT or GMT-7. EDT is GMT-4. For yesterday's BOS@NYY game, I am expecting an EDT start time of 13:01:07 but the innings file shows 17:01:07. A four hour difference which would suggest that inning times are now in GMT (EDT+4 hours = GMT.) On top of that, when I request 17:01:07 using mlbhls -F, I see it requesting 21/01/07.ts (an additional four hours!) This is why archived nexdef streams jump to the end of the game. What's really odd is that when I try to adjust this manually to request 13:01:07, I also see the stream starting from 21/01/07.ts.

I can add a temporary option to revert back to -f 1 which will at least get archived games starting from the beginning. But this does not fix jump to innings. I will contact thegryghost to see if we can get a fix in mlbhls. If someone who knows C wants to take a look at it, I wouldn't mind testing a private patch before we ask for an official one.
 
Old 04-02-2013, 03:15 PM   #3903
chrisVV
Member
 
Registered: Aug 2010
Posts: 109

Rep: Reputation: 1
Quote:
Originally Posted by daftcat View Post
[snip]
Somewhat discouragingly, I was able to download nexdefinstall.dmg and get the nexdef stream to play through the browser using the old java -jar nexdef.jar trick. They may have intended to change the stream times to GMT. I will have to look further into this another time.
Out of interest, did you download v2011_125 or have you got an updated URL? A new version, v2013_129 came out a day or two ago and I have yet to find the URL for a download of the jar file (it is not in the equivalent location to the 2011/12 one), and I don't have a Mac to help me on my way. The old one still seems to work though. Let's hope it won't be needed for long!
 
Old 04-02-2013, 03:17 PM   #3904
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,749

Rep: Reputation: 76
Quote:
Originally Posted by thegryghost View Post
It looks like the HLS playlist files and the innings.xml are now all in GMT. Using the Orioles at Rays for testing (content id: 25902727, event-id: 14-346754-2013-04-02):

The HLS playlist starts at 2013-04-02T18:10:55+00:00.

The innings xml (346754.xml) has:

<inningTimes inning_number="1" top="true">
<inningTime type="SCAST" start="19:13:35" end="19:22:43"/>
<inningTimes inning_number="1" top="false">
<inningTime type="SCAST" start="19:24:50" end="19:30:26"/>
<inningTimes inning_number="2" top="true">
<inningTime type="SCAST" start="19:32:38"/>


You should be able to pass the SCAST number to mlbhls and it'll start at the proper time. The following started me at the top of the 2nd:
Code:
mlbhls -B <b64_url> -F 19:32:38 -o tmp
You may need to keep everything in GMT and only convert to local when the it's displayed in the UI.
I tried this and it seems to work correctly with in progress games. But using yesterday's NYY-BOS game as an example, whether using a start time of 17:01:07 or even trying to account for a mysterious 4 hour jump, using 13:01:07, I am still seeing the Get's starting at 21/11/01.ts. Interesting. I would expect, if it was a time conversion problem, to see the stream start at 21/01/06.ts. What's so special about 21/11/01? It is after the last #EXT-X-KEY: entry in the file. Were the previous key's ignored or rejected? or somehow unintentionally skipped over?
 
Old 04-02-2013, 03:30 PM   #3905
thegryghost
LQ Newbie
 
Registered: Mar 2009
Distribution: Gentoo
Posts: 28

Rep: Reputation: 1
Quote:
Originally Posted by daftcat View Post
I tried this and it seems to work correctly with in progress games. But using yesterday's NYY-BOS game as an example, whether using a start time of 17:01:07 or even trying to account for a mysterious 4 hour jump, using 13:01:07, I am still seeing the Get's starting at 21/11/01.ts. Interesting. I would expect, if it was a time conversion problem, to see the stream start at 21/01/06.ts. What's so special about 21/11/01? It is after the last #EXT-X-KEY: entry in the file. Were the previous key's ignored or rejected? or somehow unintentionally skipped over?
This looks like it's a bug in mlbhls. I'll take a look at it and get it fixed ASAP.
 
Old 04-02-2013, 03:32 PM   #3906
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,749

Rep: Reputation: 76
Quote:
Originally Posted by chrisVV View Post
Out of interest, did you download v2011_125 or have you got an updated URL? A new version, v2013_129 came out a day or two ago and I have yet to find the URL for a download of the jar file (it is not in the equivalent location to the 2011/12 one), and I don't have a Mac to help me on my way. The old one still seems to work though. Let's hope it won't be needed for long!
I reverse engineered the download url from the hover over the popup link. The popup link itself did not work. I kind of got lucky that when you remove the popup.html bit and add nexdefinstall.dmg, I was able to wget it. Then I had to follow some archived thread on ubuntuforums to remind myself how to unpack the dmg and find the jar. Hint: it's no longer Resources.pax.gz nor autobahn.jar but there is a nexdef.tar which contains a nexdef.jar. I want to get this fixed more than I want to support this hack which is why I'm not giving a detailed howto.
 
Old 04-02-2013, 03:46 PM   #3907
thegryghost
LQ Newbie
 
Registered: Mar 2009
Distribution: Gentoo
Posts: 28

Rep: Reputation: 1
Quote:
Originally Posted by daftcat View Post
I tried this and it seems to work correctly with in progress games. But using yesterday's NYY-BOS game as an example, whether using a start time of 17:01:07 or even trying to account for a mysterious 4 hour jump, using 13:01:07, I am still seeing the Get's starting at 21/11/01.ts. Interesting. I would expect, if it was a time conversion problem, to see the stream start at 21/01/06.ts. What's so special about 21/11/01? It is after the last #EXT-X-KEY: entry in the file. Were the previous key's ignored or rejected? or somehow unintentionally skipped over?
Ok, this is now fixed in rev 62 of mlbhls experimental. The problem was lazy/sloppy coding on my part. I always assumed that the "#EXT-X-PROGRAM-DATE-TIME" marker would also be on a certain line in the playlist file, it's not. I just tested with the Red Sox at Yankees game from yesterday and it works.

Let me know if you have any other problems.
 
Old 04-02-2013, 03:55 PM   #3908
chrisVV
Member
 
Registered: Aug 2010
Posts: 109

Rep: Reputation: 1
Quote:
Originally Posted by daftcat View Post
I reverse engineered the download url from the hover over the popup link. The popup link itself did not work. I kind of got lucky that when you remove the popup.html bit and add nexdefinstall.dmg, I was able to wget it. Then I had to follow some archived thread on ubuntuforums to remind myself how to unpack the dmg and find the jar. Hint: it's no longer Resources.pax.gz nor autobahn.jar but there is a nexdef.tar which contains a nexdef.jar. I want to get this fixed more than I want to support this hack which is why I'm not giving a detailed howto.
Ah, there's a change of name. The thing which fooled me is that the 2012 nexdef.jar was in a HFS+ filesystem comprised in v2011_125/mlbnexdefinstall.dmg, whereas the 2013 version is in v2013_129/nexdefinstall.dmg.

I much prefer mlbhls. I get proper video acceleration with mplayer rather than the rubbish flashplayer attempt at it (4 to 5% CPU as opposed to 50% CPU). And the game interface is much, much more convenient.
 
Old 04-02-2013, 04:17 PM   #3909
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,749

Rep: Reputation: 76
Quote:
Originally Posted by thegryghost View Post
Ok, this is now fixed in rev 62 of mlbhls experimental. The problem was lazy/sloppy coding on my part. I always assumed that the "#EXT-X-PROGRAM-DATE-TIME" marker would also be on a certain line in the playlist file, it's not. I just tested with the Red Sox at Yankees game from yesterday and it works.

Let me know if you have any other problems.
Jump to innings works correctly. Start of game is same buggy behavior.

Using yesterday's BOS-NYY game, requesting the published start time of 17:01:07 or the start ts in the m3u8 of 17:01:06 does results in 21/01/01. However, requesting a start time of 17:01:11 (the next ts in the file) works as expected. Stream Get's start from 17/0/06.

Is it possible that the fix is unintentionally off by one line missing the first ts in the file? If I request a start after that first ts, why does the stream pick up that first ts anyway? (not a big deal really except to help narrow down why start of game is not working correctly)

Last edited by daftcat; 04-02-2013 at 04:30 PM.
 
Old 04-02-2013, 04:31 PM   #3910
thegryghost
LQ Newbie
 
Registered: Mar 2009
Distribution: Gentoo
Posts: 28

Rep: Reputation: 1
Quote:
Originally Posted by daftcat View Post
I wonder if it has anything to do with that "Setting stream start time to (epoch):" line?
Yes, the change is in rev 62 (just tested). Can you send me your full URL except for the base64? This works for me...

Code:
./mlbhls -B aHR...RA== -F 17:19:26 -o tmp
[MLB] Reading cfg file: mlb.cfg
[MLB] Output file: tmp
[MLB] Segment Avg. Count: 3
[MLB] Max Bandwidth: 0 (bps)
[MLB] Min Bandwidth: 0 (bps)
[MLB] Bandwidth Locking: 0
[MLB] Fetching Master URL: http://mlblive-akc.mlb.com/ls04/mlbam/2013/04/01/MLB_GAME_VIDEO_BOSNYA_HOME_20130401/master_wired.m3u8
[MLB] Current Priority: 1 (bw: 128000)

[MLB] Master URL: http://mlblive-akc.mlb.com/ls04/mlbam/2013/04/01/MLB_GAME_VIDEO_BOSNYA_HOME_20130401/master_wired.m3u8
[MLB] Base URL: http://mlblive-akc.mlb.com/ls04/mlbam/2013/04/01/MLB_GAME_VIDEO_BOSNYA_HOME_20130401/
[MLB] Decryption Key:
[MLB] Params: playback=HTTP_CLOUD_WIRED&contentId=25901969&appAccountName=mlb&eventId=14-346755-2013-04-01&ipid=...&sessionKey=...%3D
[MLB] Stream #0 - rate:   800000 - path: [800K/] - playlist: 800K/800_complete-trimmed.m3u8
[MLB] Stream #1 - rate:   128000 - path: [200K/] - playlist: 200K/200_complete-trimmed.m3u8
[MLB] Stream #2 - rate:   500000 - path: [500K/] - playlist: 500K/500_complete-trimmed.m3u8
[MLB] Stream #3 - rate:  1200000 - path: [1200K/] - playlist: 1200K/1200_complete-trimmed.m3u8
[MLB] Stream #4 - rate:  1800000 - path: [1800K/] - playlist: 1800K/1800_complete-trimmed.m3u8
[MLB] Stream #5 - rate:  2400000 - path: [2400K/] - playlist: 2400K/2400_complete-trimmed.m3u8
[MLB] Stream #6 - rate:  3000000 - path: [3000K/] - playlist: 3000K/3000_complete-trimmed.m3u8
[MLB] Stream #7 - rate:  4500000 - path: [4500K/] - playlist: 4500K/4500_complete-trimmed.m3u8

[MLB] Playlist refresh time: 12 (s)
[MLB] Playlist start: 61265
[MLB] END OF PLAYLIST! (rate: 800000)
[MLB] Setting stream start time to (epoch): 1364853665
[MLB] END OF PLAYLIST! (rate: 128000)
[MLB] END OF PLAYLIST! (rate: 500000)
[MLB] END OF PLAYLIST! (rate: 1200000)
[MLB] END OF PLAYLIST! (rate: 1800000)
[MLB] END OF PLAYLIST! (rate: 2400000)
[MLB] END OF PLAYLIST! (rate: 3000000)
[MLB] END OF PLAYLIST! (rate: 4500000)
[MLB] Get (466): 17/19/22.ts (bw: 128000, time: 0.11s) [Avg. D/L Rate of last 3 chunks: 8.81 Mbps]
[MLB] Get (468): 17/19/27.ts (bw: 128000, time: 0.10s) [Avg. D/L Rate of last 3 chunks: 8.44 Mbps]
The epoch time doesn't do anything, just for (useless) information.
 
Old 04-02-2013, 04:49 PM   #3911
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,749

Rep: Reputation: 76
Quote:
Originally Posted by thegryghost View Post
Yes, the change is in rev 62 (just tested). Can you send me your full URL except for the base64? This works for me...

Code:
./mlbhls -B aHR...RA== -F 17:19:26 -o tmp
[MLB] Reading cfg file: mlb.cfg
[MLB] Output file: tmp
[MLB] Segment Avg. Count: 3
[MLB] Max Bandwidth: 0 (bps)
[MLB] Min Bandwidth: 0 (bps)
[MLB] Bandwidth Locking: 0
[MLB] Fetching Master URL: http://mlblive-akc.mlb.com/ls04/mlbam/2013/04/01/MLB_GAME_VIDEO_BOSNYA_HOME_20130401/master_wired.m3u8
[MLB] Current Priority: 1 (bw: 128000)

[MLB] Master URL: http://mlblive-akc.mlb.com/ls04/mlbam/2013/04/01/MLB_GAME_VIDEO_BOSNYA_HOME_20130401/master_wired.m3u8
[MLB] Base URL: http://mlblive-akc.mlb.com/ls04/mlbam/2013/04/01/MLB_GAME_VIDEO_BOSNYA_HOME_20130401/
[MLB] Decryption Key:
[MLB] Params: playback=HTTP_CLOUD_WIRED&contentId=25901969&appAccountName=mlb&eventId=14-346755-2013-04-01&ipid=...&sessionKey=...%3D
[MLB] Stream #0 - rate:   800000 - path: [800K/] - playlist: 800K/800_complete-trimmed.m3u8
[MLB] Stream #1 - rate:   128000 - path: [200K/] - playlist: 200K/200_complete-trimmed.m3u8
[MLB] Stream #2 - rate:   500000 - path: [500K/] - playlist: 500K/500_complete-trimmed.m3u8
[MLB] Stream #3 - rate:  1200000 - path: [1200K/] - playlist: 1200K/1200_complete-trimmed.m3u8
[MLB] Stream #4 - rate:  1800000 - path: [1800K/] - playlist: 1800K/1800_complete-trimmed.m3u8
[MLB] Stream #5 - rate:  2400000 - path: [2400K/] - playlist: 2400K/2400_complete-trimmed.m3u8
[MLB] Stream #6 - rate:  3000000 - path: [3000K/] - playlist: 3000K/3000_complete-trimmed.m3u8
[MLB] Stream #7 - rate:  4500000 - path: [4500K/] - playlist: 4500K/4500_complete-trimmed.m3u8

[MLB] Playlist refresh time: 12 (s)
[MLB] Playlist start: 61265
[MLB] END OF PLAYLIST! (rate: 800000)
[MLB] Setting stream start time to (epoch): 1364853665
[MLB] END OF PLAYLIST! (rate: 128000)
[MLB] END OF PLAYLIST! (rate: 500000)
[MLB] END OF PLAYLIST! (rate: 1200000)
[MLB] END OF PLAYLIST! (rate: 1800000)
[MLB] END OF PLAYLIST! (rate: 2400000)
[MLB] END OF PLAYLIST! (rate: 3000000)
[MLB] END OF PLAYLIST! (rate: 4500000)
[MLB] Get (466): 17/19/22.ts (bw: 128000, time: 0.11s) [Avg. D/L Rate of last 3 chunks: 8.81 Mbps]
[MLB] Get (468): 17/19/27.ts (bw: 128000, time: 0.10s) [Avg. D/L Rate of last 3 chunks: 8.44 Mbps]
The epoch time doesn't do anything, just for (useless) information.
I updated my comment. Jump to inning now works great. Jump to start of game using -F 17:01:07 does not work. Jump to start of game plus one timestamp, e.g. -F 17:01:11 starts the stream from 17:01:06. Looks like there may be an off-by-one line error?

Since it is only start of game that is now affected, I could change my getStartOfGame routine to add 5s, but I'd rather have it correct in mlbhls.
 
Old 04-02-2013, 05:44 PM   #3912
thegryghost
LQ Newbie
 
Registered: Mar 2009
Distribution: Gentoo
Posts: 28

Rep: Reputation: 1
Quote:
Originally Posted by daftcat View Post
I updated my comment. Jump to inning now works great. Jump to start of game using -F 17:01:07 does not work. Jump to start of game plus one timestamp, e.g. -F 17:01:11 starts the stream from 17:01:06. Looks like there may be an off-by-one line error?

Since it is only start of game that is now affected, I could change my getStartOfGame routine to add 5s, but I'd rather have it correct in mlbhls.
Short version:
I've found the issue and it's fixed in rev 63.

Long Version:
The problem here is that the HLS playlist defines the start as:

#EXT-X-PROGRAM-DATE-TIME:2013-04-01T17:01:05+00:00
or
17:01:05

To figure out where to start in the HLS playlist with -F, I subtract the time that's specified with -F with the actual start time in the HLS playlist and divide by the segment time. Specifying a start of 17:01:07 is only a 2 second difference, the segment time is 5 seconds. When doing int division, the start time is effectively 0. Which tells mlbhls to start from the end. That explains why when you add 5 seconds, it works. Since the division is no longer zero. "Live" HLS playlists start at least 30 mins before, so the difference is much bigger but the archives appeared to be "trimmed" to remove all that.

I now check to see if the difference is less than the segment time and if it is, just set it to 1.

Please test and let me know if anything else is still broken.
 
Old 04-02-2013, 06:25 PM   #3913
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,749

Rep: Reputation: 76
Quote:
Originally Posted by thegryghost View Post
Short version:
I've found the issue and it's fixed in rev 63.

Long Version:
The problem here is that the HLS playlist defines the start as:

#EXT-X-PROGRAM-DATE-TIME:2013-04-01T17:01:05+00:00
or
17:01:05

To figure out where to start in the HLS playlist with -F, I subtract the time that's specified with -F with the actual start time in the HLS playlist and divide by the segment time. Specifying a start of 17:01:07 is only a 2 second difference, the segment time is 5 seconds. When doing int division, the start time is effectively 0. Which tells mlbhls to start from the end. That explains why when you add 5 seconds, it works. Since the division is no longer zero. "Live" HLS playlists start at least 30 mins before, so the difference is much bigger but the archives appeared to be "trimmed" to remove all that.

I now check to see if the difference is less than the segment time and if it is, just set it to 1.

Please test and let me know if anything else is still broken.
Thanks for the awesome support!

Bos@NYY and Mia@Was yesterday work from start with 63.

Now to a game I actually care about. KC@Cws still seems to be affected.

X-PROGRAM-DATE-TIME is 2013-04-01T20:00:06+00:00 and innings start_time is 20:00:06. So the date-time minus the -F is 0. Since that's less than 5 seconds, that gets set to 1. Correct? The first timestamp in the file is 20/00/07. This seems like it should be a perfect match to your algorithm. But instead it starts playing from the end (a 23/../...ts something timestamp.) I realize my "fix" for getStartOfGame would not be so easy as I will need to convert the string to a time structure before adding the five seconds to make sure a published start time of hh:mm:56 does not become a nonsense value of hh:mm:61. Still something I might do, but just not right now.
 
Old 04-02-2013, 06:47 PM   #3914
edsmith123
LQ Newbie
 
Registered: Apr 2013
Posts: 10

Rep: Reputation: Disabled
Quote:
Originally Posted by daftcat View Post
I am guessing that your coverage setting is wrong. At least that is how I am able to reproduce that exact error. I either get different errors or no errors at all for invalid or absent values of speed and adaptive_stream.

coverage= should be either home or away, e.g.
Thanks! I was missing the coverage setting in my config file.
 
Old 04-02-2013, 07:04 PM   #3915
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,749

Rep: Reputation: 76
Quote:
Originally Posted by edsmith123 View Post
Thanks! I was missing the coverage setting in my config file.
Weird. Default config file writes a coverage= setting. I suppose you could have removed it. Not sure how to defend against that in the code. Maybe in the loads() routine, I can do a check of mandatory parameters? I'll have to think that one over to see how to fix it.

But I'm glad you got it working again.
 
  


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 05:29 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