LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   MLB.TV in Linux (https://www.linuxquestions.org/questions/linux-software-2/mlb-tv-in-linux-432479/)

larshenric 04-24-2015 02:36 AM

Thanks for all the work, guys...!! :-)

chrisVV 04-24-2015 01:45 PM

Quote:

Originally Posted by chrisVV (Post 5352152)
I have found the problem, and I partly mispoke: it is certificate related, sort of. I do have the relevant root Valicert certificate installed, but I suspect the latest version of libcurl barfs on mlbtv including the root certificate in its certificate chain. For the moment I have resolved it by reinstalling an old version of curl. I will need to look at a better fix - I suspect there is a curl option somewhere that may deal with it.

In the end it turned out to be simpler than that. In my distribution it appears that for some reason curl does not use the certificates provided for openssl and nss (in /etc/ssl/certs and /usr/share/ca-certificates/mozilla respectively), and this was confusing as I have kept the Valicert root certificate for those. Instead it keeps its own bundle of certificates, in my distribution in /usr/share/curl/ca-bundle.crt. When upgrading curl, the upgraded package provides a new bundle of certificates which no longer includes the Valicert root certificate. The solution was to concatenate the Valicert certificate to the end of the curl bundle. With that it works fine.

lcvisser 04-24-2015 03:04 PM

I contacted thegryghoot about mlbtv-hls-nexdef. The repository has been moved by him to Github. The experimental branch is now here: https://github.com/thegryghost/mlbtv...e/experimental

daftcat 04-24-2015 03:11 PM

Quote:

Originally Posted by chrisVV (Post 5352532)
In the end it turned out to be simpler than that. In my distribution it appears that for some reason curl does not use the certificates provided for openssl and nss (in /etc/ssl/certs and /usr/share/ca-certificates/mozilla respectively), and this was confusing as I have kept the Valicert root certificate for those. Instead it keeps its own bundle of certificates, in my distribution in /usr/share/curl/ca-bundle.crt. When upgrading curl, the upgraded package provides a new bundle of certificates which no longer includes the Valicert root certificate. The solution was to concatenate the Valicert certificate to the end of the curl bundle. With that it works fine.

Can you give me a grep and a cat command to verify and fix this? What distro is this? I want to write this up on the wiki since I don't see this myself.

Thanks!

daftcat 04-24-2015 04:07 PM

Quote:

Originally Posted by lcvisser (Post 5352565)
I contacted thegryghoot about mlbtv-hls-nexdef. The repository has been moved by him to Github. The experimental branch is now here: https://github.com/thegryghost/mlbtv...e/experimental

Great! I've updated the documentation in the package and on the wiki.

chrisVV 04-24-2015 04:48 PM

Quote:

Originally Posted by daftcat (Post 5352568)
Can you give me a grep and a cat command to verify and fix this? What distro is this? I want to write this up on the wiki since I don't see this myself.

