LinuxQuestions.org
Visit Jeremy's Blog.
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 03-25-2009, 12:29 PM   #1021
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86

Quote:
Originally Posted by Theophile View Post
Have you checked out rtmpdump?
http://sourceforge.net/projects/rtmpdump/
I did look at this. It compiles beautifully and doesn't core on startup. But...it received an AccessDenied when I tried with the rtmp url I pulled from HTTPAnalyzer. It could just be a timing issue because the copy/paste from HA takes a bit of massaging to get to work. I'll know more likely this weekend if I can get the SOAP requests working. It looks like the SOAPpy tutorial was written so long ago that the examples it uses are no longer valid responders. I guess I'll be flying blind.
 
Old 03-25-2009, 12:49 PM   #1022
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by CubsFanUK View Post
I think you have got the link slightly wrong, that was the link to the Venezuela v Puerto Rico game. The link you intended was:

Yankees v Phillies

Also, the start time is actually 17:05 UTC (which is the same as GMT), but the stream usually starts about an hour or so before the start of the game. Also, in case anyone missed it, this game will be free.

Regarding fingerprints in the SOAP message, if you mean the field called session-key, this is the value in the cookie called ftmu. I'm not entirely clear how this cookie is initially fetched yet, I've got a bit more research to do. At the moment, I am copying it over from running the version of the Java that fetches the url for the old media player, it is included in the response to that request. On the other hand the values in the fields called identity-point-id and fingerprint are in the response to the login request.

As for a downloader, I have absolutely no clue, sorry.
From the HTTPAnalyzer, it seems it hits workflow.do but with a different query string than the old way of getting the url. Maybe it's to pick up the session key. I'll experiment with this later.

Here's an example of one of the SOAP requests:

Code:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <SOAP-ENV:Body>
    <scma:user-verified-media-request xmlns:scma="http://services.bamnetworks.com/media/types/2.0">
      <scma:event-id>164-251363-2009-03-17</scma:event-id>
      <scma:content-id>3979009</scma:content-id>
      <scma:playback-scenario>MLB_FLASH_800K_STREAM</scma:playback-scenario>
      <scma:subject>LIVE_EVENT_COVERAGE</scma:subject>
      <scma:fingerprint-identity-point>
        <scma:identity-point-id>12263517</scma:identity-point-id>
        <scma:fingerprint>VmNLamH30eJktg666VzZpakg+ak=</scma:fingerprint>
      </scma:fingerprint-identity-point>
      <scma:session-key>NGgjvBNcR2lWfDI1kPTWdwtpU5k=</scma:session-key>
    </scma:user-verified-media-request>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
event-id: epg.xml.
content-id : not sure where to get this
identity-point-id: ipid of the authenticate.do cookie
fingerprint: frpt of the authenticate.do cookie
session-key: ftmu of the workflow.do cookie

So the only thing I'm not sure about now is where to get the content-id. It seems that might be the last six digits of the mid: like you said, but where to get the mid: if it's not included in epg.xml.

Anyway, this doesn't look nearly so daunting anymore after spending a few bleary eyed sessions in front of HTTP Analyzer and a python SOAP tutorial.

It seems like they might be deprecating gamesbydate.jsp this weekend. There are no more video stream listings after the 29th though the audio streams continue to be listed here. Maybe they are planning on cutting over to the new player next week.
 
