Friday, March 26, 2010

using mlbviewer for gameday audio

got my account working with mlbviewer (make sure to get the svn version for 2010 changes!) and the latest rtmpdump. only change i had to make was to change
DEFAULT_F_RECORD = 'rtmpdump -f \"LNX 10,0,22,87\" -o %f -r %s'
to
DEFAULT_F_RECORD = os.path.join(os.environ['HOME'],'checkinstall','rtmpdump','rtmpdump-2.2b','rtmpdump -f \"LNX 10,0,22,87\" -o %f -r %s')
in MLBviewer/mlbtv.py since i haven't installed rtmpdump in root. my ~/.mlb/config is
use_nexdef=False
user = <>
pass = <>
#debug = True
show_player_command = True
speed = 800
audio_player = mplayer -dumpstream %s -dumpfile %f
use_xml = False
audio_follow = 'bos'
favorite = 'bos'
i'm not totally sure about needing that use_xml = False, but i had some connection problems (the fact that the mlb seems to look me out for some time after i fail and/or try to reconnect soon doesn't help) before messing around with stuff and this Just Works. now i just run mlbviewer.py, navigate to the game, and press 'a' to download.
even though mlbviewer names the file .mp3, it's actually a flv with a single (mp3) stream. these commands are handy for demuxing and chopping the mp3 to more manageable sizes for my mp3 player.
ffmpeg -i 2010-03-19-bosmlb-pitmlb-1-MLB.com.mp3 -acodec copy tmp.mp3
mpgsplit -18 tmp.mp3 -b 2010-03-19-bos-pit
now i just need to rig up mlblistings, test/gamedayaudio.py, and the above commands to do this automatically and put stuff on my mp3 player. also need to put some tags on the files so they are conveniently grouped.

1 comment:

sruchris said...

Do you get the whole game, or only the first hour?