LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 04-17-2008, 06:31 PM   #451
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86

Quote:
Originally Posted by jkr View Post
I have no problem with this, but I'm curious about its use. Do people frequently watch different speed streams on the same computer?

I guess if you have a laptop that is sometimes on a slow connection and sometimes on a fast connection?

But, yeah, it definitely makes sense to add it in if there's a need. I'm just strongly agreeing with you that we should keep the simplest case -- and the one that I imagine 75% of users will use -- a transparent default.
The primary motivation for adding this in is that I've been having an awful time snagging streams. I noticed that sometimes when the 400k stream is giving me crap, the 800k stream will be just fine, or vice versa.

Which version of mplayer are you using? Just type mplayer with no args and copy that version line to me.

I think some idiot at Debian thought it would be a good idea to package a subversion drop instead of an official release. I'm building the official release as we speak.
 
Old 04-17-2008, 06:42 PM   #452
jkr
Member
 
Registered: Apr 2008
Posts: 115

Rep: Reputation: 15
Quote:
Originally Posted by daftcat View Post
Which version of mplayer are you using? Just type mplayer with no args and copy that version line to me.
1.0~rc1-0ubuntu13.1

Who knows what's in the ubuntu patchset?

Everything's been working fine. I just tried 400. Works fine. Looks like crap, but works fine.

Chances are the official release is the way to go. I seem to remember the mplayer people getting in a fuss about how Debian wasn't packaging their program properly or something...
 
Old 04-17-2008, 06:55 PM   #453
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by jkr View Post
1.0~rc1-0ubuntu13.1

Who knows what's in the ubuntu patchset?

Everything's been working fine. I just tried 400. Works fine. Looks like crap, but works fine.

Chances are the official release is the way to go. I seem to remember the mplayer people getting in a fuss about how Debian wasn't packaging their program properly or something...
Send me your ~/.mlb/log file. I want to see if we're getting different servers. It would make sense. There's probably geographical information in the cookie or it's something cool that Cisco can do for content networking where the same URL maps to different regional content delivery networks based on geographic location. Anyway, I feel like I've got the crap farm. I sure hope this gets sorted out as the season progresses.
 
Old 04-17-2008, 07:44 PM   #454
Wolfvorkian
Member
 
Registered: Sep 2007
Distribution: Arch
Posts: 108

Rep: Reputation: 15
Quote:
Originally Posted by jkr View Post
I have no problem with this,

But, yeah, it definitely makes sense to add it in if there's a need. I'm just strongly agreeing with you that we should keep the simplest case -- and the one that I imagine 75% of users will use -- a transparent default.
I hope you guys keep the script as simple as possible. A toggle for 400k or 800k would be okay but for my particular case, not really necessary. Most of the time 800 craps out on me, so I've seldom bother to even try the faster feeds anymore. I did call to see what the 3Mbs cost and it isn't much more, so If may upgrade but still changing a file isn't much of a problem or too much to ask.

I like simplicity, being able to either watch the games or listen to them is just fine afaic.... that is enough. Making an edit to a config file doesn't bother me any.It is none of my business really because this is your baby but I hope whatever time you guys spend in the future is used to make the existing product bullet proof... that is my druthers.
 
Old 04-17-2008, 08:08 PM   #455
oneil72
LQ Newbie
 
Registered: Apr 2008
Posts: 9

Rep: Reputation: 0
Hi guys, I've been following this thread with interest for a couple of weeks and just can't seem to get the script to run. I'm sure it is something I've done wrong since I'm still fairly new to GNU/Linux, but perhaps the error 'Name or service not known' has to do with the fact I'm in Canada. It doesn't look like the url's are different here though, so it's just a guess. I've downloaded the tarball from post 334 and installed system-wide, as well as run mlbviewer.py from the directory. I'm using ubuntu 7.10.

