LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 04-08-2013, 08:51 AM   #3946
larshenric
Member
 
Registered: Aug 2012
Location: Flensburg, Germany
Distribution: several
Posts: 90

Rep: Reputation: Disabled

thanks again for all your work on this fine project... it's more than satisfying...!! :-)
 
Old 04-08-2013, 02:21 PM   #3947
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
SVN revision 414: Added Last Play to In Progress games in line score

Lots of SVN activity this weekend on the line score feature.

Summary of the line score feature today:
  • 'b' key brings up a line score.
  • The line score is split into the line itself, some action lines, and a HR line for in progress and completed games.
  • For games in progress, the action lines will display in game information like current pitcher, current hitter, the count, outs, runners on base, and the last play.
  • To refresh the in game action, press the 'b' key again.
  • For completed games, the action lines will display winning pitcher, losing pitcher, and save (if present.)
  • For games not yet started, the action lines will display the probable pitchers.
  • Not all game statuses are handled yet. Expect (and please report) a crash (with the date and game) for less common statuses like "Postponed", "Delayed", "Completed Early", etc.
  • Line score frames are fixed to 9. If a game went to extra frames, you will only see the first 9 but the game status will say something like "Final/11". I haven't figured out a good way to scroll the line score horizontally yet.

Any other bugs or oddities, please report them with the date and the game so I can reproduce them and fix it.

Last edited by daftcat; 04-08-2013 at 02:30 PM.
 
Old 04-08-2013, 05:01 PM   #3948
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
I am really digging the line score feature. I can't always watch/listen to a game at work and the Flash Gameday (well, really just Flash) can slow down my browser. I get just enough of an update to feel like I'm still in it. Can't wait til I get box score done. Configurable keybindings first.

Anyone else using line score yet? Would you like to see on-deck, in-hole, and who the runners on the bases are? I have all that info already. Just need to add it to the line score screen.
 
Old 04-09-2013, 03:46 AM   #3949
larshenric
Member
 
Registered: Aug 2012
Location: Flensburg, Germany
Distribution: several
Posts: 90

Rep: Reputation: Disabled
as I already described last season I'm a big fan of the mlbgamedl-feature... now it happened twice that I didn't get the right broadcast... concerning the cubs games I configured to get the cubs covergage... but for example of last night's home opener I got the milwaukee broadcast...
any idea?

lars
 
Old 04-09-2013, 04:36 AM   #3950
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by larshenric View Post
as I already described last season I'm a big fan of the mlbgamedl-feature... now it happened twice that I didn't get the right broadcast... concerning the cubs games I configured to get the cubs covergage... but for example of last night's home opener I got the milwaukee broadcast...
any idea?

lars
mlbgamedl is test code only. It's not really intended to be used for anything other than grabbing a short video sample, say for ffmpeg or mplayer developers to see if there is a bug in their playback code.

Recording a full game is a grey area. There is nothing in the MLB.TV terms of service that says you can't but then there is also no such capability in the official offering.

That said, in order to get a specific stream, you will need to request both an event-id and a content-id. The default behavior in mlbgamedl is to just grab the first acceptable content-id. To find the content-id for the Cubs broadcast, the easiest way to do that would be to pull up the media debug in mlbplay (z=1 enables the media debug):

Code:
$ ./mlbplay.py v=chc z=1
media = [('WGN-HD', u'112', '26004873', '14-346836-2013-04-08'), ('FSWI-HD', u'158', '26004867', '14-346836-2013-04-08')]
prefer = ('WGN-HD', u'112', '26004873', '14-346836-2013-04-08')
The event-id is the 4th field and the content-id is the third field.

So your mlbgamedl command would be:

Code:
$ test/mlbgamedl.py 14-346836-2013-04-08 26004873
Again, this is test code only and I won't be supporting mlbgamedl for anything other than its intended purpose (testing the basic algorithm of requesting media and recording a short sample for media player developers.)

If what you're really after is smoother playback, I would recommend adjusting the cache value in your video_player command. Taking the 3000 kbps stream for example, each second would require 384 kB of cache. So to buffer 10 s, you would need a cache value of 3840. However, since mplayer begins playback after only 20% cache fill (by default), you would really need about 5 times that value e.g. -cache 19200. Now 10 s is probably more than you need. But I just use it as an example.

Because my internet connection is pretty flaky, I usually use mlbhls with a minimum stream speed of 800K and a maximum stream speed of 1200K with adaptive streaming enabled and a cache value of 8192. What this all looks like in ~/.mlb/config:

Code:
use_nexdef=1
min_bps=800000
max_bps=1200000
adaptive_stream=1
video_player=mplayer2 -vo xv -cache 8192
Although, I now have 4 GB of RAM instead of 1 GB on the old laptop and a considerably faster machine than before. I could probably safely double that cache value and not even notice (other than taking twice as long to begin playback.)

