Feb 08 2009

After spending many hours playing with wireshark and perl scripting, you can now download Hulu.com closed-captions / subtitles with get_iplayer v1.33+. Since I am in the UK, I had to set up a SOCKS proxy on a US based ssh server. By using:

ssh -D 1080 [server ip]

and then installing tsocks to transparently redirect all network traffic from my system via the US based server, then running up firefox to play a Hulu flash-based movie and clicking the ‘CC’ button, I was able to network sniff for the web requests that obtained the Subtitles. Simple really.

I’ve converted the SAMI subtitle stream to SubRip format because it seems to be the most widely supported subtitle format (see this comparison).

So all you need to do now is run:

get_iplayer --type hulu --subtitles --get [search terms]

13 Comments

  • On February 8th, 2009, Bigarules said:

    I used the following command (a.b.c.d corresponds to a proxy server) and name is name of tv show

    ./get_iplayer.sh –proxy a.b.c.d:80 –type hulu –subtitles –get [name] –rtmp –rtmpdump “./rtmpdump”

    I get the following errors, after the TV show name is recognised.

    What am I doing wrong?
    WARNING: Failed to get programme stream data for [name] from site
    WARNING: No programme stream URLs were found for flashlow, skipping
    INFO: skipping flashlow mode

    [Reply]
    • On February 8th, 2009, Bigarules said:

      Slight improvement using –partial-proxy command but still not getting a file

      DEBUG: Setting buffer time to: 36000000ms
      Connecting to rtmp://cp39465.hulu.com:1935/ondemand?_fcs_vhost=cp39465.hulu.com&auth=daEc.dXaFa2cDbHbWcacibbc4djdnbCcabz-bjJY30-8-YqOBsCr0Jyp&aifp=NS20070910&slist=content/39484/14/280/HuluTranscode_65375_73176_FLASH_480K_16x9_23_976__YpEMieBQaEGqLxiz6ef8LA …
      DEBUG: Hostname: cp39465.hulu.com
      DEBUG: Port: 1935
      DEBUG: connected, hand shake:
      DEBUG: handshaked
      Connected…

      Starting download at 0.000 KB
      DEBUG: GetNextMediaPacket, received: invoke
      DEBUG: Property:
      DEBUG: Property:
      DEBUG: Property: NULL
      DEBUG: Property:
      DEBUG: Property:
      DEBUG: Property:
      DEBUG: Property:
      DEBUG: HandleInvoke, server invoking
      ERROR: rtmp server sent error
      DEBUG: GetNextMediaPacket, received: invoke
      DEBUG: Property:
      DEBUG: Property:
      DEBUG: HandleInvoke, server invoking
      ERROR: rtmp server requested close
      Closing connection… done!

      [Reply]
      • On February 9th, 2009, linuxcentre said:

        rtmpdump cannot and will never be able to go through a standard web proxy because it uses rtmp and not http etc. I’ve used tsocks but then you will need a socks server at your disposal also.

        [Reply]
      • On March 24th, 2009, colonel32 said:

        I’m recently having problems in v1.49 with empty srt files, for example:

        ./get_iplayer –pid=b00jf7l7 –subtitles –force –overwrite

        INFO: Downloaded Subtitles to ./The_One_Show_-_23_03_2009_b00jf7l7_default.srt

        which is zero-bytes long.

        Have the BBC changed something?

        [Reply]
        • On March 24th, 2009, linuxcentre said:

          Looks like a BBC problem. The feed they advertise is 404. Does it work on the flash iplayer through a web browser?

          [Reply]
        • On March 24th, 2009, colonel32 said:

          Ah, good point, no it doesn’t. It also doesn’t work on the flash iplayer for a programme which *did* have them last Friday. They’ve broken it! Cheers Phil.

          [Reply]
          • On March 24th, 2009, colonel32 said:

            Sorry I’m misinforming you, they are still there for the programme that did have them the other day.

            Only the programme I first reported doesn’t have them, neither in the flash player or get_iplayer.

            [Reply]
          • On April 11th, 2009, ufufgnaf said:

            How did you get your US based ssh server?

            [Reply]
            • On April 11th, 2009, linuxcentre said:

              One of the cheapest ways is to get a Linux VPS from swvps.com (US$10 per month). http://www.comparevps.com/ shows a list. If you just want an ssh machine for a SOCKS proxy then the memory of the VPS is really unimportant. You might want to go for one which has a large volume quota if you are going to use it for a lot of Hulu stuff. Also, be aware that getting get_iplayer to work with hulu is patchy because hulu keep re-obfuscating. I’ve found that using the VPS for ssh-based SOCKS for hulu in a web browser works fine if you use a tsocks wrapper or similar.

              [Reply]
              • On April 11th, 2009, ufufgnaf said:

                Is there anyway we can get free or cheap and stable SOCKS server based in US?

                [Reply]
                • On April 11th, 2009, ufufgnaf said:

                  don’t worry, found the way to get socks proxy
                  http://proxy-heaven.blogspot.com
                  you can get a list from here.

                  http://www.project2025.com/charon.php
                  you can get a software which tests proxy here.

                  [Reply]
            • On April 14th, 2009, Bob Danish said:

              Ok, I can currently watch Hulu on firefox from Canada with tsocks set up as per this website:
              http://www.alternativedenial.org/?p=94

              However, when I try to download content using get_iplayer (just after using ‘. tsocks -on’ in the command line), I get the following warnings:

              WARNING: Failed to get programme stream data for XYZ from site

              Phil has said above:
              “rtmpdump cannot and will never be able to go through a standard web proxy because it uses rtmp and not http etc. I’ve used tsocks but then you will need a socks server at your disposal also.”

              But I have tsocks running through an SSH tunnel to my VPS in the US.

              What am I missing?

              [Reply]
              • On April 15th, 2009, Howard Chu said:

                The program stream data is now encrypted, and get_iplayer has not been updated with code to decrypt it.

                [Reply]

              WordPress Themes