LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-26-2012, 09:47 PM   #3556
fang2415
Member
 
Registered: Jan 2007
Posts: 195

Rep: Reputation: 15

Okay, just reproduced the sign-on restriction one more time before bed. Did the same as last time with the same result (although this time I didn't wait for the files to start downloading but just hit q as soon as mlbviewer displayed the player command). I backed up the cookie file after each attempt and they're all the same. I don't see any sessionkey or any other session-looking files anywhere at any point.

That's all for me today, I'll probably have some time to test again tomorrow so just let me know if there's something you'd like me to check.
 
Old 03-26-2012, 10:07 PM   #3557
thegryghost
Member
 
Registered: Mar 2009
Distribution: Gentoo
Posts: 30

Rep: Reputation: 1
Quote:
Originally Posted by daftcat View Post
I just tried the same stream at least half a dozen times with no errors. Have you removed ~/.mlb/cookie and ~/.mlb/sessionkey since this patch and tried again?
Are you reusing the ipid, fprt, and ftmu cookies? From my testing, you only need to get those once via the login/workflow url's and they will have an expire time associated with them (in epoch time). As long as the expire time is still valid, you don't need to login or fetch the workflow url, you only need to fetch the "findUserVerifiedEvent" URL with the cookie data. It's been my experience that fetching the workflow URL too many times will cause the sign-on restrictions. The cookies can be saved to disk and reused between stops/starts of MLBViewer. Also, creating a base64 url cache (keyed off the event and content ID's) would probably help reduce the amount calls to mlb.tv.
 
Old 03-26-2012, 10:30 PM   #3558
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
more info on mlbhls and cygwin

I encountered certificate errors when trying to use mlbhls under cygwin.

You can check to see whether you will also encounter certificate errors by trying the following command:

Code:
mlbhls -B `./mlbplay j=03/26/12 nu=1 n=1 v=phi` -o game.mp4
Let that run for a few minutes and see if game.mp4 is increasing in size and mplayer can play it.

If you run into certificate errors of the form:

Quote:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while
Then perform the procedure here:
http://blog.kowalczyk.info/article/f...rtificate.html
 
Old 03-26-2012, 10:37 PM   #3559
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by thegryghost View Post
Are you reusing the ipid, fprt, and ftmu cookies? From my testing, you only need to get those once via the login/workflow url's and they will have an expire time associated with them (in epoch time). As long as the expire time is still valid, you don't need to login or fetch the workflow url, you only need to fetch the "findUserVerifiedEvent" URL with the cookie data. It's been my experience that fetching the workflow URL too many times will cause the sign-on restrictions. The cookies can be saved to disk and reused between stops/starts of MLBViewer. Also, creating a base64 url cache (keyed off the event and content ID's) would probably help reduce the amount calls to mlb.tv.
Only hit the login/workflow page once at mlbviewer start-up. From that, I keep all the cookie information and re-use it. I'm not sure whether I re-use it from one start to the next. I plan on creating a test tool just to inspect the cookie use and re-use without having to go through the curses interface that I can liberally print to the screen to see just how I'm managing those morsels from one request and one session to the next.

As I said earlier, I requested the same stream at least six times in a row (quitting before it actually started streaming) and was not able to reproduce it.
 
Old 03-26-2012, 10:47 PM   #3560
metatroll
LQ Newbie
 
Registered: Mar 2012
Posts: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by thegryghost View Post
So it seems that cygwin can't find 'struct timeval'. In linux, you include <sys/time.h> which will include <bits/time.h>. I've updated SVN to implicitly include <sys/time.h>, see if this makes it compile. If not, search through cygwin's include directory and see where they define it, I can add a #ifdef to include it if it's somewhere else.
Thanks for the quick reply folks, i really appreciate it.

I got the latest version, i now get the following error:

