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 05-20-2013, 05:11 PM   #4081
BostonPeng
Member
 
Registered: Jul 2009
Location: Boston, MA
Distribution: SolydK Testing + KDE 4.9.5
Posts: 88

Rep: Reputation: Disabled

I snagged it from SF since I forgot to snag the svn update when I was celebrating Saturday. But that's ok, because I have later code than I would have gotten anyway this way. Thanks for posting it so fast!

But damn. Now I see I have another update to snag. Good thing I'm on a fast pipe, eh?

Last edited by BostonPeng; 05-20-2013 at 05:12 PM.
 
Old 05-20-2013, 07:29 PM   #4082
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,767

Rep: Reputation: 76
Quote:
Originally Posted by BostonPeng View Post
I snagged it from SF since I forgot to snag the svn update when I was celebrating Saturday. But that's ok, because I have later code than I would have gotten anyway this way. Thanks for posting it so fast!

But damn. Now I see I have another update to snag. Good thing I'm on a fast pipe, eh?
Provided there are no showstopping bugs that make the sourceforge releases unusable without a fix, sf-6 is likely to be the last sf release for a good long time. Bug fixes and new tweaks will continue to get checked into SVN as they are reported or requested.
 
Old 05-20-2013, 08:29 PM   #4083
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,767

Rep: Reputation: 76
Donations are not required but would be greatly appreciated

I hate this part but really, I do put in a lot of time (sleepless nights, weekends, crazy ideas when I woke up too early in the morning) to maintain this code and to bring new features. A small donation would be appreciated if you can afford it.

Recap of what I brought to mlbviewer in 2013:

+ complete code rewrite making it a lot easier to maintain and add to mlbviewer, and add to it I did...
+ scoreboard view
+ line scores
+ box scores
+ standings
+ RSS
+ custom keybindings
+ MiLB.tv integration
+ and numerous bug fixes and customizations based on user requests

So if you can spare a few dollars, it would be greatly appreciated. If you can't, that's okay too. Donations can be made via Paypal to the email address at the bottom of the README ("tail README" )

Thank you and keep the bug reports and enhancement requests coming so I can keep improving on mlbviewer.
 
Old 05-21-2013, 03:11 AM   #4084
icelancer
LQ Newbie
 
Registered: May 2013
Posts: 13

Rep: Reputation: Disabled
Remapping the team codes:

Since this is out of date:

Code:
     'ana', 'ari', 'atl', 'bal', 'bos', 'chc', 'cin', 'cle', 'col',
     'cws', 'det', 'fla', 'hou', 'kc', 'la', 'mil', 'min', 'nym',
     'nyy', 'oak', 'phi', 'pit', 'sd', 'sea', 'sf', 'stl', 'tb',
     'tex', 'tor', 'was'
I am working on the new map, since I use mlbplay.py instead of mlbviewer.py - unless you happen to have it on hand!

EDIT: I also sent a very small donation to you via Paypal. More on the way when I get some spare change Thanks for everything you do!

Last edited by icelancer; 05-21-2013 at 03:39 AM.
 
Old 05-21-2013, 03:26 AM   #4085
icelancer
LQ Newbie
 
Registered: May 2013
Posts: 13

Rep: Reputation: Disabled
Looks like just fla needs to be mapped to mia in the documentation.

If anyone is following at home using Gameday data from mlb.com, here are other maps:

chn/chc
cha/cws
nya/nyy
nyn/nym
 
Old 05-21-2013, 07:06 AM   #4086
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,767

Rep: Reputation: 76
Codes used inconsistently even in MLB XML files

So here's a quick example of how the codes are inconsistent even internally in MLB XML files.

I took today's listing file:

Then I use test/mediaxml.py to parse it and pretty-print it.

Quote:
matthew@dubstep32:~/mlbtv/mlb2013/test$ ./mediaxml.py grid.xml |grep _code
away_file_code: sea
home_file_code: cle
home_code: cle
away_code: sea
away_file_code: tb
home_file_code: tor
home_code: tor
away_code: tba
away_file_code: nyy
home_file_code: bal
home_code: bal
away_code: nya
away_file_code: cin
home_file_code: nym
home_code: nyn
away_code: cin
away_file_code: min
home_file_code: atl
home_code: atl
away_code: min
away_file_code: phi
home_file_code: mia
home_code: mia
away_code: phi
away_file_code: oak
home_file_code: tex
home_code: tex
away_code: oak
away_file_code: bos
home_file_code: cws
home_code: cha
away_code: bos
away_file_code: kc
home_file_code: hou
home_code: hou
away_code: kca
away_file_code: la
home_file_code: mil
home_code: mil
away_code: lan
away_file_code: ari
home_file_code: col
home_code: col
away_code: ari
away_file_code: stl
home_file_code: sd
home_code: sdn
away_code: sln
away_file_code: was
home_file_code: sf
home_code: sfn
away_code: was
This isn't a complete list but only the games played today.

