failed to download from hulu with hulu.sh

Steam recording with RTMPDump or FFmpeg.
kitana
Posts: 24
Joined: Sat Mar 23, 2013 3:50 am

Re: failed to download from hulu with hulu.sh

Post by kitana »

svnpenn wrote:
kitana wrote: I'm using baby-cygwin-34 and the latest hulu.sh
Fixed.
I copied previous scripts from baby-cygwin-25 (worked great w/ hulu-xp.sh) over to baby-cygwin-35 to try the latest hulu.sh and it kept getting this connection error after the dump
RTMP (Custom).jpg
RTMP-2 (Custom).jpg
However, if I copy the latest hulu.sh along with cut, date, d2u, and awk back to baby-cygwin-25 , then it works. What's going on with baby-cygwin-35?
baby-cygwin-25.jpg

svnpenn
Posts: 263
Joined: Tue Nov 01, 2011 12:19 am

Re: failed to download from hulu with hulu.sh

Post by svnpenn »

kitana wrote: I copied previous scripts from baby-cygwin-25 (worked great w/ hulu-xp.sh) over to baby-cygwin-35 to try the latest hulu.sh and it kept getting this connection error after the dump
However, if I copy the latest hulu.sh along with cut, date, d2u, and awk back to baby-cygwin-25 , then it works. What's going on with baby-cygwin-35?
Your "working video" does not even match the "not working". Not very scientific.

kitana
Posts: 24
Joined: Sat Mar 23, 2013 3:50 am

Re: failed to download from hulu with hulu.sh

Post by kitana »

svnpenn wrote:
kitana wrote: I copied previous scripts from baby-cygwin-25 (worked great w/ hulu-xp.sh) over to baby-cygwin-35 to try the latest hulu.sh and it kept getting this connection error after the dump
However, if I copy the latest hulu.sh along with cut, date, d2u, and awk back to baby-cygwin-25 , then it works. What's going on with baby-cygwin-35?
Your "working video" does not even match the "not working". Not very scientific.
I tried it on various Hulu links and grabbed the mismatched screenshots. Here's the same result using baby-cygwin-35 w/ the same /watch/488667. BTW, hulu-xp.sh would share the same error while using baby-cygwin-35
It normally pauses at the connecting for a good 10-15 seconds unlike baby-cygwin-25
RTMP (Custom).jpg
RTMP-2 (Custom).jpg

svnpenn
Posts: 263
Joined: Tue Nov 01, 2011 12:19 am

Re: failed to download from hulu with hulu.sh

Post by svnpenn »

kitana wrote: What's going on with baby-cygwin-35?
Two things are happening here

- FFmpeg is failing
- RtmpDump is not connecting

FFmpeg fails because the generated video is just an empty file. The script
was just assuming RtmpDump command would always succeed, I put a check in place
now.

You can easily replicate the RtmpDump error

Code: Select all

$ rtmpdump -r rtmp://foo.com -y bar.mp4
RTMPDump v2.4-84-gdd57cd0
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
WARNING: No application or playpath in URL!
WARNING: You haven't specified an output file (-o filename), using stdout
Connecting ...
ERROR: RTMP_Connect0, failed to connect socket. 10060 (Unknown error)
As you can see it timed about because "rtmp://foo.com" does not exist. However
in your case I cannot see the bad command to test because it is cut off on your
screenshot.

kitana
Posts: 24
Joined: Sat Mar 23, 2013 3:50 am

Re: failed to download from hulu with hulu.sh

Post by kitana »

svnpenn wrote:
kitana wrote: What's going on with baby-cygwin-35?

As you can see it timed about because "rtmp://foo.com" does not exist. However
in your case I cannot see the bad command to test because it is cut off on your
screenshot.
The two screenshots show everything between the RTMPDump timing out at "connecting..." to FFmpeg throwing an error soon after. No missing command was edited out of the photos. I can still use the new hulu.sh under baby-cygwin-25 for now.

svnpenn
Posts: 263
Joined: Tue Nov 01, 2011 12:19 am

Re: failed to download from hulu with hulu.sh

Post by svnpenn »

kitana wrote: The two screenshots show everything between the RTMPDump timing out at
"connecting..." to FFmpeg throwing an error soon after. No missing command was
edited out of the photos.
Sorry, I am not able to replicate your problem. Using newest Baby Cygwin and
newest script, it works great for me. If you can figure out what is causing the
problem, or some more clues then I am happy to fix it.

