Vimeo Downloader 0.1 released

Update (2009-01-27 18:57 UTC): I have updated Vimeo Downloader to fix some issues reported by people using Mac OS X. The download link below has been updated with the new version (0.1.1). Please try the new version if you had issues with the original version.

Here is the first version of Vimeo Downloader, a script I created to download videos from Vimeo:

vimeo_downloader.sh

The script should work on any system with a POSIX shell (such as Ubuntu, Mac OS X, or Windows with MSYS) and wget or curl (wget is in Ubuntu by default and also available for Windows, curl is in Mac OS X by default). To use it, simply run vimeo_downloader.sh with the ID of the Vimeo video you want to see. For example, the ID of http://www.vimeo.com/2373142 is 2373142. If you have any questions, please leave a comment on this post or contact me directly.

Thanks to Voinage on the XBMC forums for describing how to download videos from Vimeo.

This script is the latest in my attempts to help people depend less on Flash. For more details, see Why I haven’t installed a Flash player. For viewing YouTube videos without Flash, use Free Youtube! by Stephen Paul Weber. Hopefully this script will make it easier to incorporate Vimeo support into something like Free Youtube!.

Update: Free Youtube! now supports Vimeo, thanks to this script. Just install Greasemonkey, then Free Youtube! and you will have Flash-free Vimeo.

