Skip to content

Download script for embedded video hosted by Vimeo

Notifications You must be signed in to change notification settings

GerZah/vimeo-down

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Vimeo Downloader

This script is meant to download videos hosted on Vimeo that you have access to via a paid account, so you can playback those videos outside the respective website, e.g. on a TV using a settop box using Kodi.

Disclaimer: This script does not encourage sharing the downloaded files illegally! This is meant for personal use only, as described above. — This is purely meant to support fair use!

Requirements

vimeo-down.js relies on three tools:

  • Node.js – obviously, as it's written in JavaScript. … I am not sure which version is the minimal requirement – all I can tell you that it runs nicely with v16 or later.
  • wget for downloading files
  • ffmpeg for combining audio and video tracks

Pro-tipp: If you're on a Mac, you can get all three of them via Homebrew.


Prerequisites

Enter the website that has the desired video embedded in its user interface – like your e-learning platform, your dog training online course, whatever … as long as the videos are hosted on Vimeo.

Within that web page, open your browser's developement console and look at the Network tab. You might want to filter access to either segment.mp4? or &sid= – the latter represents a segment ID.

After having played the video for a couple of seconds, the adaptive streaming should have reached HD quality. You can then stop the video playback again, and you should see (probably more than just two) URLs shaped like this:

If you click on one of them once, you will see the full URL next to it:

These long URLs are what you are looking for. Copy & Paste is easy when using the (in)famous "triple mouse click" (yes, it's a thing!), or otherwise using your right mouse button on the segment.m4s? and selecting "Copy" / "Copy URL".

You will need both of these URLs.

Usage

Interactive Usage

Simply run

  • node vimeo-down.js
  • … or once
    chmod 755 vimeo-down.js and then
    ./vimeo-down.js

You will be asked to enter your 1st A/V URL: – which is either the video URL or the audio URL you just retrieved. After hitting Enter (which won't be neccessary if you copy/pasted via triple mouse click; believe me, it's a thing!), you will be asked to enter your 2nd A/V URL:. … It doesn't matter whether you paste the st=audio or the st=video URL first, as long as you specify both of them successively.

Finally, you will be asked for the Filename prefix - may be left blank (.mp4):. If you enter a name, like "My Video Download", the resulting video file will be called My Video Download.mp4. If you leave it blank, it will be combined-1234.mp4, with a random number 1234. (If you must know: It the UNIX process ID of the main download process.)

After hitting Enter, the script will get going and download lots of first one-11.m4s, then two-11.m4s files using wget – it iterates the necessary segments, starting with 0, and gets all of them on at a time.

It will then concatenate the one segments and the two segments, and finally merge them using ffmpeg. … If the rename should fail because you entered unusual characters that don't do well into a filename, the file will still remain available:

### renaming target file failed, file exists as combined-1234.mp4

Non-interactive usage

You may as well run ./vimeo-down.js (or node vimeo-down.js) using up to three command line parameters, like so:

./vimeo-down.js "1st A/V URL" "2nd A/V URL" "Filename prefix"

Make sure to put the URLs in to "…" quotation marks, as they typically contain at least & ampersands, which will really confuse your shell.

If you leave out the filename prefix, it will still ask you for it interactively – and you may just hit enter to omit it. If you want to omit it from the command line, add an empty one like this "":

./vimeo-down.js "1st A/V URL" "2nd A/V URL" ""

Enjoy!

About

Download script for embedded video hosted by Vimeo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published