Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I find download links for vimeo videos?

Tags:

I saw that today vimeo changed the way they are streaming the videos and I can't stream their videos anymore. I saw that when I generate the link to the video, which was for example:

http://vimeo.com/moogaloop/play/clip:6649390/1eab2a25f30f1aadaf5e306d0f40fd6c/1292498602/?q=hd 

It's redirecting me to a page saying "Permission denied". I tried using curl, but without any success. I sniffed the traffic and I saw that it's streaming from something like:

http://av.vimeo.com/02047/623/34209065.mp4?token=1292496582_34de09a6d13212cf26af08357d311c30 

Does anybody know how to get the working URL to the video file?

The way I'm getting the videos at the moment is:

  1. Choose link http://vimeo.com/video_id.
  2. Get only the video_id.
  3. Get the XML for the video http://vimeo.com/moogaloop/load/clip:video_id;.
  4. parse the XML and find the necessary information:

    • request_signature
    • request_signature_expires
    • isHD
  5. Generate the link:

    $video_link = "http://vimeo.com/moogaloop/play/clip:".$video_id."/".$request_signature."/".$request_signature_expires."/?q=".$quality.""; 

If I do this manually through the browser it works, but if I do it through the script it doesn't.

like image 958
pocko Avatar asked Dec 16 '10 11:12

pocko


People also ask

Is there a way to download Vimeo videos?

The first thing you need to do is to download the Vimeo app onto your Android device. Next up, find the video that you wish to download via the app itself and not the desktop site. Once you have found the video you wish to download, all you need to do is to click on the 'offline sync' button.


2 Answers

After spending a few hours on finding out how I can get the direct link to vimeo I found a good solution. So here are the steps for the users who want to download and stream video src directly from vimeo. Keep in mind that they block all IP addresses and probably hosts which are downloading the videos in this way, so I just stopped using their services and I will never use them again :).

Steps to get the video sources:

  1. choose link http://vimeo.com/video_id
  2. get only the video_id
  3. get the xml for the video http://vimeo.com/moogaloop/load/clip:video_id;
  4. parse the xml and I find the necessary information I need:

    • request_signature
    • request_signature_expires
    • isHD
  5. Then I generate the link:

    $video_link = "http://vimeo.com/moogaloop/play/clip:".$video_id."/".$request_signature."/".$request_signature_expires."/?q=".$quality.""; 
  6. Then if you are php dev, you call wget command through exec in this way

    exec("wget -b '$video_link' -a 'wget.log' -O -");

  7. Then you read the log and find out the link you are looking for. You can simply parse the log file. The direct link is between "Location: " and "[following]"

  8. You return the direct link and clean the log file :)

NOTE: keep in mind again that this won't work forever. Sooner or later they will block your ip :).

like image 72
pocko Avatar answered Oct 05 '22 13:10

pocko


This javascript works for me.

var player = document.getElementsByClassName("player")[0].getAttribute("id"); player = eval(player.replace("player_", "clip")); var time = player.config.request.timestamp; var sig = player.config.request.signature; var clip_id = window.location.href.substring(17);  var url = "http://player.vimeo.com/play_redirect" +   "?clip_id=" + clip_id +   "&sig=" + sig +   "&time=" + time;  var v = document.getElementById("menu"); v.style.fontSize = "4em"; v.style.lineHeight = "1em";  v.innerHTML =   "<a href='" + url + "'>SD</a>, " +   "<a href='" + url + "&quality=hd'>HD</a>"; 

source

like image 36
Zombo Avatar answered Oct 05 '22 14:10

Zombo