Code:
$ make
gcc -O2 mlb.c utils.c output.c -lm -lcrypto -lpthread -lconfig -lcurl -o mlbhls
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find -lconfig
collect2: ld returned 1 exit status
Makefile:11: recipe for target `mlb' failed
make: *** [mlb] Error 1
I think I need to work out what library I am missing in cygwin based on the -lconfig flag. I am not familiar with this and will have a google on this. Anyone know what cygwin library I would need to fix this?

Thanks
 
Old 03-26-2012, 10:49 PM   #3561
metatroll
LQ Newbie
 
Registered: Mar 2012
Posts: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by daftcat View Post
I encountered certificate errors when trying to use mlbhls under cygwin.

You can check to see whether you will also encounter certificate errors by trying the following command:

Code:
mlbhls -B `./mlbplay j=03/26/12 nu=1 n=1 v=phi` -o game.mp4
Let that run for a few minutes and see if game.mp4 is increasing in size and mplayer can play it.

If you run into certificate errors of the form:



Then perform the procedure here:
http://blog.kowalczyk.info/article/f...rtificate.html

Thanks daftcat, i will try this out once I get the mlbhls compiled
 
Old 03-26-2012, 11:19 PM   #3562
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by metatroll View Post
Thanks for the quick reply folks, i really appreciate it.

I got the latest version, i now get the following error:

Code:
$ make
gcc -O2 mlb.c utils.c output.c -lm -lcrypto -lpthread -lconfig -lcurl -o mlbhls
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find -lconfig
collect2: ld returned 1 exit status
Makefile:11: recipe for target `mlb' failed
make: *** [mlb] Error 1
I think I need to work out what library I am missing in cygwin based on the -lconfig flag. I am not familiar with this and will have a google on this. Anyone know what cygwin library I would need to fix this?

Thanks
-lconfig comes from libconfig

Looks like I downloaded and built it from source from here:
http://freecode.com/projects/plibconfig
 
Old 03-26-2012, 11:47 PM   #3563
metatroll
LQ Newbie
 
Registered: Mar 2012
Posts: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by daftcat View Post
-lconfig comes from libconfig

Looks like I downloaded and built it from source from here:
http://freecode.com/projects/plibconfig
again thanks for help, I think i installed this correct, I downloaded extracted to location of my choice (/usr/src/libconfig-0.2.6) then installed as per INSTALL doc:

Code:
./configure
make
make install
Installed ok no error. Im not sure if I have to copy any dll or .h files from this location elsewhere? Anyhow when I try to compile mlbhls again, it gives different errors which indicate to me that mlb.c cant find a particular #include .h file or some other library that contains definitions for these structs/variables?

Code:
$ make
gcc -O2 mlb.c utils.c output.c -lm -lcrypto -lpthread -lconfig -lcurl -o mlbhls
mlb.c: In function ‘get_opts’:
mlb.c:1284:6: error: ‘config_t’ undeclared (first use in this function)
mlb.c:1284:6: note: each undeclared identifier is reported only once for each function it appears in
mlb.c:1284:15: error: expected ‘;’ before ‘cfg’
mlb.c:1285:6: error: ‘config_setting_t’ undeclared (first use in this function)
mlb.c:1285:24: error: ‘setting’ undeclared (first use in this function)
mlb.c:1286:19: error: ‘cfg’ undeclared (first use in this function)
Makefile:11: recipe for target `mlb' failed
make: *** [mlb] Error 1
 
Old 03-27-2012, 12:12 AM   #3564
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by metatroll View Post
again thanks for help, I think i installed this correct, I downloaded extracted to location of my choice (/usr/src/libconfig-0.2.6) then installed as per INSTALL doc:

Code:
./configure
make
make install
Installed ok no error. Im not sure if I have to copy any dll or .h files from this location elsewhere? Anyhow when I try to compile mlbhls again, it gives different errors which indicate to me that mlb.c cant find a particular #include .h file or some other library that contains definitions for these structs/variables?

Code:
$ make
gcc -O2 mlb.c utils.c output.c -lm -lcrypto -lpthread -lconfig -lcurl -o mlbhls
mlb.c: In function ‘get_opts’:
mlb.c:1284:6: error: ‘config_t’ undeclared (first use in this function)
mlb.c:1284:6: note: each undeclared identifier is reported only once for each function it appears in
mlb.c:1284:15: error: expected ‘;’ before ‘cfg’
mlb.c:1285:6: error: ‘config_setting_t’ undeclared (first use in this function)
mlb.c:1285:24: error: ‘setting’ undeclared (first use in this function)
mlb.c:1286:19: error: ‘cfg’ undeclared (first use in this function)
Makefile:11: recipe for target `mlb' failed
make: *** [mlb] Error 1
My mistake. Looks like there's (at least) two (three?) different packages called libconfig. I had two but found the one that had config_setting_t defined in it.

Code:
http://libconfig.sourcearchive.com/downloads/1.3.2-2/libconfig_1.3.2.orig.tar.gz
http://libconfig.sourcearchive.com/d....2.orig.tar.gz

