Vimeo Downloader 0.3 released

Note: Vimeo Downloader is for those comfortable with the command line (or interested in learning). To download Vimeo videos within your browser, use Free Youtube! (get Firefox, install Greasemonkey, then go to Free Youtube! and click Install). When you visit a Vimeo page after installing Free Youtube!, a Download link will appear under the video. If you need to download password-protected Vimeo videos, you should use Free Youtube! since Vimeo Downloader won’t download them.

Update (2010-11-30): I’ve replaced Vimeo Downloader 0.3.0 with version 0.3.1, which removes the caption from the filename. As pointed out by Mikko, the caption is not guaranteed to contain characters suitable for a filename. I may add the caption option back when I’m confident we have an exhaustive list of suitable filename characters, but for now you can uncomment the FILENAME= line I disabled if you know the caption for your video will work in a filename.

I’ve updated Vimeo Downloader to include Jorge’s changes as well some other minor enhancements:

vimeo_downloader.sh

Here is the complete list of changes:

  • download HD version if available (from Jorge)
  • use caption as part of file name (from Jorge) – disabled for now; see above
  • output the type of video that has been downloaded (from Jorge)
  • accept either a Vimeo URL in addition to the Vimeo ID
  • revert to basic version if perl is unavailable

To download a Vimeo video (ie. http://vimeo.com/1084537) with Vimeo Downloader, do the following from a terminal window:

./vimeo_downloader.sh http://vimeo.com/1084537

Vimeo Downloader can also use just the ID (this is how the old version worked):

./vimeo_downloader.sh 1084537

After downloading, you will probably have to make the Vimeo Downloader script executable before running it:

chmod u+x ./vimeo_downloader.sh

Vimeo Downloader should work on any POSIX system, including Ubuntu, Mac OS X, or Windows with MSYS. For more details, including how and why I created it, see my original post, Vimeo Downloader 0.1 released.

Thanks to Jorge for the major new features in this release (see Jorge’s comment for the original version).

82 Responses to “Vimeo Downloader 0.3 released”


  • Thank you! Thank you very mach! 🙂

  • any ideas what this may be related to ….

    –2010-11-18 14:14:26– (try: 8) http://av.vimeo.com/81444/754/6993988.flv?token=1290083336_ec5d425ee3836cb807d31c6153641334
    Connecting to av.vimeo.com|196.33.166.200|:80… connected.
    HTTP request sent, awaiting response… Read error (Connection reset by peer) in headers.
    Retrying.

  • I’ve just updated http://userscripts.org/scripts/show/34765 to support HD as well, using this code.

  • HI,

    First, thanks for the work you put in to this. Unfortunately I’ve tried it two ways and it doesnt work. I tried by downloading grease monkey (already had easy you tube) and from there the word download did appear on on the vimeo page, but when clicked it just opened the video up in full screen, no dowload. then went to you tube and the same problem occurred, and I could no longer download videos from there. Uninstalled greasemonkey and reinstalled easy youtube and now i can download on youtube, but back to where i started from.

    I then opened terminal, (after downloading viemodownloader.sh to desktop), typed in

    ./vimeo_downloader.sh http://vimeo.com/video id

    and this appeared:

    -bash: ./vimeo_downloader.sh: No such file or directory

    then tried:

    ls -l

    and got a list:

    drwx——+ 22 toKio toKio 748 Nov 19 02:48 Desktop

    then tried:

    ./vimeo_downloader.sh http://vimeo.com/video id

    and got no such file or directory again.

    sorry I’m so clueless, appreciate the help!

    • If you list (ls -l) and you only find Desktop thats means you dont have the vimeo_downloader.sh in that folder, try to move the shell again there and execute again.

  • Nice script!

    Some characters should be escaped in the filename, for example directory delimiter(s). Try this with the current version of the script http://vimeo.com/17092282, and it will fail as the caption is used as filename, and the caption also contains a ‘/’ character. For directory delimiters only, something like this would work:

    77,78d76
    < FILENAME=`echo ${FILENAME} |sed 's///-/'`
    <

    But as i mentioned, there are also other characters taht should be escaped.

  • works fine in snow leopard!

    a tip: just type the vimeo id (e.g. ./vimeo_downloader.sh 5505509)

    thanks!

  • tokio,

    is this “Desktop” the only output what your “ls -l” is giving?

    ./vimeo_downloader.sh tries to execute program at current directory and if it is not there no wonder there is “no such file”-error

    Also use amartinez’s help, only the video id is needed, not a url.

  • I use ext formatted drives so I only have to care about / in filenames. So made the change that Mikko suggested, but without the sed call
    FILENAME=”${CAPTION////-}-${VIMEO_ID}-${ISHD}.flv”

  • @tokio if you want to download the video and your browser wants to open it with a plugin instead, just right-click on the download link and hit “Save link as…”

    For your problem with the script from this post, you have to actually be in the directory where you downloaded the script to and the script must be set to executable.

  • This is awesome! It worked on Ubuntu Maverick perfectly. Many thanks for sharing!

  • Hi !!! i just tried it… But the file downloaded turns out to be only 8 KB each… why is it like that?? I typed all the things i should… It was working fine a few days ago but today it just stopped working.. ( i did not install Greasemonkey or Free Youtube! and it was working previously..) Help!

    figo-fuads-Mac-Pro:~ figofuad$ ~/Desktop/vimeo_downloader.sh 8388573/usr/bin/curl
    Using curl…
    /usr/bin/perl
    Using perl…
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    101 4459 101 4459 0 0 6120 0 –:–:– –:–:– –:–:– 13471

    Downloading video 8388573 to 8388573-hd.flv…
    Request_signature=22cf1de20eee0880c184ad096873b1a9
    Request_signature_expires=1293686858

    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 4212 100 4212 0 0 6167 0 –:–:– –:–:– –:–:– 12648
    Video 8388573 saved to 8388573-hd.flv
    8388573-hd.flv: ASCII English text

  • I too am experiencing what the last commentor experienced: no errors, but results with a 8KB file.

  • Try get_flash_videos. It works on almost every flash site, not just Vimeo. You can get it from CPAN.

  • I can not download a password-protected video of vimeo using Greasemonkey and Free Youtube!, help me please! I’m using:

    Windows 7
    Firefox 3.6.13
    Greasemonkey 0.8.20100408.6
    Free Youtube! Script
    VLC 1.1.5
    Video ID = 15313781

  • Thanks man. Update the post in my blog.

    Sorry my English.

    hug,

  • Same issue as jayson and Brandon above!

    [code]…the file downloaded turns out to be only 8 KB each… why is it like that?? I typed all the things i should… It was working fine a few days ago but today it just stopped working..[/code]

    I opened (in TextEdit) the 8 KB flv file downloaded and it says: [code] Whoops! We are having some technical difficulties, please try again in a minute.

    [/code]
    But, after several more attempts, the download continues to fail with the same small 8KB flv file downloaded.

    Maybe vimeo/edgesuite has made some configuration tweaks that break the script??

  • Same for me, used this script for a long time, but now it just wont dl the videos. 8kb…

  • when i try download this http://vimeo.com/9387462
    free youtube not downnload original file, i get only 45 mb mp4 file.

  • /usr/bin/wget
    Using wget…
    /usr/bin/perl
    Using perl…
    –2011-01-27 00:08:53– http://www.vimeo.com/moogaloop/load/clip:16838477
    Resolving http://www.vimeo.com... 66.235.126.128
    Connecting to http://www.vimeo.com|66.235.126.128|:80… connected.
    HTTP request sent, awaiting response… 200 OK
    Length: 5311 (5.2K) [text/xml]
    Saving to: `STDOUT’

    100%[===================================================================================================================>] 5,311 –.-K/s in 0.03s

    2011-01-27 00:08:53 (204 KB/s) – written to stdout [5311/5311]
    I get an interesting error, when i type in terminal
    $ sudo ./vimeo_downloader.sh 16838477
    i get the following:

    Downloading video 16838477 to 16838477-hd.flv…
    Request_signature=a18f5b29cb9b4c6b1faf00123588ea6e
    Request_signature_expires=1296104933

    –2011-01-27 00:08:53– http://www.vimeo.com/moogaloop/play/clip:16838477/a18f5b29cb9b4c6b1faf00123588ea6e/1296104933/?q=hd
    Resolving http://www.vimeo.com... 66.235.126.128
    Connecting to http://www.vimeo.com|66.235.126.128|:80… connected.
    HTTP request sent, awaiting response… 500 Internal Server Error
    2011-01-27 00:08:53 ERROR 500: Internal Server Error.

    Video 16838477 saved to 16838477-hd.flv
    16838477-hd.flv: empty

  • hello.
    as you might notice some videos are available for hi quality download when you login (example -> http://vimeo.com/12394347 = 1920×1080, 1085.71MB). would it be possible to add functionality to download the full quality video if available?

  • Thanks! this was really useful

  • I love it. Thanks.

  • Here’s a patch that lets the user specify the filename to download to. It also safely restores the caption to auto-generated filenames, by squishing any characters other than ASCII letters, numbers, hyphens and dots. http://hetzner.barnyard.co.uk/vimeo-downloader-diff

  • Hello, Thanks for the script. It works well on my personal Ubuntu machine, but doesn’t work on the web server i use – and from where i wish to make the downloads. Not sure what flavour of Linux this machine is but it’s kernel 2.6.18-294.26.1.el5.lve0.8.18.

    The server doesn’t have wget but does have curl. Here is the output with curl in verbose mode:

    vimeo_downloader.sh http://vimeo.com/15406647
    which: no wget in (/usr/local/jdk/bin:/usr/kerberos/bin:/usr/lib/courier-imap/bin:/usr/lib64/ccache:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/home/iainmott/scripts:/home/iainmott/bin)
    /usr/bin/curl
    Using curl…
    /usr/local/bin/perl
    Using perl…
    * About to connect() to http://www.vimeo.com port 80
    * Trying 74.113.233.128… connected
    * Connected to http://www.vimeo.com (74.113.233.128) port 80
    > GET /moogaloop/load/clip:15406647 HTTP/1.1
    > User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
    > Host: http://www.vimeo.com
    > Accept: */*
    >
    < HTTP/1.1 200 OK
    < Date: Fri, 15 Apr 2011 20:09:37 GMT
    < Server: Apache
    < X-Powered-By: PHP/5.3.3
    < Expires: Fri, 15 Apr 2011 08:09:37 GMT
    < Cache-Control: no-store, no-cache, must-revalidate
    < Cache-Control: post-check=0, pre-check=0
    < Set-Cookie: flash_bg_timestamp=1302898177; expires=Fri, 15-Apr-2011 20:19:37 GMT; path=/; domain=.vimeo.com
    < Vary: Accept-Encoding
    < Content-Length: 5368
    < Connection: close
    GET /moogaloop/play/clip:15406647/adfad71e6002e414f27167908fc473e3/1302898177/?q=hd HTTP/1.1
    > User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
    > Host: http://www.vimeo.com
    > Accept: */*
    >
    < HTTP/1.0 500 Internal Server Error
    < Date: Fri, 15 Apr 2011 20:09:37 GMT
    < Server: Apache
    < X-Powered-By: PHP/5.3.3
    < Expires: Fri, 15 Apr 2011 08:09:37 GMT
    < Cache-Control: no-store, no-cache, must-revalidate
    < Cache-Control: post-check=0, pre-check=0
    < Vary: Accept-Encoding
    < Content-Length: 4444
    < Connection: close
    < Content-Type: text/html; charset=UTF-8
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 4444 100 4444 0 0 26800 0 –:–:– –:–:– –:–:– 81414Closing connection #0

    Video 15406647 saved to 15406647-hd.flv
    15406647-hd.flv: ASCII English text

    ——–

    The saved video is only 4.4k.

    Can anyone offer suggestions as to what might be wrong?

    thanks!

  • the version of curl is: 7.15.5

  • Iain wrote:

    Hello, Thanks for the script. It works well on my personal Ubuntu machine, but doesn’t work on the web server i use – and from where i wish to make the downloads…

    The server doesn’t have wget but does have curl.

    I was able to easily reproduce this on my own system using cURL. It seems that Vimeo is now sending an error page instead of the video when it sees a cURL User-Agent header (not sure when they started doing this, but it worked about a year ago). So you can fix this (for now) by changing line 39 in the script to the following:

    GET_CMD="curl -A wget -L"

    That will cause cURL to send a “wget” User-Agent header, which I’ve found fixes the issue in practice. Let me know if it works for you or not.

    I will most likely roll this change into the next update of Vimeo Downloader, but I’m not sure when I’ll get around to making that. So it’s best to modify your local copy with the above change for now.

  • Yes it works! Thanks a lot!

  • @ossguy : Thanks so much for the 4/16/2011 comment. It solved the problem for me as well.

  • I’m glad to hear it worked for you. Which OS are you using? I’m interested to see if it’s just an issue for Linux-based OSes or if it affects OS X (and Windows), too.

  • I’m getting empty files:

    /usr/bin/curl
    Using curl…
    /usr/bin/perl
    Using perl…
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    101 4471 101 4471 0 0 6710 0 –:–:– –:–:– –:–:– 15311

    Downloading video 22428395 to 22428395-hd.flv…
    Request_signature=f526ebcf9c99e4994d2a40d62c8127f8
    Request_signature_expires=1303497611

    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    101 4448 101 4448 0 0 9794 0 –:–:– –:–:– –:–:– 20403
    Video 22428395 saved to 22428395-hd.flv
    22428395-hd.flv: ASCII English text

  • Thanks for this, ossguy! The script only worked for me once I made the line 39 change. I’m on a Mac, 10.6.7. (In fact, the site that I’ve used for downloading streaming videos in the past, savevid.com, is failing in the same manner as your script originally was.)

  • I’m also running Mac 10.6.7. What is the line 39 change?

  • @ossguy In reference to Justin Noel ” : Thanks so much for the 4/16/2011 comment. It solved the problem for me as well.

    I’m using Mac 10.6.6

  • Thank you very much for this nice script, it’s still working (I was searching for hours to find a script to download videos from vimeo with a given video_id). Thanks again! 😉

  • Thank you! thank you! thank you! I also got it to work with line 39 change in Mac 10.6.6

  • Works great.
    Is there a way to fetch the mp4 version instead of flv?
    The former is compatible with portable devices.
    Best regards Kaspar

  • Hi there,
    I’m trying to download a video from vimeo but I’m only getting a html site back saying they have technical difficulties and that I should try again in a minute. Didn’t work yesterday, doesn’t work today. Just wanted to know if this is really temporary or did they change something to prevent the use of this downloader?
    Thanks
    Philipp

  • Hi, I made a little improvement to the script: the filename take the caption of the video, but it remove illegal characters.

    See (line 74, 75 and 76):
    http://pastebin.com/44R9viUp

  • Dear Denver,

    Thanks for creating such a useful tool.

    Any ideas how to make it able to support download resume ?

    My Internet connection is not very good, sometimes it will disconnect. If that happen, the script will downnload from the beginning not from where it lefts off.

    Thanks

  • Great script! Both version 0.3.1 and mrjk’s edit worked flawlessly in Windows Msys.

    TH: To change it to support resume, add -c to the wget command in the script, and/or -C to the curl command:
    34: GET_CMD=”wget -c -O -”
    39: GET_CMD=”curl -C -L”

  • please help i cannot download password vimeo videos 🙁

  • abiogenesis : Thanks for your suggestions, unfortunately it still doesn’t work as expected.

  • Do you have plans to support download of password_protected videos?

  • Sweet. Thanks a lot!

  • Much appreciated! Great work!
    Changing line 39 to non-curl header fixed my problem.
    Thank you

  • Yes, THX a lot!

    change in line #39 solves problem with 4k file download from vimeo.

    Hate this “service” 🙁

  • Nice. A couple of suggestions.

    (1) To fix up the Caption in order to use it in the filename, try:

    Caption=$(echo “${Caption}” |tr -s ‘ ‘ ‘-‘|tr -cd ‘[:alnum:]-‘)

    2) Rather than using perl or sed, use BASH_REMATCH.

    readonly selectPattern=”^.*(.*?).*$”
    if [[ “${videoXML[i]}” =~ $selectPattern ]]; then
    echo “${BASH_REMATCH[1]}”
    return
    fi

    I have ${1} above, because I put this into a function and passed the text, like:

    REQUESTSIGNATURE=$(get_data “REQUEST_SIGNATURE”)

    To make case insensitive search use:

    oldshopt=$(shopt -p nocasematch)
    shopt -s nocasematch

    Thanks.

  • readonly selectPattern=”^.*LDB1BG(.*?)LSDB1BG.*$”
    L=less than sign
    D=dollar sign
    B=brace
    G=greater than sign
    S=slash

    I noticed some characters weren’t allowed in the regex.
    I hope this helps.

  • One more item I noticed. Added newlines in echo require the “-e” option to recognize backslashes. I’m using bash on linux. “help echo” shows the option but doesn’t describe it. If you “man bash” and search for echo it’s documented there. I was looking at the output of downloader and was seeing “\n” not new lines.

    echo -e “\nDownloading video ${VIMEO_ID} to ${FILENAME}

    or use prinf:

    printf (“\nDownloading video %s to %s\n”) \
    ${VIMEO_ID} ${FILENAME}

    Thanks.

  • Thanks! Worked as a charm!

  • I have much cleaner code, no cryptic regular expressions needed. Just simple Ruby code: https://gist.github.com/1556653

  • Good job! but is not working for private videos such as: http://vimeo.com/30017886

    Any ideas?

  • Worked beautifully as is on my Nokia N900 running Maemo 5.
    I did make the change on line 34 to ‘wget -c’ for resuming downloads.

    Thanks a lot for this 🙂

  • I installed wget but everytime when I run the script
    I still got error like following
    “Could not find wget or curl”
    Any suggestion? Thx!

    • bluej:
      I’m guessing you don’t have both of these (curl and wget) executables in your path (a directory shown when you ‘echo $PATH’).
      You can check which one in particular is missing, if you do ‘which wget’ or ‘which curl’

  • The vimeo download script suddenly stopped working. I am getting a 404 response for all videos. Anybody have a fix for this?

  • It’s working fine for me. I just downloaded http://vimeo.com/41113876 (which you mentioned at http://ossguy.com/?p=172#comment-92917 ) using Vimeo Downloader 0.3.1 on Ubuntu 10.04 with no problems.

    Which operating system are you using? Which version of Vimeo Downloader are you using? Which shell (to see, run echo $SHELL)?

  • I am having the same results as Phoenix: 404 Not Found; 301 Moved Permanently.
    Vimeo Downloader v0.3.1; Ubuntu 11.10; bash 4.2.10; Wget 1.12; perl 5.12. In April the script was producing videos, now it does not.

  • Video 41670884 saved to 41670884-hd.flv
    41670884-hd.flv: HTML document text

    looks like vimeo changed something

  • Anybody figure out how to deal with the vimeo changes?

  • something strange..
    curl: (3) [globbing] error: bad range specification after pos 1382

    Video 1084537 saved to 1084537-sd.flv
    1084537-sd.flv: empty

  • What happen with videos that are protected??? like this http://player.vimeo.com/video/46908928

Leave a Reply