I use slackware-current, which is a preparatory test release for the next version of slackware. Presumably at some stage soon the Valicert certificate will be removed from bundle of certificates supplied by slackware (because it is derived from mozilla's certificate bundle which has already removed it), which would require importing the certificate from elsewhere, but for the moment all I did was this:

Code:

cat /etc/ssl/certs/ValiCert_Class_2_VA.pem >> /usr/share/curl/ca-bundle.crt
However it is probably not worth putting this on the wiki, because as I say it will probably have been removed by the time the next version of slackware comes out (and the last stable release still has it in ca-bundle-crt). When that happens you will need to get the certificate from https://certs.godaddy.com/repository (where it can be obtained under under "ValiCert Legacy Certificate Chain") in crt/pem format, and then cat it onto /usr/share/curl/ca-bundle.crt.

chrisVV 04-24-2015 05:09 PM

Quote:

Originally Posted by chrisVV (Post 5352613)
When that happens you will need to get the certificate from https://certs.godaddy.com/repository (where it can be obtained under under "ValiCert Legacy Certificate Chain") in crt/pem format, and then cat it onto /usr/share/curl/ca-bundle.crt.

By the way, to get the certificate, you can just do
Code:

wget https://certs.godaddy.com/repository/valicert_class2_root.crt
Different distributions appear to configure curl differently. With ubuntu, it looks from other posts here as if you need to copy this certificate into /etc/ssl/certs as valicert_class2_root.pem (or some other appropriate name) and then run c_rehash for curl to find it.

chrisVV 04-25-2015 07:49 AM

Quote:

Originally Posted by daftcat (Post 5352568)
Can you give me a grep

I see I didn't do that. I suspect the easiest way for a slackware user to check whether she needs to download valicert_class2_root.crt and cat it onto /usr/share/curl/ca-bundle.crt is to grep if the penultimate line of the valicert certificate is already there:

Code:

grep IYEZoDJJKPTEjlbVUjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMMj4QssxsodyamEwC /usr/share/curl/ca-bundle.crt
A similar strategy should work with any distribution which configures curl to use some other bundle file, such as /etc/ssl/certs/ca-certificates.crt.

rnrubun 05-01-2015 05:31 PM

CYGWIN Install
 
When installing mlbviewer within CYGWIN, on a 64 bit machine using the setup-x86_64 installation file, the following additional steps were discovered during painful trial and error. With these steps, mlbviewer runs FAST in CYGWIN on my 64 bit intel WINDOWS 7 machines:
1. During the CYGWIN INSTALL, in addition to the list of software packages to include, you will need these, under the PYTHON section:
• Python Interpreter Language
• Python-gdata
This may seem obvious, or can be deduced from the non-CYGWIN INSTALL instructions (what I ended up doing), but these software packages as a part of the CYGWIN installation are key, and not explicitly identified in the CYGWIN mlbviewer install instructions.

2. For a 64 bit installation, libconfig.1.4.9 unmodified will NOT successfully configure or build.
• Once the files are unpacked, the following two files in libconfig-1.4.9\aux-build need to be replaced with more current versions
o Config.guess
o Config.sub
• Updated Versions are located at:
o http://git.savannah.gnu.org/gitweb/?....guess;hb=HEAD
o http://git.savannah.gnu.org/gitweb/?...ig.sub;hb=HEAD
• To get the copy to work correctly, first make copies of the original files in case something goes wrong. Then, using Windows Explorer (or the CYGWIN terminal if you are comfortable with that), locate the ~\libconfig-1.4.9\aux-build directory:
o Open the updated file version in your browser from the above link
o Copy the entire page contents
o Open the file you need to update with an editor (linux compatible to be safe)
o Using the correct combinations of commands, select and replace in the editor via Paste. You are replacing the entire contents of the file open in the editor with the webpage you copied above. This is completely new file content with more lines than the original.
o Save the file
o Repeat for both files

After these steps, proceed with:
$ sh configure --prefix=/usr
$ make
$ make install

Only with these changes did these commands finish successfully on my 64 bit intel machine.

3. I don’t have a github account, so I found the compatible file I needed for mlbhls here:
• svn checkout https://mlbtv-hls-nexdef.googlecode....s/experimental (props to kermitfan22 for that one)
• In the instructions for CYGWIN mlbhs, substitute the following instructions as illustrated below:
INSTEAD OF->$ git clone https://github.com/thegryghost/mlbtv-hls-nexdef.git
$ svn checkout https://mlbtv-hls-nexdef.googlecode....s/experimental
INSTEAD OF->$ cd mlbtv-hls-nexdef.git
$ cd experimental

• Then continue with the “make” and “cp” commands


4. A 64bit Windows MPV Build is available here: http://mpv.srsfckn.biz/
Until I installed that version the video player wouldn’t run. The github link from the instructions pointed to source downloads, which went a little too deep into building from source for me on MPV at this stage in my knowlege.
• Extract as the CYGWIN Install instructions direct to: usr/share/mpv
• Per directions @ http://mpv.srsfckn.biz/ , I also put youtube-dl.exe in the mpv folder (better safe than sorry)

This was all discovered via trial, error, and a LOT of research, so I thought I’d write it up to provide a more direct path to success for anyone who is attempting the same 64 bit install under CYGWIN. This description is probably most useful to the heavy Windows user who is just beginning to explore LINUX resources.

Great project, daftcat!

daftcat 05-01-2015 11:34 PM

All of those steps (and the trial and error) remind me why I gave up on Cygwin installations and created the virtual machine version. I want to revisit the VMV and enhance it with a method to persist or automagically import a config file as well as auto update to latest svn.

You don't need a github account to clone the mlbhls repo. Other than that, great write-up. I'll add it to the wiki this weekend.

fang2415 05-03-2015 04:37 AM

Last year and the year before I had mlbviewer set up in Cygwin, and I remember it being a pain to install, but not quite that much of a pain. :) I do recall that libconfig was especially annoying though, so I can believe that it may have gotten even worse (plus I might have been using the 32-bit Cygwin).

However you might be able to smooth out the media player part of the install by using the mlbhls patch I posted on page 288 (instructions to apply are here. I think that should make it so that mlbhls streams will work with any video player (like the stock mplayer or vlc), not just MPV.

Incidentally, does anybody know if we can get patches accepted to mlbhls now? I didn't push very hard before since my understanding was that thegryghost wasn't maintaining it any more, but maybe it'd be easier now that it's on github? It would sure be nice to skip the step of applying this tiny little patch every time...

daftcat 05-04-2015 06:41 PM

I added the patch to github experimental branch and submitted a pull request. Let me get more familiar with github. Perhaps I can just host a branch.

https://github.com/thegryghost/mlbtv-hls-nexdef/pull/5

larshenric 05-06-2015 03:08 PM

Hi! :-)

Might there be a way to download condensed games, like it's possible for complete games with mlbgamedl...?

daftcat 05-07-2015 05:36 PM

mlbgamedl is intended for recording short samples which can then be used to debug the stream playback e.g. providing ffmpeg developers with a sample so they can fix the playback library used in both mplayer and vlc. (We did this years ago when MLBAM first shifted to Yahoo for its content delivery network.) This is why it exists in the test directory and does not come with any documentation or support. It is also quite possible that using mlbgamedl can result in having your account in lockdown for a period of time as I put very little effort (if any) into managing the session-key that is used to detect the same account being used for multiple sessions (a.k.a. "sharing your account.") Again this is test code and only meant for test purposes, not daily use. The scripts in the test directory do not use the same code as mlbviewer. This is spaghetti code tossed together to verify the network exchanges are correct.

That said, yes, there is a way to change your video_player= setting to record. No, I won't discuss it. It is a grey area of the Terms of Service as it is not explicitly forbidden though not a part of the official offering either. As MLB sells full games on iTunes, I would assume it's closer to being forbidden than not. So while you are asking about condensed games, the procedure would be the same for full games (assuming your not using mlbgamedl which you shouldn't be using for everyday use.)

larshenric 05-08-2015 02:39 AM

Thanks for replying! :-)
Very understandable your point, and sorry, I didn't want to compromise you in anything... ;-)


All times are GMT -5. The time now is 05:01 PM.