>>Traceback (most recent call last):
File "mlbviewer.py", line 311, in <module>
curses.wrapper(mainloop, mycfg.data)
File "curses/wrapper.py", line 44, in wrapper
File "mlbviewer.py", line 65, in mainloop
available = mysched.getListings(cfg['speed'],cfg['blackout'],cfg['audio_follow'])
File "/home/brent/Desktop/mlbviewer-0.1alpha5/MLBviewer/mlbtv.py", line 185, in getListings
self.getData()
File "/home/brent/Desktop/mlbviewer-0.1alpha5/MLBviewer/mlbtv.py", line 139, in getData
self.data = self.__jsonToPython()
File "/home/brent/Desktop/mlbviewer-0.1alpha5/MLBviewer/mlbtv.py", line 134, in __jsonToPython
return simplejson.loads(self.__scheduleToJson())
File "/home/brent/Desktop/mlbviewer-0.1alpha5/MLBviewer/mlbtv.py", line 116, in __scheduleToJson
mystr = re.sub(r'[\t\n]','',self.__getSchedule())
File "/home/brent/Desktop/mlbviewer-0.1alpha5/MLBviewer/mlbtv.py", line 101, in __getSchedule
fp = urllib2.urlopen(req)
File "/usr/lib/python2.5/urllib2.py", line 124, in urlopen
return _opener.open(url, data)
File "/usr/lib/python2.5/urllib2.py", line 381, in open
response = self._open(req, data)
File "/usr/lib/python2.5/urllib2.py", line 399, in _open
'_open', req)
File "/usr/lib/python2.5/urllib2.py", line 360, in _call_chain
result = func(*args)
File "/usr/lib/python2.5/urllib2.py", line 1107, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.5/urllib2.py", line 1082, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error (-2, 'Name or service not known')>

My config file, in /.mlb is:
user = x
pass = x
video_player = mplayer
speed = 400

Your work is already appreciated, and any help you might have here would be huge for me. The last thing I want to do is resort to Windoze.
Thanks in advance.
 
Old 04-17-2008, 08:15 PM   #456
tram01
LQ Newbie
 
Registered: Apr 2008
Posts: 4

Rep: Reputation: 0
recording

as far as worrying about the legality of recording I would like to point out that on the mac you can easily save a stream or export it to your ipod using the blessed tools from mlb - flip4mac and quicktime.
 
Old 04-17-2008, 08:24 PM   #457
jkr
Member
 
Registered: Apr 2008
Posts: 115

Rep: Reputation: 15
Quote:
Originally Posted by oneil72 View Post
fp = urllib2.urlopen(req)
File "/usr/lib/python2.5/urllib2.py", line 124, in urlopen
File "/usr/lib/python2.5/urllib2.py", line 124, in urlopen
return _opener.open(url, data)
File "/usr/lib/python2.5/urllib2.py", line 381, in open
response = self._open(req, data)
File "/usr/lib/python2.5/urllib2.py", line 399, in _open
'_open', req)
File "/usr/lib/python2.5/urllib2.py", line 360, in _call_chain
result = func(*args)
File "/usr/lib/python2.5/urllib2.py", line 1107, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.5/urllib2.py", line 1082, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error (-2, 'Name or service not known')>
Weird, so it's having trouble getting the schedule. Not a problem I think we've seen before. Do me a favor. We're going to test it manually with this url:
Code:
"http://mlb.mlb.com/components/game/year_2008/month_04/day_17/gamesbydate.jsp"
] Open up a terminal, and type 'python'.

Code:
>>> import urllib2
>>> URL = "http://mlb.mlb.com/components/game/year_2008/month_04/day_17/gamesbydate.jsp"
>>> fp = urllib2.urlopen(URL)
>>> data = fp.read()
Does it crap out at any point in that process?
 
Old 04-17-2008, 08:28 PM   #458
jkr
Member
 
Registered: Apr 2008
Posts: 115

Rep: Reputation: 15
Quote:
Originally Posted by Wolfvorkian View Post
I like simplicity, being able to either watch the games or listen to them is just fine afaic.... that is enough. Making an edit to a config file doesn't bother me any.It is none of my business really because this is your baby but I hope whatever time you guys spend in the future is used to make the existing product bullet proof... that is my druthers.
I think we're largely in agreement with that. Editing config files doesn't bother me either, but I can also imagine that someone trying to figure out just the right mplayer setting would like to be able to switch it on the fly, and then write it to the config file later. Ultimately, though, the goal is to have it be as simple and intuitive as possible. The point being to watch baseball games, not play video games.
 
