LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 03-04-2014, 01:50 PM   #4321
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86

Quote:
Originally Posted by charlie460 View Post
I'll send it over to you when I get home tonight.

As a side note, do you know of any way to force which CDN to use (i.e. Level3 over Akamai) in the media request?

I always have issues with games that have Akamai set as the primary CDN, but Level3 works well every time. I see there is an alternate smil for each game (just change 'aka' to 'lev3') -- but I need the correct auth parameters to actually make it work.
Never really got *that* deep into it. I am guessing that the media response is not portable since there's an auth chunk that gets returned as part of the URL. I could be wrong. I honestly don't understand much of the architecture. I reverse architected something that works from wireshark traces.

If it helps you any, all three responses from MLBAM are logged in ~/.mlb as:

successful-1.xml : First request looks up content-id
successful-2.xml : Receives FMS cloud URL
fmscloud.xml : Receives the bits to put together the actual content URL

You can "pretty print" these responses with the mediaxml.py script in the test directory, e.g.

Code:
$ test/mediaxml.py ~/.mlb/fmscloud.xml
 #document:
  smil:
   head:
    meta: None
     base: rtmp://cp65670.edgefcs.net/ondemand
   body:
    switch:
     video: None
      src: mp4:secure/mlbam/2014/02/27/14-396394-2014-02-27/web-encodes/mlbtv_pitnya_home_300k/mlbtv_pitnya_home_300k.mp4
      system-bitrate: 300000
     video: None
      src: mp4:secure/mlbam/2014/02/27/14-396394-2014-02-27/web-encodes/mlbtv_pitnya_home_1200k/mlbtv_pitnya_home_1200k.mp4
      system-bitrate: 1200000
     video: None
      src: mp4:secure/mlbam/2014/02/27/14-396394-2014-02-27/web-encodes/mlbtv_pitnya_home_500k/mlbtv_pitnya_home_500k.mp4
      system-bitrate: 500000
     video: None
      src: mp4:secure/mlbam/2014/02/27/14-396394-2014-02-27/web-encodes/mlbtv_pitnya_home_2400k/mlbtv_pitnya_home_2400k.mp4
      system-bitrate: 2400000
     video: None
      src: mp4:secure/mlbam/2014/02/27/14-396394-2014-02-27/web-encodes/mlbtv_pitnya_home_1800k/mlbtv_pitnya_home_1800k.mp4
      system-bitrate: 1800000
 
Old 03-04-2014, 05:35 PM   #4322
djalmabm
LQ Newbie
 
Registered: Mar 2009
Location: São Paulo/SP - Brasil
Distribution: Debian sid
Posts: 7

Rep: Reputation: 0
Quote:
Originally Posted by daftcat View Post
Checked in a fix. I had pruned out "lan" as a teamcode for Dodgers not realizing I was using it as a lookup for highlights. Let me know if you see any other teams whose highlights don't work.
OK. Thank you very much.
 
Old 03-07-2014, 04:29 PM   #4323
linuxwebguy
LQ Newbie
 
Registered: Mar 2014
Posts: 1

Rep: Reputation: Disabled
Raspberry Pi

daftcat:

First, thanks for your work on this project! It's so awesome to be able to work with this.

Secondly, I don't know if anyone has tried this yet, but I'm going to make an attempt to integrate mlbviewer on a Raspberry Pi with the PiFace Control and Display. It's a 16x2 LCD with 5 switches, a rocker switch, and IR port. I've used the RasPi + PiFaceCAD to do Internet radio and ripping CDs. Now I'd like to see if I can create the same experience with mlbviewer. My thought is to use the LCD to browse games, see current scores, and potentially display current info about the game (teams, score, inning, pitcher, batter, etc).

Initially I'd start with just audio because it's easy, but then look at video as well.

I know there are other devices that will do it (PC, smart TV apps, etc), I just enjoy seeing if I can make it work, learning more Python, and enjoying baseball.

Thanks again for your hard work!
 
Old 03-12-2014, 04:30 PM   #4324
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Are the times correct since daylight savings time switchover this past weekend?

Looks good to me but I want to know from others since that's always been a weak point in the MLBSchedule class. Sometime last season I changed this class to stop using hard-coded dates for DST and to use a datetime class method to determine DST.
 
Old 03-13-2014, 03:13 PM   #4325
kweisen
Member
 
Registered: May 2006
Location: Englewood, Fl
Distribution: MInt 17
Posts: 57

Rep: Reputation: 0
Quote:
Originally Posted by daftcat View Post
Are the times correct since daylight savings time switchover this past weekend?

Looks good to me but I want to know from others since that's always been a weak point in the MLBSchedule class. Sometime last season I changed this class to stop using hard-coded dates for DST and to use a datetime class method to determine DST.
Seems to be working ok for me.
 
Old 03-14-2014, 01:55 PM   #4326
chrisVV
Member
 