See if you can just build this and install it over the wrong one I gave you. Otherwise, we might have to do some surgery on your cygwin to repair my mistake. Sorry about that. Looks like I have a README-cygwin to write.
 
Old 03-27-2012, 03:35 AM   #3565
metatroll
LQ Newbie
 
Registered: Mar 2012
Posts: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by daftcat View Post
My mistake. Looks like there's (at least) two (three?) different packages called libconfig. I had two but found the one that had config_setting_t defined in it.

Code:
http://libconfig.sourcearchive.com/downloads/1.3.2-2/libconfig_1.3.2.orig.tar.gz
http://libconfig.sourcearchive.com/d....2.orig.tar.gz

See if you can just build this and install it over the wrong one I gave you. Otherwise, we might have to do some surgery on your cygwin to repair my mistake. Sorry about that. Looks like I have a README-cygwin to write.
nah no mistake from you, it wasnt working in the first place, i am grateful for the help.

I didnt realise that I installed to a different directory, the install was successful but now I get this error:

Code:
Josh@JOSHUA /usr/src/mlbhls
$ make clean
rm -f *.o mlbhls

Josh@JOSHUA /usr/src/mlbhls
$ make
gcc -O2 mlb.c utils.c output.c -lm -lcrypto -lpthread -lconfig -lcurl -o mlbhls
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find -lconfig
collect2: ld returned 1 exit status
Makefile:11: recipe for target `mlb' failed
make: *** [mlb] Error 1
I removed the directory where i installed the first incorrect lbconfig but still get the same error as above?
 
Old 03-27-2012, 05:16 AM   #3566
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
You're back to square one. The linker can't find libconfig. I gave you a link to the wrong libconfig the first time. It found "libconfig" (-lconfig) but none of the symbols in that library made sense (e.g. couldn't find config_setting_t for example and so it threw different errors.) Make sure you download and build and install the 1.3.2-2 libconfig from above.
 
Old 03-27-2012, 11:47 AM   #3567
chrisVV
Member
 
Registered: Aug 2010
Posts: 548

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by daftcat View Post
One question for the both of you: are you also logging in via the website? e.g. trying out the flash player when mlbviewer doesn't do what you want?
No, I haven't used the flashplayer for about two weeks. It's gpu acceleration is poor compared with what mplayer or vlc provide, and I don't watch much pre-season anyway.

It looks as if MLB.TV has some additional heuristics on how it detects an excessive number of accesses to its streams. However your new login works much better than the old one. mlbviewer is set up to work really well this season, for which many thanks.
 
Old 03-27-2012, 11:53 AM   #3568
chrisVV
Member
 
Registered: Aug 2010
Posts: 548

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by daftcat View Post
You're back to square one. The linker can't find libconfig. I gave you a link to the wrong libconfig the first time. It found "libconfig" (-lconfig) but none of the symbols in that library made sense (e.g. couldn't find config_setting_t for example and so it threw different errors.) Make sure you download and build and install the 1.3.2-2 libconfig from above.
I am using libconfig-1.4.8. It works fine for me. You can get the tarball from http://www.hyperrealm.com/libconfig/
 
Old 03-27-2012, 03:20 PM   #3569
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by chrisVV View Post
I am using libconfig-1.4.8. It works fine for me. You can get the tarball from http://www.hyperrealm.com/libconfig/
I recommended the version I did because I know that is one I already have working on my cygwin system. Unfortunately, I forgot that I had already made the wrong "libconfig" error before and posted before I checked what actually works. Looking at the C API on hyperrealm, this looks like the correct libconfig.
 
Old 03-27-2012, 07:25 PM   #3570
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Revision 350: possible fix for sign-on restrictions

I noticed that although I retrieve all the cookie information I need in the MLBSession class and pass all the morsels necessary to the GameStream class, I may not actually be making media requests with the cookies present in the request. I modified the code to pass the cookie_jar along with the cookies to the GameStream class and the GameStream class installs the cookie_jar so that it presumably passes the cookie to the server as part of all media requests.

Again, since I am having trouble reproducing sign-on restriction errors, this fix may or may not do anything helpful. When I get home tonight, I'll check it with a sniffer to see if it makes any difference in the requests being sent.

In the meantime, I've checked it in and the two of you receiving sign-on restriction errors can test it out to see if it helps any.
 
  


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 07:01 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