Old 03-25-2009, 05:01 PM   #1023
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
There's a very good chance that none of the SOAP python implementations are compatible with mlb.com's server. From my reading (haven't yet put down any soap code), it sounds like a good many projects popped up, and then died off (probably when folks realized what a pain in the arse SOAP is!)

CubsFanUk, would you be willing to develop an API interface to mlbviewer using your java code? In other words, I could write an xml parser for epg.xml to generate the listings and get the event-id, but could we call your java code to return the rtmp url?

In the meantime, I plan to lay down some python SOAP code this weekend and see if I can get anywhere with it. Worst case, I can just treat it like XML and write a builder/parser.
 
Old 03-26-2009, 06:18 AM   #1024
CubsFanUK
LQ Newbie
 
Registered: Mar 2009
Posts: 18

Rep: Reputation: 0
daftcat, I have sent you a couple of emails, hope they help.
 
Old 03-26-2009, 08:30 AM   #1025
CubsFanUK
LQ Newbie
 
Registered: Mar 2009
Posts: 18

Rep: Reputation: 0
The link to download the current version of NexDef for MacOSX is

NexDef Mac Installer
 
Old 03-26-2009, 10:30 AM   #1026
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Thanks CubsFanUk. I'll have a look at both tonight (best case) or this weekend.

I found a new SOAP package for python, suds, that seems like it's head and shoulders above the other soap libraries and still in active development. I have high hopes for it. It's nice to know that I have the java code as a fallback helper.
 
Old 03-28-2009, 12:14 AM   #1027
djalmabm
LQ Newbie
 
Registered: Mar 2009
Location: São Paulo/SP - Brasil
Distribution: Debian sid
Posts: 7

Rep: Reputation: 0
Quote:
Originally Posted by daftcat View Post
Revision 113 should fix the EDT/EST conversion to UTC. From UTC, we apply the timezone -or- we apply the time_offset in the config file.

Someone else can review this for me if they wish but my listings are now correct so it looks like I'm doing it right now.

Code:
    DAYLIGHT = {
        '2007': (datetime.datetime(2007,3,11),datetime.datetime(2007,11,4)),
        '2008': (datetime.datetime(2008,3,9),datetime.datetime(2008,11,2)),
        '2009': (datetime.datetime(2009,3,8),datetime.datetime(2009,11,1)),
        '2010': (datetime.datetime(2009,3,14),datetime.datetime(2009,11,7)),
               }
    now = datetime.datetime.now()
    if (now >= DAYLIGHT[str(now.year)][0]) \
       and (now < DAYLIGHT[str(now.year)][1]):
        dif = datetime.timedelta(0,14400)
    else:
        dif = datetime.timedelta(0,18000)

    utc_tuple = datetime_tuple + dif
First we define the dates for Daylight Saving Time for each year. I realize now it's not necessary to have past years.

Get the current datetime. If the datetime falls between the DST dates for the current year, create a dif (time offset) of 4 hours. Else, create a time offset of 5 hours.

datetime_tuple is the datetime we receive from the mlb listings which is in Eastern Time. So apply the correct time offset to achieve UTC.

From UTC, we can apply a custom time_offset (from the config file) or use the local time zone to get local times rather than Eastern Time.
I'm from Brazil and I'm using revision 116. With "time_offset=-0300" in the config file the time is OK, but if I use the arrow keys to change days, when I come back to current day, the time is 1 hour later. With "time_offset=" it's always 1 hour later. This is the output of "tzwatch":

Sat Mar 28 02:05:11 BRT 2009 America/Sao_Paulo
Sat Mar 28 01:05:11 EDT 2009 America/New_York
Fri Mar 27 22:05:11 PDT 2009 America/Los_Angeles
Sat Mar 28 02:05:11 BRT 2009 Local
Sat Mar 28 05:05:11 GMT 2009 Europe/London

Let me know if you need more information and thank you very much for this great software.
 
Old 03-29-2009, 12:40 PM   #1028
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by djalmabm View Post
I'm from Brazil and I'm using revision 116. With "time_offset=-0300" in the config file the time is OK, but if I use the arrow keys to change days, when I come back to current day, the time is 1 hour later. With "time_offset=" it's always 1 hour later. This is the output of "tzwatch":

Sat Mar 28 02:05:11 BRT 2009 America/Sao_Paulo
Sat Mar 28 01:05:11 EDT 2009 America/New_York
Fri Mar 27 22:05:11 PDT 2009 America/Los_Angeles
Sat Mar 28 02:05:11 BRT 2009 Local
Sat Mar 28 05:05:11 GMT 2009 Europe/London

Let me know if you need more information and thank you very much for this great software.
This might be a moot issue if I can't get mlbviewer using the new MLB backend architecture.

Two questions/observations I have. In the United States, daylight saving time was changed by law to start in early March and end in early November. In all, several weeks were added in the hopes that it would be a net energy savings. Don't ask me to explain Bush logic on that one. As a result though, the product might be forcing DST before Brazil does.

But...the code is written in such a way that you shouldn't have to explicitly use a time_offset unless mlbviewer can't find out from your machine what the correct timezone (offset from UTC) is. Try removing the time_offset (or commenting it out) of your config file. If that doesn't work, I can't really look into this one until I figure out the new architecture. More on that in the next post.
 
Old 03-29-2009, 01:24 PM   #1029
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
mlbviewer and the 2009 season

With the new flash player, MLB.TV changed quite a bit for the 2009 season.

The good news is that with the flash player, mlbviewer is no longer necessary.

The bad news is that even if I get mlbviewer updated for the new season's changes, it's going to be quite a bit harder to setup and install. At a minimum, most of you will have to recompile your ffmpeg since most distros use an out of date version which would say "unsupported codec". This is assuming that we can download the full stream. So far, I've only been able to get about an hour's worth of stream before rtmpdump (yet another dependency) drops out.

I hope to have an early version of mlbgameid.py using the new architecture and rtmpdump available for testing with soon (today? a few days?) Mlbviewer may not be fully updated with the changes until after the season starts.

I'll have more complete instructions on what needs to be updated or downloaded to get the new mlbviewer working. It will not be for the faint of heart. I will want testers who are comfortable with recompiling packages and downloading dependencies from git, svn, or source tarballs.
 
Old 03-29-2009, 04:24 PM   #1030
rjwood
Member
 
Registered: Jan 2006
Distribution: UBUNTU
Posts: 130

Rep: Reputation: 16
Quote:
Originally Posted by daftcat View Post
With the new flash player, MLB.TV changed quite a bit for the 2009 season.

The good news is that with the flash player, mlbviewer is no longer necessary.

The bad news is that even if I get mlbviewer updated for the new season's changes, it's going to be quite a bit harder to setup and install. At a minimum, most of you will have to recompile your ffmpeg since most distros use an out of date version which would say "unsupported codec". This is assuming that we can download the full stream. So far, I've only been able to get about an hour's worth of stream before rtmpdump (yet another dependency) drops out.

I hope to have an early version of mlbgameid.py using the new architecture and rtmpdump available for testing with soon (today? a few days?) Mlbviewer may not be fully updated with the changes until after the season starts.

I'll have more complete instructions on what needs to be updated or downloaded to get the new mlbviewer working. It will not be for the faint of heart. I will want testers who are comfortable with recompiling packages and downloading dependencies from git, svn, or source tarballs.
I'll test for you. I've never done that before, but I should contribute somehow. Let me know what to do.
 
Old 03-29-2009, 08:46 PM   #1031
djalmabm
LQ Newbie
 
Registered: Mar 2009
Location: São Paulo/SP - Brasil
Distribution: Debian sid
Posts: 7

Rep: Reputation: 0
Quote:
Originally Posted by daftcat View Post
This might be a moot issue if I can't get mlbviewer using the new MLB backend architecture.

Two questions/observations I have. In the United States, daylight saving time was changed by law to start in early March and end in early November. In all, several weeks were added in the hopes that it would be a net energy savings. Don't ask me to explain Bush logic on that one. As a result though, the product might be forcing DST before Brazil does.

But...the code is written in such a way that you shouldn't have to explicitly use a time_offset unless mlbviewer can't find out from your machine what the correct timezone (offset from UTC) is. Try removing the time_offset (or commenting it out) of your config file. If that doesn't work, I can't really look into this one until I figure out the new architecture. More on that in the next post.
It didn't work, no problem. Thank you.
 
Old 03-30-2009, 02:28 AM   #1032
Onip
Member
 
Registered: Apr 2008
Posts: 36

Rep: Reputation: 15
Quote:
Originally Posted by daftcat View Post
I'll have more complete instructions on what needs to be updated or downloaded to get the new mlbviewer working. It will not be for the faint of heart. I will want testers who are comfortable with recompiling packages and downloading dependencies from git, svn, or source tarballs.
Post them and I'll try. I'm currently using gentoo and studying computer engineer, so no problem at all with compile and using vcs.
 
Old 03-30-2009, 03:50 AM   #1033
bodly
LQ Newbie
 
Registered: Mar 2009
Distribution: Kubuntu
Posts: 24

Rep: Reputation: 16
Quote:
Originally Posted by daftcat View Post
With the new flash player, MLB.TV changed quite a bit for the 2009 season.

The good news is that with the flash player, mlbviewer is no longer necessary.

The bad news is that even if I get mlbviewer updated for the new season's changes, it's going to be quite a bit harder to setup and install. At a minimum, most of you will have to recompile your ffmpeg since most distros use an out of date version which would say "unsupported codec". This is assuming that we can download the full stream. So far, I've only been able to get about an hour's worth of stream before rtmpdump (yet another dependency) drops out.

I hope to have an early version of mlbgameid.py using the new architecture and rtmpdump available for testing with soon (today? a few days?) Mlbviewer may not be fully updated with the changes until after the season starts.

I'll have more complete instructions on what needs to be updated or downloaded to get the new mlbviewer working. It will not be for the faint of heart. I will want testers who are comfortable with recompiling packages and downloading dependencies from git, svn, or source tarballs.
I can help test. I enjoy patching, compiling and testing stuff.
 
Old 03-30-2009, 08:11 AM   #1034
rjwood
Member
 
Registered: Jan 2006
Distribution: UBUNTU
Posts: 130

Rep: Reputation: 16
Is anyone else getting this?
Attached Thumbnails
Click image for larger version

Name:	mlbscreenshot.jpeg
Views:	26
Size:	68.6 KB
ID:	385  
 
Old 03-30-2009, 09:19 AM   #1035
knappster
Member
 
Registered: Mar 2004
Posts: 175

Rep: Reputation: 30
Quote:
Originally Posted by rjwood View Post
Is anyone else getting this?
I just happened to see this webpage not long ago:

http://www.eds.org/~straycat/mlblinux.php

Quote:
You might be using the "xv" video output module in mplayer (at least that was my issue.) I solved this by invoking mplayer with:
mplayer -vo x11
 
  


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 08:28 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