51 Responses to “Vimeo Downloader 0.1 released”


  1. 1 milkwood

    Wonderful, works like a charm, thanks!

  2. 2 Ralph

    Looks like it doesn't work for password protected videos. Any idea how to expand it to include those?

    Cheers,

    Ralph

  3. 3 ossguy

    What do you mean by "password protected"? Videos that require you to login to view them? It's probably possible to extend it to do that, although it may require that you do some extra steps, such as logging in via a web browser and then passing a cookie from your logged-in session to the script. Personally, I haven't encountered any videos like you mentioned that I wanted to watch, so unless it turns out to be simple to fix, I probably won't. Of course anyone who wants to fix it can go ahead; the script is free to change and redistribute. I would even host the updated version.

    Can you provide an example of a "password protected video"? If I see an example, I will have a better idea of how difficult it would be to implement.

    Other than the password protected video issue, is the script working well for you?

  4. 4 orlando

    It does not work for me. I go to terminal, chmod file to 755, run it by typing "$ ./vimeo_downloader.sh 907680" and I get the following error...

    Using curl...
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 5412 100 5412 0 0 36471 0 --:--:-- --:--:-- --:--:-- 4438k
    Downloading video...
    curl: (3) [globbing] errpr: bad range specification after pos 518
    Video saved to 907680.flv

  5. 5 ossguy

    Downloading video 907680 did not cause me any problems in Ubuntu 8.10. What OS are you running? Can you post the output of curl --version and uname -a on your system?

  6. 6 ossguy

    Please also send the output of Vimeo Downloader after you change GET_CMD on line 37 from "curl -L" to "curl -v -L". This will help us see which URL curl is choking on.

    You may also wish to modify the script so it invokes curl with the --globoff flag. This might fix the issue, depending on what URL Vimeo is redirecting you to.

  7. 7 salomoko

    I received the following error on initial attempt to download video 1368006. then I added the flag --globoff to my curl demand in the shell script and it still isn't successful. It gives me this:

    Downloading video...
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 317 100 317 0 0 632 0 --:--:-- --:--:-- --:--:-- 0
    Video saved to 1368006.flv

    however, the saved video is bad. I can't do anything with it... Plus it downloaded so quick...

    curl version: curl 7.16.3
    arch: 9.6.0 Darwin Kernel Version 9.6.0 - i386 intel Mac OS X

    any thoughts?

  8. 8 ossguy

    Video 1368006 downloads fine for me using both wget and curl on Ubuntu 8.10. I don't have Mac OS X to test so it could be an issue with its version of curl.

    The file you're downloading is only 317 bytes long and it should be 20833043 bytes. Can you paste the contents of that file (1368006.flv) into a comment? It's quite possibly HTML or XML.

    Please also send the output of Vimeo Downloader after you change GET_CMD on line 37 from "curl -L" to "curl -v -L" and then try downloading again, as I recommended in a previous comment. This will make it easier for me to see what's going wrong.

  9. 9 salomoko

    Contents of : 1368006.flv

    414 Request-URI Too Large

    Request-URI Too Large
    The requested URL's length exceeds the capacity
    limit for this server.

    Apache Server at testing.vimeo.com Port 80

    verbose output from modified script:

    /usr/bin/curl
    Using curl...
    * About to connect() to http://www.vimeo.com port 80 (#0)
    * Trying 66.235.126.128... connected
    * Connected to http://www.vimeo.com (66.235.126.128) port 80 (#0)
    > GET /moogaloop/load/clip:1368006 HTTP/1.1
    > User-Agent: curl/7.16.3 (powerpc-apple-darwin9.0) libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3
    > Host: http://www.vimeo.com
    > Accept: */*
    >
    < HTTP/1.1 200 OK
    < Date: Sun, 25 Jan 2009 01:21:45 GMT
    < Server: Apache
    < X-Powered-By: PHP/5.2.0-8+etch11
    < Set-Cookie: 5vimeo_flasher=497bbea9cc147; expires=Wed, 23-Jan-2019 01:21:45 GMT; path=/; domain=.vimeo.com
    < Set-Cookie: 5flash_bg_timestamp=1232846505; expires=Sun, 25-Jan-2009 01:31:45 GMT; path=/; domain=.vimeo.com
    < Set-Cookie: 5force_hd=0; expires=Sun, 25-Jan-2009 01:21:44 GMT; path=/; domain=.vimeo.com
    < Cache-Control: max-age=0, no-store
    < Expires: Sat, 17 Mar 1984 12:07:00 GMT
    < Vary: Accept-Encoding
    < Content-Length: 5346
    < Connection: close
    < Content-Type: text/xml;charset=UTF-8
    GET /moogaloop/play/clip:1368006/ 1232846505 0 Fastball - "Soul Radio" 504 276 264 http://images.vimeo.com/10/07/33/100733519/100733519_506x277.jpg 1 1 50 http://vimeo.com/1368006 http://images.vimeo.com/30/49/80/30498012/30498012_50.jpg Jose A Salinas 1368006 0 anybody 0 0 0 <![CDATA[Fastball - "Soul Radio" from Jose A Salinas on Vimeo.]]> 0 0 0 100 1 1 0 public 0 The Small Stars - "Otra Vez" http://images.vimeo.com/10/15/31/101531165/101531165_100x75.jpg 1376983 Fastball - "Soul Radio" http://images.vimeo.com/10/07/33/100733519/100733519_100x75.jpg 1368006 Fastball - "Always Never" http://images.vimeo.com/10/07/19/100719900/100719900_100x75.jpg 1367863 cache 1 1368006 0 0 0 1 1 1 0 1 1 1 1 1 00adef videos uploaded_videos The Small Stars - "Day Job" Jose A Salinas http://vimeo.com/texasyesfan http://images.vimeo.com/21/36/24/213624395/213624395_100.jpg 2479311 The Small Stars @ Gruene Hall - 11 "Small Stars Theme" Jose A Salinas http://vimeo.com/texasyesfan http://images.vimeo.com/18/99/56/189956194/189956194_100.jpg 2254740 The Small Stars @ Gruene Hall - 10 "Don't Keep 'Em Waiting" Jose A Salinas http://vimeo.com/texasyesfan http://images.vimeo.com/18/99/12/189912606/189912606_100.jpg 2254483 1232846505 0 9b31e9ea0473961f73e661bb5e0532b1 1232859600 / 1232846505 0 Fastball - "Soul Radio" 504 276 264 http://images.vimeo.com/10/07/33/100733519/100733519_506x277.jpg 1 1 50 http://vimeo.com/1368006 http://images.vimeo.com/30/49/80/30498012/30498012_50.jpg Jose A Salinas 1368006 0 anybody 0 0 0 <![CDATA[Fastball - "Soul Radio" from Jose A Salinas on Vimeo.]]> 0 0 0 100 1 1 0 public 0 The Small Stars - "Otra Vez" http://images.vimeo.com/10/15/31/101531165/101531165_100x75.jpg 1376983 Fastball - "Soul Radio" http://images.vimeo.com/10/07/33/100733519/100733519_100x75.jpg 1368006 Fastball - "Always Never" http://images.vimeo.com/10/07/19/100719900/100719900_100x75.jpg 1367863 cache 1 1368006 0 0 0 1 1 1 0 1 1 1 1 1 00adef videos uploaded_videos The Small Stars - "Day Job" Jose A Salinas http://vimeo.com/texasyesfan http://images.vimeo.com/21/36/24/213624395/213624395_100.jpg 2479311 The Small Stars @ Gruene Hall - 11 "Small Stars Theme" Jose A Salinas http://vimeo.com/texasyesfan http://images.vimeo.com/18/99/56/189956194/189956194_100.jpg 2254740 The Small Stars @ Gruene Hall - 10 "Don't Keep 'Em Waiting" Jose A Salinas http://vimeo.com/texasyesfan http://images.vimeo.com/18/99/12/189912606/189912606_100.jpg 2254483 1232846505 0 9b31e9ea0473961f73e661bb5e0532b1 1232859600 /?q=sd HTTP/1.1
    > User-Agent: curl/7.16.3 (powerpc-apple-darwin9.0) libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3
    > Host: http://www.vimeo.com
    > Accept: */*
    >
    < HTTP/1.1 414 Request-URI Too Large
    < Date: Sun, 25 Jan 2009 01:21:46 GMT
    < Server: Apache
    < Vary: Accept-Encoding
    < Content-Length: 317
    < Connection: close
    < Content-Type: text/html; charset=iso-8859-1
    <
    { [data not shown]
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 317 100 317 0 0 584 0 --:--:-- --:--:-- --:--:-- 0* Closing connection #0

    Video saved to 1368006.flv

    any thoughts? What version of curl did you download it with via Ubuntu?

  10. 10 ossguy

    Thanks for posting that, salomoko. The issue ended up being with sed, which differs in behavior between Ubuntu and Mac OS X. I have updated the download link in the main article with a new version of Vimeo Downloader. That should fix the problems. Please try it out and let us know how it goes.

  11. 11 TiPi

    Hi Ossguy

    Thanks a lot for this scrip :)
    I just Used it yesterday to download this viedeo : http://vimeo.com/2945730
    As you can see, the HD version is available.
    I've been fighting to find how get the HD video instead of the SD one.
    I tried the flag "hf_off=0", an lots more.
    And then I carefuly looked at your scrip and I found the "SD" flag.
    I changed it fo "hd", "Et voilà !" :D :D
    The HD video was mine :)

    You should add a swith question at the begining of the scrips to ask people if a HD version of the video is avaiable and they want it to be downloaded.

    Once agan, thanks for this marvelous script ;)

  12. 12 salomoko

    sweet man! everything works as planned! thanks for the update! and sorry for the delay in confirming, been out lately!

    cheers man!

  13. 13 kfarr

    Fantastic! Been looking for something like this for a while, akin to the awesome youtube-dl.py (http://bitbucket.org/rg3/youtube-dl/wiki/Home).

    Thanks!

  14. 14 jay

    can someone explain how to do this to someone who's not a hacker or a programer? I've got minimal understanding of how to "run a script" on mac os x? I tried copying and pasting the script into terminal and replacing VIMEO_ID with the # of the video but that's about all I can think of, and it doesn't do anything.

    thanks

  15. 15 ossguy

    First, you should download vimeo_downloader.sh to your desktop, which is the default in Safari and probably other browsers. Then open Terminal, which it sounds like you've found already, and navigate to your desktop. Usually this is as easy as typing cd Desktop and pressing Enter. Once you're there, you can type ls -l to see what's on your desktop, which should include vimeo_downloader.sh. From here, you can run vimeo_downloader.sh by typing ./vimeo_downloader.sh 2373142, for example (if you wanted to download the video with ID 2373142).

    Alternatively, once you're in Terminal, you can just run Desktop/vimeo_downloader.sh 2373142, assuming vimeo_downloader.sh is on your desktop.

    You could also use the "Free Youtube!" Greasemonkey script in Firefox, which displays Vimeo videos without Flash and provides a download link to each video. To do this, get Firefox ( http://getfirefox.com/ ), then install the Greasemonkey extension ( https://addons.mozilla.org/en-US/firefox/addon/748 ), then visit the "Free Youtube!" page ( http://userscripts.org/scripts/show/34765 ) and click Install.

    Let me know if you have any questions about this.

  16. 16 ossguy

    I forgot to mention one thing that you will probably have to do before my instructions will work. Once you've navigated to the Desktop folder, you should run chmod u+x vimeo_downloader.sh. After that, you should be able to run ./vimeo_downloader.sh 2373142 without any problems.

  17. 17 Jango

    Hi !

    I've put the script on my Desktop and when I write Desktop/vimeo_downloader.sh (video id), the terminal writes me "Permission Denied" and nothing happen.

    Help, please !
    Thanks.

  18. 18 Jango

    Sorry, i've forgot to write chmod u+x vimeo_downloader.sh

    Now, it works !

  19. 19 Julie

    ossguy - I'd like to know also how to download password protected videos.
    This is my example - I am taking a painting course which I paid for - it's online - we get to watch the videos but can't download them - we sign in to watch them using a basic password "lesson1" "lesson2" etc.
    I am running out of time and am behind in the course and want to put them on my desktop to finish. Is there anyway this program can do this?

    Thanks for any help.All other courses I've taken online you can download the videos - these are HD videos and they are just not available to keep.

  20. 20 ossguy

    Julie and I solved her problem by e-mail. It turns out that Free Youtube! is able to download password-protected videos just fine. To use it, install Greasemonkey, then Free Youtube! and you will see a Download link below all Vimeo videos, including password-protected ones. Greasemonkey requires Firefox; if you don't run Firefox, you can use the Free Youtube bookmarklet instead. To turn off "Free Youtube!", just disable Greasemonkey by clicking on the monkey icon in the bottom-right of Firefox. You can click it again to re-enable "Free Youtube!".

  21. 21 Alex

    This works ... Great job. Thanks!

  22. 22 stahl

    very nice script!
    before it worked for me using msys and wget under windows 7, i had to change the wget command in the script to:
    wget -O ${VIMEO_ID}.mp4 http://... the composed url as in the script.
    it's an mp4, not flv..?

  23. 23 David X Messer

    Many thanks for the script, does exactly what it says on the tin :)

  24. 24 Marcelo de Assis

    Woowwowww!

    Very coooolll!!!
    I recomend use of "Prozilla" with this script - only linux. Download 100x more fast now.

  25. 25 Jorge

    Hi,

    thanks for the basic program but it had flaws IMO. It stores the video as ID-number.flv. Nice, but later those ID-numbers do not say anything. I modified the script to download it as "first-available-caption-([hd|sd]vimeo_id).flv". Perhaps I should have added also the uploader of the video with "by xxx".

    I also needed to change sed -> perl as sed is shit^h^h^h^hbad with non-greedy regexps. XML-file had multiple caption-tags and sed always returned the last one.

    Then I modified it to download HD-version if it is available.

    Todo:
    - check if vimeo_id is available (XML was downloaded)
    - search id from full url for easier cut&paste
    - check if perl exists
    - check if file exists
    - option to losslessly convert to mkv container
    - so lot of room for improvement

    Enjoy this one!

    -------
    #!/bin/sh
    #
    # Vimeo Downloader
    #
    # Copyright (C) 2008 Denver Gingerich
    #
    # Permission to use, copy, modify, and/or distribute this software for any
    # purpose with or without fee is hereby granted, provided that the above
    # copyright notice and this permission notice appear in all copies.
    #
    # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

    # Modified by Jorge to
    # - insert caption filename
    # - download HD version if available
    # - see fileinfo with command file

    if [ $# -ne 1 ]; then
    echo "Vimeo Downloader v0.2.0"
    echo "by Denver Gingerich (http://ossguy.com/)"
    echo " and script improvements by Jorge"
    echo
    echo "Usage: $0 "
    exit 1
    fi
    VIMEO_ID=$1

    which wget
    if [ $? -eq 0 ]; then
    echo "Using wget..."
    GET_CMD="wget -O -"
    else
    which curl
    if [ $? -eq 0 ]; then
    echo "Using curl..."
    GET_CMD="curl -L"
    else
    echo "Could not find wget or curl"
    exit 2
    fi
    fi

    VIDEO_XML=`${GET_CMD} http://www.vimeo.com/moogaloop/load/clip:${VIMEO_ID}`

    REQUEST_SIGNATURE=`echo $VIDEO_XML | perl -p -e 's:^.*?\(.*?)\.*$:$1:g'`
    REQUEST_SIGNATURE_EXPIRES=`echo $VIDEO_XML | perl -p -e 's:^.*?\(.*?)\.*$:$1:g'`
    CAPTION=`echo $VIDEO_XML | perl -p -e 's:^.*?\(.*?)\.*$:$1:g'`
    ISHD=`echo $VIDEO_XML | perl -p -e 's:^.*?\(.*?)\.*$:$1:g'`

    if [ ${ISHD} -eq 1 ]; then
    ISHD="hd"
    else
    ISHD="sd"
    fi

    FILENAME="${CAPTION}-(${ISHD}${VIMEO_ID}).flv"

    echo "\nDownloading video ${VIMEO_ID} to ${FILENAME}...\nRequest_signature=${REQUEST_SIGNATURE}\nRequest_signature_expires=${REQUEST_SIGNATURE_EXPIRES}\n"
    ${GET_CMD} "http://www.vimeo.com/moogaloop/play/clip:${VIMEO_ID}/${REQUEST_SIGNATURE}/${REQUEST_SIGNATURE_EXPIRES}/?q=${ISHD}" > "${FILENAME}"

    echo "Video ${VIMEO_ID} saved to ${FILENAME}"
    echo `file "${FILENAME}"`
    echo

  26. 26 Jorge

    Well on above script enhancements the blog comment engine has taken out XML tags so it does not work directly.

    I try to re-paste changed parts, now escaped..

    REQUEST_SIGNATURE=`echo $VIDEO_XML | perl -p -e 's:^.*?\(.*?)\.*$:$1:g'`
    REQUEST_SIGNATURE_EXPIRES=`echo $VIDEO_XML | perl -p -e 's:^.*?\(.*?)\.*$:$1:g'`
    CAPTION=`echo $VIDEO_XML | perl -p -e 's:^.*?\(.*?)\.*$:$1:g'`
    ISHD=`echo $VIDEO_XML | perl -p -e 's:^.*?\(.*?)\.*$:$1:g'`

  27. 27 Jorge

    No it did not work (sorry for making a lot of messages), escape version 2. I just fixed last line, your task is to fix the rest.

    ISHD=`echo $VIDEO_XML | perl -p -e 's:^.*?>isHD<(.*?)>/isHD<.*$:$1:g'`

    if above does not work then use these instructions
    - after s:^.*? insert tag searched with proper less-than and greater-than characters.
    - before .*$:$1:g' insert closing tag with added "/"

  28. 28 Shahel

    Awesome, worked flawlessly.
    Thanks alot man.

  29. 29 Chris

    desktop: No such file or directory.
    1s: Command not found.
    Desktop/vimeo_downloader.sh: Command not found.

    argh.

  30. 30 ossguy

    Have you downloaded vimeo_downloader.sh to your desktop? If you can't see it on your desktop, then running Desktop/vimeo_downloader.sh won't work. You can also try running ~/Desktop/vimeo_downloader.sh. But be sure you first do chmod u+x ~/Desktop/vimeo_downloader.sh.

  31. 31 Lukas

    Wonderful - thanks for the effort. Simple and effective, loving it.

  32. 32 data stream

    i just want to know ,can it use it in windows XP ? and this is the lasted vision for
    it is 2010 now!

  33. 33 ossguy

    Yes, you should be able to use it in Windows XP (though I haven't tried it myself). Just use these instructions to install MSYS:

    http://www.mingw.org/wiki/msys#toc0

    And also install wget:

    http://gnuwin32.sourceforge.net/packages/wget.htm

    Vimeo Downloader has been reported to work fine on Windows 7 with MSYS and wget so I suspect it will work on Windows XP, too:

    http://ossguy.com/?p=172#comment-15558

  34. 34 Chris

    Just a note..

    Running Mac OS X Snow Leopard.

    Had troubles, read the comments, first did this

    chmod u+x ~/Desktop/vimeo_downloader.sh

    and then this

    ~/Desktop/vimeo_downloader.sh

    And it worked fine and the video is perfect.

    Just wanted to say thanks..

    Chris

  35. 35 Peon

    Can't get Jorge's script to work. I don't think I'm successfully making the changes he suggests. Any chance someone who's got Jorge's script to work could provide a copy that I can download?
    Thanks.

  36. 36 Peon

    I should mention that the original script works fine.

  37. 37 ossguy

    Jorge's script was probably mangled by WordPress so it may not work right. I've asked him to send me a clean version so I can incorporate it into the script hosted on my site instead of having it reside in the comments.

    Out of curiosity, which operating system are you using?

  38. 38 peon

    Thanks, ossguy.
    I'm using OS X, 10.6.2

  39. 39 Jorge Codicimo

    Thanks Ossguy; Works Great !!! No problems with terminal running OSX Snow Leopard. The perfect solution !!!

    Spanish Instructions:

    Funciona perfecto !!! en sólo 4 pasos

    1. Bajar vimeo_downloader.sh al Desktop
    2. Correr el programa TERMINAL (se encuentra dentro de Applications>Utilities. Se abrira una ventana tipo el viejo DOS)
    3. tipear "chmod u+x ~/Desktop/vimeo_downloader.sh" presionar ENTER
    4. tipear "~/Desktop/vimeo_downloader.sh 8125500" (reemplazar 8125500 por el número de video de vimeo que quieras bajar Ej:http://vimeo.com/8125500)

    El video será grabado en el desktop.

  40. 40 Jeff

    @ossguy -
    your comments were supremely helpful. thank you so much.

  41. 41 peon

    Did you ever manage to get a clean copy of Jorge's Vimeo Downloader Script?

  42. 42 Eric

    Really cool, worked great. Thanks! (Also thanks for the dumbed down instructions up there)

  43. 43 ana

    Hello

    I use windows vista, someone can make a description about how to use this programs, I cant find the vimeo downloader in my desktop with the wsys for example.

    thanks

    Ana

  44. 44 Gentoo Fan

    Works great on Gentoo Linux

    Thanks for your time & effort on this, it is much appreciated! =)

  45. 45 tolu

    please can u post a detailed explanation on how to use the vimeo downloader script on windows 7? please note: i have no experience with scripts and am a total noob when it comes to this topic.

  46. 46 jonathan

    gracias por el script

    Saludos

  47. 47 AC

    u sir r f-ing awesome

  48. 48 Francesco

    Thanks for posting and updating the script. It's very simple and it works really well!

  1. 1 Download Vimeo videos using a shell script | Crucial Thought
  2. 2 Baixar vídeo(flv) do YouTube/Vimeo no Ubuntu « Doro
  3. 3 Download Vimeo and TEDtalks | U8UNTU ELIXIR

Leave a Reply