Last edited by daftcat; 04-09-2013 at 04:40 AM.
 
Old 04-09-2013, 04:41 AM   #3951
fang2415
Member
 
Registered: Jan 2007
Posts: 195

Rep: Reputation: 15
Quote:
Anyone else using line score yet?
Lol, I only just figured out how to use the jump to innings feature.

Which is terrific, btw, although I couldn't find it documented anywhere (help screen or README at least) -- I remembered it from the thread here and just guessed that pressing "i" would work. Now that I have, it's much easier than resuming games by guessing line numbers for mlbhls!

Anyway, it sounds like line scores will be most useful for people who follow live games, so I doubt I'll use it much unless I'm stateside; but who knows, maybe I'll find a great way to use it in three years!...

Terrific work, as always.
 
Old 04-09-2013, 08:33 AM   #3952
splittter
LQ Newbie
 
Registered: Apr 2013
Posts: 8

Rep: Reputation: Disabled
Quote:
Originally Posted by daftcat View Post
Anyone else using line score yet? Would you like to see on-deck, in-hole, and who the runners on the bases are? I have all that info already. Just need to add it to the line score screen.
Really like the linescore, was just thinking the other day that this was the last thing I'd need to make mlbviewer the way I looked at most day-to-day baseball stuff. Living in Europe a lot of the action takes place whilst I'm in bed, so usually start the day running through the scores, which I can now do at the same time as deciding what I might like to watch.

It'll also be useful to see which game it's worth having a look at if several are going on, which I tend to do now by looking at a livescore app on my phone, so the extra info you mention would definitely be interesting to see. Also, a discreet way to follow a game whilst 'at work'.

I quite liked, in the official flash app, the ability to toggle showing the live scores on the game listing. Can imagine that might be more of a pain to incorporate, and would definitely need to be something you turned on and off (usually off, and maybe just available for in-play games), but I'd use it.
 
Old 04-09-2013, 12:02 PM   #3953
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by splittter View Post
Really like the linescore, was just thinking the other day that this was the last thing I'd need to make mlbviewer the way I looked at most day-to-day baseball stuff. Living in Europe a lot of the action takes place whilst I'm in bed, so usually start the day running through the scores, which I can now do at the same time as deciding what I might like to watch.

It'll also be useful to see which game it's worth having a look at if several are going on, which I tend to do now by looking at a livescore app on my phone, so the extra info you mention would definitely be interesting to see. Also, a discreet way to follow a game whilst 'at work'.

I quite liked, in the official flash app, the ability to toggle showing the live scores on the game listing. Can imagine that might be more of a pain to incorporate, and would definitely need to be something you turned on and off (usually off, and maybe just available for in-play games), but I'd use it.
I made a few additions to line scores yesterday that now live games show on-deck and the names of the runners on base.

I don't really want to implement full gameday functionality. I mean, I certainly could right down to knowing where those xml files are. But I think mlb.com probably does a better job of it than I could. Also, I'm pretty sure Gameday is one of those patented or patent-pending features of mlb.com that I'd rather not try to duplicate for legal reasons.

I am considering implementing a mini-scores view that would let you see all the games in a two line summary on one (scrolling) page. This could help make deciding a game to watch easier than having to pull up each line score individually.

Maybe something like:

Code:
(Final)   MIN  1  8  0  L: Correia (0-1 3.14)
           KC  3  9  0  W: Santana, E (1-1, 3.21), SV: Crow (1)
(Top 8)   NYY  9 10  0  B: Hafner  OD: Wells; 2 on, 1-2, 2 outs
          CLE  3  6  1  P: Allen 
(Preview) LAD  0  0  0  P: Beckett (0-1, 4.50)
 6:40 PM   SD  0  0  0  P: Richard (0-1, 14.54)
And have the cursor highlight two lines at a time (move up and down two lines at a time) and enable all views to be selected from this view (e.g. audio, video, condensed, highlights, line scores, innings, etc.) This would not be a default view because a lot of people don't like spoilers. It would be an optional view that those of us who always catch a game either already in progress or after it's over and want to know which one to watch can get a quick view of which one(s) might be worthwhile. Or just a quick "stealth" view of what's going on in the league for those of us who don't want to have a browser tab open to mlb.com at work.

Last night I implemented the configurable keybindings. I want to get the documentation updated for line scores and keybindings, give you guys a few days to test it, and then get a second sourceforge release uploaded with these two new features (plus the few minor bug fixes since the last sf-1.)
 
Old 04-09-2013, 12:19 PM   #3954
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by fang2415 View Post
Lol, I only just figured out how to use the jump to innings feature.