Repo
Posts: 12
Joined: Sat Apr 27, 2013 9:39 pm

Re: failed to download from hulu with hulu.sh

Post by Repo »

svnpenn wrote: This is probably not your issue, but I noticed that the "mms.cfg" must be
written to or the script will not work. This file requires admin rights, I have
modified the script to exit with warning and log if user does not have proper
permissions.
It looks as though I don't have admin rights, so now the big question: how do I get them? Typically if I want to execute something as an admin, I'll right click it and say "Run as Administrator", but that results in an error message that "Windows cannot find 'bin\bash'. Make sure you typed the name correctly, and then try again."

My sloppy fix was to create a shortcut to bash.exe (with the -l parameter) and to run that as Administrator.

With that...it works! :D I'm now seeing the CDN and TYPE parameters. I'll give the rest a try shortly.

I have to wonder, was it a matter of me not having Admin rights the whole time? That would be a kick in the pants. Nonetheless, I think what you've implemented since only made the script better.

So...what would be a better fix than the shortcut I created?

svnpenn
Posts: 263
Joined: Tue Nov 01, 2011 12:19 am

Re: failed to download from hulu with hulu.sh

Post by svnpenn »

Repo wrote: So...what would be a better fix than the shortcut I created?
The easiest solution is to run it under an administrator account. Barring that
the script would need to kill a Windows Native process instead of Cygwin
process. I do not want to implement this unless many people need it.

Repo
Posts: 12
Joined: Sat Apr 27, 2013 9:39 pm

Re: failed to download from hulu with hulu.sh

Post by Repo »

svnpenn wrote:
Repo wrote: So...what would be a better fix than the shortcut I created?
The easiest solution is to run it under an administrator account. Barring that
the script would need to kill a Windows Native process instead of Cygwin
process. I do not want to implement this unless many people need it.
Well, my account type is an Administrator account, but it isn't the true (hidden) Administrator account.

With the functionality available to you, is it possible to have the script prompt the user to allow it to make changes? Also, could the Cygwin .bat file make use of the "runas" command?

Great job on this script and Baby-Cygwin by the way. Even though I'm a layman when it comes to programming, I can recognize a good thing when I see it.

Terminator02
Posts: 11
Joined: Thu Mar 28, 2013 1:38 am

Re: failed to download from hulu with hulu.sh

Post by Terminator02 »

Since I built my new computer (w/ Windows 8), hulu-xp.sh isn't working for me anymore :?

I tried both hulu-xp.sh as well as some of your previous hulu.sh scripts and haven't had success with any of them (edit: They load up firefox and all, they just always say that they dumped too soon, even when I manually set the time before the dump to 60 seconds and the dump time to 20 seconds on hulu-xp.sh). When trying your latest hulu.sh I get this:

Image

I have firefox.exe located in the default install location at "C:\Program Files (x86)\Mozilla Firefox\firefox.exe", and I've tried copying the entire Mozilla Firefox into C:\Program Files\ and it still had the same error. I tried this since in previous hulu.sh scripts I had to edit the Firefox path to "/cygdrive/c/Program Files (x86)/mozilla firefox/firefox" for it to find Firefox since it was in the Program Files (x86) folder, not the regular Program Files folder.

I have the latest full Cygwin x64 installation (1.7.24) and Firefox installation (also KSV's most recent RTMPDump patch but I don't see that affecting this):

Image
Image



Edit 2013/09/14: I was able to get your most recent script to run by replacing 'firefox' in lines 65 and 94 with '"/cygdrive/c/Program Files (x86)/mozilla firefox/firefox"'

I'm still toying with the sleep values to try and get it to work though :/

Contents of tmp/hulu.log:
14:57:47.40 firefox started
14:58:07.47 starting dump
14:58:11.54 waiting for firefox to be killed
14:58:11.63 firefox killed
14:58:11.94 Dumped too soon, try increasing sleep values.
14:58:11.98 Example using current values
14:58:12.02 S1=20 S2=4 hulu.sh URL
14:58:12.07 post contents of /tmp/hulu.log to
14:58:12.11 ffmpeg.zeranoe.com/forum/viewtopic.php?t=1055

Post Reply