Registered: Aug 2010
Posts: 548

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by daftcat View Post
Are the times correct since daylight savings time switchover this past weekend?
Times are an hour out for any areas which have not yet advanced their clocks to summer time, as in Western Europe. mlbviewer seems to assume all clocks have advanced if US time has advanced.

However I should leave it. mlbviewer has always had this problem, and trying to fix it may mess things up when clocks change here at the end of the month. The issue will resolve itself in 2 weeks' time, and will not reappear until the end of October (US clocks go back a week later than in Europe). You quickly learn to live with it.

Chris
 
Old 03-15-2014, 03:54 PM   #4327
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by chrisVV View Post
Times are an hour out for any areas which have not yet advanced their clocks to summer time, as in Western Europe. mlbviewer seems to assume all clocks have advanced if US time has advanced.

However I should leave it. mlbviewer has always had this problem, and trying to fix it may mess things up when clocks change here at the end of the month. The issue will resolve itself in 2 weeks' time, and will not reappear until the end of October (US clocks go back a week later than in Europe). You quickly learn to live with it.

Chris
I'm glad you're okay with it because there's probably no easy fix for it. Game times are always published in US/Eastern. From there, I convert once to GMT and again to localtime. During the GMT conversion, I either add 4 hours or 5 hours depending on the value of time.daylight. Can you do the following for me?

Code:
$ python
Python 2.7.5+ (default, Sep 17 2013, 17:31:54) 
[GCC 4.8.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.daylight
1
>>>
(Ctrl-D to exit.)

If it also returns one, then python is using US dates for DST rather than using local dates. If time.daylight = 0 where you are, then I have a genuine bug to fix.

There is a time_offset= config file option but it doesn't look like I brought that code in when I did the rewrite last year.
 
Old 03-15-2014, 06:29 PM   #4328
fang2415
Member
 
Registered: Jan 2007
Posts: 195

Rep: Reputation: 15
Here in London, time.daylight outputs 1.

HTH
 
Old 03-16-2014, 02:32 AM   #4329
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by fang2415 View Post
Here in London, time.daylight outputs 1.

HTH
It does. I googled time.daylight and discovered that it didn't mean what I thought it did.

Please update to rev 590 and let me know if the times are correct now. I've only modified the listings code (main screen) for the moment. If it turns out to be wrong, I don't want to bother updating all the other classes. If it does turn out right, I'll go ahead and modify the other classes as well.
 
Old 03-16-2014, 05:14 AM   #4330
chrisVV
Member
 
Registered: Aug 2010
Posts: 548

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by daftcat View Post
Please update to rev 590 and let me know if the times are correct now. I've only modified the listings code (main screen) for the moment. If it turns out to be wrong, I don't want to bother updating all the other classes. If it does turn out right, I'll go ahead and modify the other classes as well.
Revision 590 is still an hour out in Western Europe on the main screen.
 
Old 03-16-2014, 02:39 PM   #4331
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
What does the following say for you? Really just interested in the "tm_isdst" flag at the end.

Code:
$ python
Python 2.7.5+ (default, Sep 17 2013, 17:31:54) 
[GCC 4.8.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.localtime()
time.struct_time(tm_year=2014, tm_mon=3, tm_mday=16, tm_hour=12, tm_min=25, tm_sec=2, tm_wday=6, tm_yday=75, tm_isdst=1)
 
Old 03-16-2014, 02:46 PM   #4332
fang2415
Member
 
Registered: Jan 2007
Posts: 195

Rep: Reputation: 15
And here on the night shift in Western Europe...

Code:
$ python
Python 2.7.3 (default, Sep 26 2013, 16:38:10) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.localtime()
time.struct_time(tm_year=2014, tm_mon=3, tm_mday=16, tm_hour=19, tm_min=43, tm_sec=9, tm_wday=6, tm_yday=75, tm_isdst=0)
 
Old 03-16-2014, 02:48 PM   #4333
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Also, can you give me the output of the date command? Just want to know what timezone your system is set for. I'm guessing that I should be able to use a python library to adjust tzdata temporarily for my session so I don't have to keep asking you to test this code for me.
 
Old 03-16-2014, 02:50 PM   #4334
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by fang2415 View Post
And here on the night shift in Western Europe...

Code:
$ python
Python 2.7.3 (default, Sep 26 2013, 16:38:10) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.localtime()
time.struct_time(tm_year=2014, tm_mon=3, tm_mday=16, tm_hour=19, tm_min=43, tm_sec=9, tm_wday=6, tm_yday=75, tm_isdst=0)
Okay, so the flag works as I was expecting it, but perhaps I put my edit in the wrong place. What's your timezone (from date command) so I can try to fix this from here?
 
Old 03-16-2014, 02:56 PM   #4335
fang2415
Member
 
Registered: Jan 2007
Posts: 195

Rep: Reputation: 15
Quote:
Originally Posted by daftcat View Post
so I don't have to keep asking you to test this code for me.
But that makes us feel so useful!

Code:
$ date
Sun Mar 16 19:54:52 GMT 2014
 
  


Reply

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



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 - Software

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