Which is terrific, btw, although I couldn't find it documented anywhere (help screen or README at least) -- I remembered it from the thread here and just guessed that pressing "i" would work. Now that I have, it's much easier than resuming games by guessing line numbers for mlbhls!

Anyway, it sounds like line scores will be most useful for people who follow live games, so I doubt I'll use it much unless I'm stateside; but who knows, maybe I'll find a great way to use it in three years!...

Terrific work, as always.
Documentation is already, I feel, too long. However, the latest feature I implemented is configurable keybindings (not checked in yet) which will describe all the keys and their internal names including ones I may not have in the current documentation and allow you to redefine which key to map a feature to while also updating the help screen with your current bindings. The help screen now scrolls so I have all the space I need to document all the keys instead of just picking the 24 most important (really about 21 with title and status lines and less with heading lines.)

As a preview, each key has a macro name like INNINGS, VIDEO, etc and the help screen maps
the macro to a text description like "Play video of the highlighted game" for VIDEO. The default keybindings will let you update to this revision without any extra effort. However, if you wanted to add a binding of "v" to VIDEO, you would add:

Code:
VIDEO=v
to ~/.mlb/keybindings

There are some bindings that are not overridden but can be added to such as UP, DOWN, LEFT, RIGHT, VIDEO, AUDIO, and HELP. The others would be overridden. For example, you could use 'l' for line scores and 'r' for REFRESH and LISTINGS.

This is not checked in yet but I hope to get it checked in tonight. Letting you guys pick the keybinding that make the most sense to you will help both you and me while being able to add more new features this season and not worry about whether the default key is too obscure.
 
Old 04-09-2013, 02:22 PM   #3955
chrisVV
Member
 
Registered: Aug 2010
Posts: 548

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
I have notice that although jump-to-inning now mostly works with nexdef/mlbhls, there are still some games which do not work correctly. If you go to the ESPN Sunday late game, Angels v Rangers, then any selected inning will take you to the end of the game.
 
Old 04-09-2013, 03:17 PM   #3956
larshenric
Member
 
Registered: Aug 2012
Location: Flensburg, Germany
Distribution: several
Posts: 90

Rep: Reputation: Disabled
It's less the need for smoother playback, rather the dvr-function that#s nice, as most part of the games are past midnight here in germany... ;-)
but anyway thanks a lot for the information...!!
 
Old 04-09-2013, 03:17 PM   #3957
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by chrisVV View Post
I have notice that although jump-to-inning now mostly works with nexdef/mlbhls, there are still some games which do not work correctly. If you go to the ESPN Sunday late game, Angels v Rangers, then any selected inning will take you to the end of the game.
Confirmed.

thegryghost? Any ideas why this one would be any different? Oooh. Seems like a nifty corner case. Check out the X-PROGRAM-DATE-TIME:

Quote:
#EXT-X-PROGRAM-DATE-TIME:2013-04-08T00:00:00+00:00
 
Old 04-09-2013, 06:45 PM   #3958
thegryghost
Member
 
Registered: Mar 2009
Distribution: Gentoo
Posts: 30

Rep: Reputation: 1
Quote:
Originally Posted by daftcat View Post
Confirmed.

thegryghost? Any ideas why this one would be any different? Oooh. Seems like a nifty corner case. Check out the X-PROGRAM-DATE-TIME:
Another hack (rev 67). If the playlist parse'd start time is 0, I'll just set it to 1. Test and let me know...

Last edited by thegryghost; 04-09-2013 at 06:46 PM. Reason: added svn rev
 
Old 04-09-2013, 07:59 PM   #3959
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by thegryghost View Post
Another hack (rev 67). If the playlist parse'd start time is 0, I'll just set it to 1. Test and let me know...
Works for me. Thanks for the continued support.
 
Old 04-09-2013, 11:23 PM   #3960
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by larshenric View Post
It's less the need for smoother playback, rather the dvr-function that#s nice, as most part of the games are past midnight here in germany... ;-)
but anyway thanks a lot for the information...!!
You want to look deeper into mlbplay (MLBPLAY-HELP) and mlbhls. mlbplay is a command-line version of mlbviewer (without the curses GUI) that uses the same library code (not the nasty quick-and-dirty code in the test scripts.) Together with mlblistings, you can create some pretty powerful shell scripts to do just about whatever you want to do.

I just checked in a fix for mlbplay (bug introduced by the rewrite of MLBviewer library) that should allow you to cook something up. Check out the usage statement for mlbhls and the n=1 flag (use_nexdef) and nu=1 flag (just print the base64 url then exit) in mlbplay.py:

Code:
$ mlbplay.py v=chc n=1 nu=1
I wash my hands of what you're about to do.

Last edited by daftcat; 04-09-2013 at 11:24 PM.
 
  


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

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