LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-12-2013, 09:57 AM   #3796
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,745

Rep: Reputation: 76
SVN revision 383: added use_wired_web configuration option and updated test/mediaxml.py


So that you don't have to make that edit every time you update, I have added the configuration file option use_wired_web. It defaults to 0 but you can change it to 1 for basic subscribers who want to use nexdef.

In fact, if premium subscribers want to do some testing for me, they can add use_wired_web=1 to their configuration file as well. I want to know if you notice any performance or quality differences. If you see no difference, I could make use_wired_web=1 the default for everyone.

Also, did you know that those XML replies from the test tools are saved to ~/.mlb/successful-1.xml and ~/.mlb/successful-2.xml (or unsuccessful-1.xml and unsuccessful-2.xml) for all media requests? Yeah, me neither. Sometimes I make debug additions I forget I made. You can use test/mediaxml.py on either one of those files to see a decoded version of the xml similar to that pastebin I posted above.
 
Old 03-12-2013, 10:38 AM   #3797
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
Check both video_player and audio_player.

vlc is not the default player in mlbviewer so you are picking it up somewhere. Try removing/renaming the config file and let it auto-generate a new one.

The help error occurs when there are either more lines or more columns of text to print than your terminal supports. Sorry, I just haven't implemented truncation or scrolling in all my addstr()'s. Then again, the help screen is formatted for a standard 80x24 terminal.
I had forgotten there was a top_plays_player, which is where vlc was being picked up since I'm just watching highlights since I don't have a subscription.

ETA: Is there any way to play all the top plays from a game in a playlist? I'm not sure if it's possible but I'd love to be able to catch the highlights form a game that way.

Last edited by BostonPeng; 03-12-2013 at 10:47 AM. Reason: Added a top plays query
 
Old 03-12-2013, 12:37 PM   #3798
randcoop
LQ Newbie
 
Registered: Jun 2005
Posts: 16

Rep: Reputation: 0
Cannot create configuration file

For some reason, mlbviewer.py is giving me an error in trying to create a configuration file. I'm wondering if I can bypass the problem by manually creating the file. Can someone here pass along a generic configuration file and tell me where it should be located?

I don't see how this can be a permissions issue, since it happens even if I try to run the program as root.

Thanks for any help that can be offered.
 
Old 03-12-2013, 01:15 PM   #3799
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,745

Rep: Reputation: 76
Quote:
Originally Posted by randcoop View Post
For some reason, mlbviewer.py is giving me an error in trying to create a configuration file. I'm wondering if I can bypass the problem by manually creating the file. Can someone here pass along a generic configuration file and tell me where it should be located?

I don't see how this can be a permissions issue, since it happens even if I try to run the program as root.

Thanks for any help that can be offered.
Post the error.
 
Old 03-12-2013, 01:56 PM   #3800
chrisVV
Member
 
Registered: Aug 2010
Posts: 108

Rep: Reputation: 1
Quote:
Originally Posted by daftcat View Post
So that you don't have to make that edit every time you update, I have added the configuration file option use_wired_web. It defaults to 0 but you can change it to 1 for basic subscribers who want to use nexdef.
It works fine, thanks.
 
Old 03-12-2013, 10:22 PM   #3801
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,745

Rep: Reputation: 76
Quote:
Originally Posted by BostonPeng View Post
I had forgotten there was a top_plays_player, which is where vlc was being picked up since I'm just watching highlights since I don't have a subscription.

ETA: Is there any way to play all the top plays from a game in a playlist? I'm not sure if it's possible but I'd love to be able to catch the highlights form a game that way.
Interesting thought. I'm away from my comp right now so I can't comment with authority yet. If top plays are just direct links to the videos, it shouldn't be too hard. Maybe a lazy Sunday project. If it takes two XML requests like normal video then probably not.

Also I have something else up my sleeve that I've been playing with that as a non-subscriber, you'll probably appreciate.
 
Old 03-13-2013, 06:27 AM   #3802
randcoop
LQ Newbie
 
Registered: Jun 2005
Posts: 16

Rep: Reputation: 0
Quote:
Originally Posted by daftcat View Post
Post the error.
File "mlbviewer.py", line 113
print 'Creating configuration files'

SyntaxError: invalid syntax

Then, if I comment out line 113 (the print command), I get this:

File "mlbviewer.py", line 118
print 'Could not create directory: ' + '\n'

SyntaxError: invalid syntax
 
Old 03-13-2013, 08:25 AM   #3803
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
Interesting thought. I'm away from my comp right now so I can't comment with authority yet. If top plays are just direct links to the videos, it shouldn't be too hard. Maybe a lazy Sunday project. If it takes two XML requests like normal video then probably not.

Also I have something else up my sleeve that I've been playing with that as a non-subscriber, you'll probably appreciate.
Thanks for looking into the top plays playlist. It's a bit of a pain to have to close my player after each video to see the next one, although I haven't even looked to see if there's a way to bypass closing the player to let mlbviewer know I'm ready for something else. And goodies for us poor folk who can't afford a subscription? I look forward to seeing what you have in mind.
 
Old 03-14-2013, 12:39 AM   #3804
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,745

Rep: Reputation: 76
Quote:
Originally Posted by randcoop View Post
File "mlbviewer.py", line 113
print 'Creating configuration files'

SyntaxError: invalid syntax

Then, if I comment out line 113 (the print command), I get this:

File "mlbviewer.py", line 118
print 'Could not create directory: ' + '\n'