Old 04-17-2008, 09:51 PM   #459
oneil72
LQ Newbie
 
Registered: Apr 2008
Posts: 9

Rep: Reputation: 0
Quote:
Originally Posted by jkr View Post
Weird, so it's having trouble getting the schedule. Not a problem I think we've seen before. Do me a favor. We're going to test it manually with this url:
Code:
"http://mlb.mlb.com/components/game/year_2008/month_04/day_17/gamesbydate.jsp"
] Open up a terminal, and type 'python'.

Code:
>>> import urllib2
>>> URL = "http://mlb.mlb.com/components/game/year_2008/month_04/day_17/gamesbydate.jsp"
>>> fp = urllib2.urlopen(URL)
>>> data = fp.read()
Does it crap out at any point in that process?
Thanks jkr. This is what I get:

Python 2.5.1 (r251:54863, Mar 7 2008, 04:10:12)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib2
>>> URL = "http://mlb.mlb.com/components/game/year_2008/month_04/day_17/gamesbydate.jsp"
>>> fp = urllib2.urlopen(URL)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/urllib2.py", line 124, in urlopen
return _opener.open(url, data)
File "/usr/lib/python2.5/urllib2.py", line 381, in open
response = self._open(req, data)
File "/usr/lib/python2.5/urllib2.py", line 399, in _open
'_open', req)
File "/usr/lib/python2.5/urllib2.py", line 360, in _call_chain
result = func(*args)
File "/usr/lib/python2.5/urllib2.py", line 1107, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.5/urllib2.py", line 1082, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error (-2, 'Name or service not known')>
 
Old 04-17-2008, 09:53 PM   #460
hanophix
LQ Newbie
 
Registered: Apr 2008
Posts: 19

Rep: Reputation: 0
Am I mistaken here, but I am paying for only the 400k stream, can I still get the 800k with this script?
 
Old 04-18-2008, 12:17 AM   #461
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by oneil72 View Post
Thanks jkr. This is what I get:

Python 2.5.1 (r251:54863, Mar 7 2008, 04:10:12)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib2
>>> URL = "http://mlb.mlb.com/components/game/year_2008/month_04/day_17/gamesbydate.jsp"
>>> fp = urllib2.urlopen(URL)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/urllib2.py", line 124, in urlopen
return _opener.open(url, data)
File "/usr/lib/python2.5/urllib2.py", line 381, in open
response = self._open(req, data)
File "/usr/lib/python2.5/urllib2.py", line 399, in _open
'_open', req)
File "/usr/lib/python2.5/urllib2.py", line 360, in _call_chain
result = func(*args)
File "/usr/lib/python2.5/urllib2.py", line 1107, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.5/urllib2.py", line 1082, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error (-2, 'Name or service not known')>
Are you able to open that URL in your web browser?
 
Old 04-18-2008, 12:25 AM   #462
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by hanophix View Post
Am I mistaken here, but I am paying for only the 400k stream, can I still get the 800k with this script?
We authenticate you with mlb.com so theoretically, they should be enforcing what streams you are authorized to watch. It's probably encoded in your cookie but I don't really know because I'm paying for the premium service. You can always try turning debug on in your config file (debug=True) and check the $HOME/.mlb/log file to see the actual web page responses at the various stages.

I'd be very surprised and a little disappointed if you found a loophole. It's the stated policy of this project to implement feature parity with Windows users not allow you to get features you didn't pay for. That kind of use (or rather mis-use) is what would get this project shut down really quickly!
 
Old 04-18-2008, 12:30 AM   #463
oneil72
LQ Newbie
 
Registered: Apr 2008
Posts: 9

Rep: Reputation: 0
Quote:
Originally Posted by daftcat View Post
Are you able to open that URL in your web browser?
Yes, it opens no problem. Thanks daftcat.
 