Quote:
$ ./mediaxml.py grid.xml |grep file_code | grep home | wc -l
13
Looks like 4 teams have the day off.

They are often two different codes in use and sometimes they will use one but not the other. For example, the home_code may be used in the section where I parse home run data for line scores, whereas the home_file_code may be used almost everywhere else. It gets even worse for MiLB where the home_code and home_file_code are vastly different and used for different purposes. The home_code may be something like oma for Omaha and t541 for the home_file_code. So for line scores, I have to check whether I am parsing a minor league file or not and use the home_code where I would normally use the home_file_code.

I believe I use the *_file_code wherever possible. Even in places where they use the *_code, I build a dynamic mapping of *_code to *_file_code so I can continue to use the *_file_code. This is the reason why "la" is used in place of "lan" even though lan is what will show up in the game id:

${year}/${month}/${day}-${away_code}mlb-${home_code}mlb-${game}

So if you wanted to build your own dictionary, find a day with a full schedule and make your own map of home_code to home_file_code and away_code to away_file_code. The (home,away)_code is what will appear in the game id but the (home,away)_file_code is what you'll need to select the stream in the v= or a= parameters.

Long story short, I'll do this myself and update the documentation wherever necessary.

For MiLB, I build the TEAMCODES dictionary dynamically. Every time I parse the media JSON page (it's not even XML), I add an entry to TEAMCODES in memory. Therefore for MiLB, I recommend you always use milblistings first to see if the desired team is even on the broadcast schedule for the day. If it's not and you request a game for that team code in milbplay, TEAMCODES won't have the entry and report "invalid teamcode". For milbplay and milblistings, the code in the milblisting is what I use in milbplay.

I'll look into making this the behavior in mlblistings/mlbplay as well.
 
Old 05-21-2013, 07:13 AM   #4087
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,767

Rep: Reputation: 76
Quote:
Originally Posted by icelancer View Post
Remapping the team codes:

Since this is out of date:

Code:
     'ana', 'ari', 'atl', 'bal', 'bos', 'chc', 'cin', 'cle', 'col',
     'cws', 'det', 'fla', 'hou', 'kc', 'la', 'mil', 'min', 'nym',
     'nyy', 'oak', 'phi', 'pit', 'sd', 'sea', 'sf', 'stl', 'tb',
     'tex', 'tor', 'was'
I am working on the new map, since I use mlbplay.py instead of mlbviewer.py - unless you happen to have it on hand!

EDIT: I also sent a very small donation to you via Paypal. More on the way when I get some spare change Thanks for everything you do!
Thanks for the donation. I appreciate it.

As I rambled on in the last post, the codes in mlblistings are different from the codes used in mlbplay. Mlblistings will show sln, nyn, nya, chn, cha, etc whereas mlbplay will expect stl, nym, nyy, chc, cws, etc. I do see the error with mia vs fla. I'll double check the others and update the documentation wherever necessary.
 
Old 05-21-2013, 12:58 PM   #4088
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,767

Rep: Reputation: 76
SVN rev 494: Favorite team highlighting in scoreboard view

Only seemed logical that if favorite team highlighting in listings view, I should also highlight in scoreboard view. I can't use the underlining if use_color=0 because I already use underline to break up the games. But, if use_color=1, favorite_color= will be used to highlight the game in scoreboard view. Really helpful because now I can see both my team and their first place rivals much easier. Grr! @ Cleveland!

SVN rev 495: Modifications to status line to properly reflect MiLB

MiLB listings will display status flags of:

Code:
Status: In Progress (No audio)                     [MILB][1000K][--]
Only debug toggle will be functional. Other toggles will be ignored in MiLB mode to properly reflect MiLB.tv capabilities.

SVN rev 498: Fixed (Archived) game indicator in MiLB listings as well as changing [MILB] to [MiLB] in status line

Last edited by daftcat; 05-21-2013 at 05:53 PM.
 
Old 05-22-2013, 01:31 PM   #4089
BostonPeng
Member
 
Registered: Jul 2009
Location: Boston, MA
Distribution: SolydK Testing + KDE 4.9.5
Posts: 88

Rep: Reputation: Disabled
I just discovered another perk to running mlbviewer: When highlights are available during the game they're also available in mlbviewer! I'm following the Dodgers/Brewers game in MLB Gameday (thank Tux for day games!) and the video of Kemp's RBI single is already available in the Top Plays for the game. Sweeeet!
 
Old 05-22-2013, 02:12 PM   #4090
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,767

Rep: Reputation: 76
Quote:
Originally Posted by BostonPeng View Post
I just discovered another perk to running mlbviewer: When highlights are available during the game they're also available in mlbviewer! I'm following the Dodgers/Brewers game in MLB Gameday (thank Tux for day games!) and the video of Kemp's RBI single is already available in the Top Plays for the game. Sweeeet!
Box scores also update as the game progresses.

(As does line score and scoreboard view.)
 
Old 05-22-2013, 02:15 PM   #4091
BostonPeng
Member
 
Registered: Jul 2009
Location: Boston, MA
Distribution: SolydK Testing + KDE 4.9.5
Posts: 88

Rep: Reputation: Disabled
Quote:
Originally Posted by daftcat View Post
Box scores also update as the game progresses.

(As does line score and scoreboard view.)
I've been seeing that as well, but the videos are the most welcome since I can't seem to enjoy the in-browser videos for some reason. All of them seem to stutter, including the live lookins, so at least being able to see the highlights are welcome, even if I'd like clips from things that aren't shown like the injury delay earlier in this game.
 
Old 05-29-2013, 06:40 PM   #4092
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,767

Rep: Reputation: 76
SVN revision 501: filename_format and various bug fixes

Updated error message for non-subscribers requesting subscription content.

Updated error message for jump-to-inning and condensed games not supported in MiLB.

Added filename_format option (icelancer, this one's for you).

If %f appears in audio_player or video_player, default filename format was always GAMEID-CALL_LETTERS.suffix (mp3 for audio or mp4 for video)

That's still the default. But if filename_format= is in config file, it will override this default.

Code:
         Supported_tokens =  ( '%g', gameid, e.g. 2013-05-28-slnmlb-kcamlb-1
                               '%l', call_letters, e.g. FSKC-HD
                               '%t', team_id, e.g. 118 (mostly useless)
                               '%c', content_id, e.g. 27310673
                               '%e', event_id, e.g. 14-347519-2013-05-28
                               '%m', suffix, e.g. 'mp3' or 'mp4')
         Default format (%g-%l.%m) would translate to:
         2013-05-28-slnmlb-kcamlb-1-FSKC-HD.mp4
         Default milb format is %g.%m (as call letters are always empty in MiLB)
And anything that doesn't match one of those tokens is taken literally such as filename_format=mlbgame.%m would be mlbgame.mp3 for audio or mlbgame.mp4 for video.

Also added same functionality to milb.

Also changed both mlbplay and milbplay to display the command string (not just the media URL) when d=1 flag is included. This let's you dry run your filename_format without actually running the streamer/player commands.

Rev 502

Fixed a line score bug. Zimmerman did actually hit 3 HR's despite what my buggy code was telling you.

Last edited by daftcat; 05-29-2013 at 11:20 PM.
 
1 members found this post helpful.
Old 05-30-2013, 01:40 AM   #4093
icelancer
LQ Newbie
 
Registered: May 2013
Posts: 13

Rep: Reputation: Disabled
Thanks a bunch! Donation incoming later tonight!

Last edited by icelancer; 05-30-2013 at 03:56 AM. Reason: sent
 
Old 05-30-2013, 04:29 AM   #4094
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,767

Rep: Reputation: 76
Quote:
Originally Posted by icelancer View Post
Thanks a bunch! Donation incoming later tonight!
Thank you! Much appreciated.

Checked in a couple more fixes into 504; one for CG (%t is int(0) so coerce it to str(0).) Removed separate prepareFilename in MiLBMediaStream so it can inherit it from MediaStream base class (e.g. consolidate the code with a couple checks for milbtv so I only have to maintain the code in one place.)
 
Old 05-30-2013, 01:16 PM   #4095
BostonPeng
Member
 
Registered: Jul 2009
Location: Boston, MA
Distribution: SolydK Testing + KDE 4.9.5
Posts: 88

Rep: Reputation: Disabled
I see that as of Monday it looks like MLB is changing their online video system. Instead of the highlights showing up in the usual 640x360 size they have a new larger option of 960x540. I can't see if there are quality differences but I was able to get the info in the attached image from VLC on a pair of downloaded videos. (Videos were downloaded with my web browser, not mlbviewer, and strictly for my own viewing.)

@daftcat:
I'm wondering if this has any impact on what you're doing with mlbviewer.
Attached Images
File Type: png MLB video size comparison.png (54.1 KB, 5 views)
 
  


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 11:16 PM
link dies intermittently-seemingly at random- between win<->linux not linux<->linux?? takahaya Linux - Networking 10 03-09-2007 11:37 PM
triple boot linux/linux/linux No Windows involved toastermaker Linux - Newbie 12 03-02-2006 11:40 PM
Redhat (rhel v2.1) bootup problem with linux (linux vs linux-up) namgor Linux - Software 2 06-24-2004 03:49 PM


All times are GMT -5. The time now is 10:32 PM.

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