SyntaxError: invalid syntax
Sounds like you have python 3.0. Mlbviewer is written for 2.x (Mostly 2.7ish)

What does "python --version" say?

See if you can install python2.7 on your system.
 
Old 03-14-2013, 12:45 AM   #3805
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,745

Rep: Reputation: 76
Quote:
Originally Posted by BostonPeng View Post
Thanks for looking into the top plays playlist. It's a bit of a pain to have to close my player after each video to see the next one, although I haven't even looked to see if there's a way to bypass closing the player to let mlbviewer know I'm ready for something else. And goodies for us poor folk who can't afford a subscription? I look forward to seeing what you have in mind.
Top plays is a single file (...gameid/media/highlights.xml) and each individual highlight has a direct url. It should be a problem to implement a playlist. Sunday afternoon project.

The other thing(s) I'm working will take longer.
 
Old 03-14-2013, 08:32 AM   #3806
randcoop
LQ Newbie
 
Registered: Jun 2005
Posts: 16

Rep: Reputation: 0
Quote:
Originally Posted by daftcat View Post
Sounds like you have python 3.0. Mlbviewer is written for 2.x (Mostly 2.7ish)

What does "python --version" say?

See if you can install python2.7 on your system.
I have both python 3.3 and python 2.7 installed (it's Arch linux).

I don't know how to get mlbviewer to use 2.7, though. Any suggestion?

Thanks again for your help.
 
Old 03-14-2013, 09:14 AM   #3807
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
Top plays is a single file (...gameid/media/highlights.xml) and each individual highlight has a direct url. It should be a problem to implement a playlist. Sunday afternoon project.

The other thing(s) I'm working will take longer.
I was afraid top plays worked like that. Is it possible to select a new video in mlbviewer without closing my video player? If so that could work for me. As far as the other thing? No rush from me. I'm just glad to have mlbviewer to be able to watch my daily highlight videos. It may even keep me from saving each video in my web browser to be able to watch them, although it won't help me with getting them in game order. And that's just a personal quirk of mine.
 
Old 03-14-2013, 12:11 PM   #3808
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,745

Rep: Reputation: 76
Quote:
Originally Posted by BostonPeng View Post
I was afraid top plays worked like that. Is it possible to select a new video in mlbviewer without closing my video player? If so that could work for me. As far as the other thing? No rush from me. I'm just glad to have mlbviewer to be able to watch my daily highlight videos. It may even keep me from saving each video in my web browser to be able to watch them, although it won't help me with getting them in game order. And that's just a personal quirk of mine.
I meant to say "should not" be a problem to implement playlist functionality this weekend.

No, it's more of a problem to interact with an already open mplayer instance.

If you want a sneak preview of what will eventually be implemented:

Code:
cd test
wget http://gdx.mlb.com/components/game/mlb/year_2013/month_03/day_13/gid_2013_03_13_anamlb_sdnmlb_1/media/highlights.xml
./mediaxml.py highlights.xml | grep mp4 | awk '{print $2}' > highlights.m3u8
mplayer -playlist highlights.m3u8
I'm just going to add a new keybinding (or overload an existing one for the highlights screen) that will automate this for you once you've navigated to the top plays screen for a particular game.
 
Old 03-14-2013, 12:15 PM   #3809
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
I meant to say "should not" be a problem to implement playlist functionality this weekend.

No, it's more of a problem to interact with an already open mplayer instance.

If you want a sneak preview of what will eventually be implemented:

Code:
cd test
wget http://gdx.mlb.com/components/game/mlb/year_2013/month_03/day_13/gid_2013_03_13_anamlb_sdnmlb_1/media/highlights.xml
./mediaxml.py highlights.xml | grep mp4 | awk '{print $2}' > highlights.m3u8
mplayer -playlist highlights.m3u8
I'm just going to add a new keybinding (or overload an existing one for the highlights screen) that will automate this for you once you've navigated to the top plays screen for a particular game.
I had an idea I needed to close the player between videos. That looks pretty cool. I'll wait to take it for a spin since I'm also running tests for SolydK's Update Pack 1 and don't want to confuse me or my laptop too much. I know when you roll it out it'll probably be well worth waiting for.
 
Old 03-14-2013, 12:24 PM   #3810
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,745

Rep: Reputation: 76
Quote:
Originally Posted by randcoop View Post
I have both python 3.3 and python 2.7 installed (it's Arch linux).

I don't know how to get mlbviewer to use 2.7, though. Any suggestion?

Thanks again for your help.
Gah! I understand that python3 is the next generation but python2.7 is still probably more widely used. I don't like distros that try to be bleeding edge just to be bleeding edge.

Now that I have that off my chest.

You could change the symbolic link from /usr/bin/python from python3.3 to python2.7 but that may break a whole ton of system stuff if they actually did the system stuff in python3.3.

You could change the top line of every file from #!/usr/bin/env python to #!/usr/bin/python2.7 except you'll have to do that every time a file gets updated. Not a good option.

If you have /usr/local/bin ahead of /usr/bin in your PATH (env | grep PATH), you can add try adding a symbolic link in /usr/local/bin to python2.7 (ln -s /usr/bin/python2.7 /usr/local/bin/python)

That third option may be the safest but there may still be user-level python bindings that could get affected.

You can try it and see if that fixes mlbviewer for you. Then you'll have to watch to see if anything else breaks (maybe anything that uses dbus?)

Let me look into this and see what I can come up with.
 
  


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 08:24 AM.

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