Old 04-18-2008, 12:33 AM   #464
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by tram01 View Post
as far as worrying about the legality of recording I would like to point out that on the mac you can easily save a stream or export it to your ipod using the blessed tools from mlb - flip4mac and quicktime.
I'd rather fly under their radar than attract any unwanted attention. The best way to do that is to be feature equal with the official client software. Especially with mlb.com's history of litigation with, I believe it was Sling Box, I'd rather not get on their bad side. As I said earlier, the code and the tools are out there, but it's not going to be anything we implement or support.

For that matter, I hope jkr is in agreement with this, I don't think we would accept any patches that implement recording. Basically, if someone wants to use our software to do that, then they are free to modify it under GPL but it won't ever become an official aspect of our software.*

*Unless of course the official clients that you download from mlb.com implement a recording feature.
 
Old 04-18-2008, 12:46 AM   #465
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by oneil72 View Post
Yes, it opens no problem. Thanks daftcat.
Are you using a HTTP proxy for web access?

We're going to dive in even deeper and emulate a web browser from the shell:

Code:
matthew@tango:~/mlbtv/svn/mlbviewer/MLBviewer$ telnet mlb.mlb.com 80
Trying 216.246.122.24...
Connected to a1321.g.akamai.net.
Escape character is '^]'.
GET /components/game/year_2008/month_04/day_12/gamesbydate.jsp HTTP/1.1
Host: mlb.mlb.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: ipid=12263517; ftmu=TJ%2BdqN6JB%2F8n5ZLTjzN8RUsPcOk%3D; LO1935716037=1.1208486391113; puidn=1031904001207997486725; appacc=mlb; stUtil_cookie=1%7C12263517%7C3499200931207995969853; MLBPlayerInstall=2W_1208480147112; s_cc=true; s_sq=%5B%5BB%5D%5D; SESSION_1=mEncoding%3D%3D%3Dwindows%7EidentityPoint%3D%3D%3D%5Bcom.bamnetworks.registration.session.FingerprintSessionValue%5D12263517%3C_%3ETaFrVf%2BT%2FIkOKE6KgjuUfXYt3SE%3D%7EmType%3D%3D%3Dvideo%7EmEnt0%3D%3D%3DMLBALL%7EmCatCode%3D%3D%3Dmlb_media_mlb_lg%7EmEntNum%3D%3D%3D1%7EmUrl%3D%3D%3Dmms%3A%2F%2Fa98.l1086918719.c10869.g.lm.akamaistream.net%2FD%2F98%2F10869%2Fv0001%2Freflector%3A18719%3Fauth%3Dca.d1cocjbHbvaraLakbRa3bgd3cbbNd.aA-bib_f0-bA-YghwoL8x-jdj9j6kajckhmdlbkfmej8melglck9kejkjaj7k8jfk9mbl9kh%26aifp%3Dv0004%26ct5%3D17-Apr-08%26ct1%3Dmlb%26ct3%3D12263517%26ct7%3D648770%26ct4%3Dmlb%26ct6%3D67.188.205.133%26ct8%3D1%7EmBitRate%3D%3D%3D400; mlbunifieddata=12263517%7C138fc71e45418421edd4ca12b9246a4b%7C1208480118372%7Cttemp; fprt=TaFrVf%2BT%2FIkOKE6KgjuUfXYt3SE%3D; media_pid=mlb_lg
Cache-Control: max-age=0
You're going to telnet to mlb.mlb.com 80 (that's port 80, the web server port.) When you get the "....Escape character is '^]'." message, you're going to copy and paste all lines from GET to Cache-Control and paste that into the Window. Press return twice and you should see a bunch of garbage come out. That's because if you scroll up the server response looks like this:

Code:
HTTP/1.1 200 OK
Server: Sun-ONE-Web-Server/6.1
Content-Type: application/x-javascript
Content-Encoding: gzip
Content-Length: 10165
Cache-Control: max-age=149
Expires: Fri, 18 Apr 2008 05:44:15 GMT
Date: Fri, 18 Apr 2008 05:41:46 GMT
Connection: keep-alive
Vary: Accept-Encoding
From that response the garbage that follows is gzipped according to the Content-Encoding: header line above. If you get this response, then I'm not sure why Python can't figure it out.
 
  


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 03:44 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