Skip to content

Instantly share code, notes, and snippets.

@mmathys
Last active December 13, 2023 19:19
Show Gist options
  • Star 31 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save mmathys/00684c6fce97d7817b40e4cba259be11 to your computer and use it in GitHub Desktop.
Save mmathys/00684c6fce97d7817b40e4cba259be11 to your computer and use it in GitHub Desktop.
Download Vimeo VOD (video on demand)

How to download vimeo VOD for offline usage

Variant 1

Use youtube-dl directly to download the video (thanks @meepybub!) Example:

youtube-dl -u <youremailaddress@example.com> "https://vimeo.com/ondemand/<video>"

Variant 2 (old)

If variant 1 doesn't work, try this.

Step 1

Login to Vimeo and get the cookies.txt file using this Chrome plugin

Step 2

Use youtube-dl to download the video Example:

youtube-dl "https://vimeo.com/ondemand/<video>" --cookies cookies.txt

Variant 3

I had a lot of success with this repo for private videos: https://github.com/Tusko/vimeo-private-downloader

@dm17
Copy link

dm17 commented Dec 15, 2020

@dm17 As far as I know the -a flag only accepts a list of URLs. So you could write a script with python for example which parses the CSV and saves the URLs in another file, which is then passed to youtube-dl.

Just exported Vimeo's list of URLs from their CSV into a plain-text file, one on each line... Hopefully that should work. And I find that Vimeo blocks you after a while, so hopefully either the --sleep-interval will prevent that or it'll detect where it left off.
Thanks.

@mmathys
Copy link
Author

mmathys commented Dec 15, 2020

Interesting, no worries

@EncryptedCurse
Copy link

The linked extension no longer exists on the Chrome Web Store. I can confirm that Get cookies.txt works.

@mmathys
Copy link
Author

mmathys commented Feb 24, 2021

@EncryptedCurse Updated the link 🙏

@poischiche-glitch
Copy link

poischiche-glitch commented Mar 1, 2021

Hi, I'm new to this but want to share a vimeo vod with my students (teaching online means it's difficult to stream video content live through a web call etc etc. So I need to dl the file so that they can play it themselves)

I get a warning and can only download the trailer. Can you help please?
Thanks so much in advance.

eg code I'm getting;
youtube-dl "url" --cookies vimeo.com_cookies.txt
[vimeo:ondemand] url: Downloading webpage
[vimeo:ondemand] url: Extracting information
[vimeo:ondemand] url: Downloading JSON metadata
[vimeo:ondemand] url: Downloading JSON metadata
WARNING: [vimeo:ondemand] url: Failed to parse JSON Expecting value: line 3 column 3 (char 6)
[vimeo:ondemand] url: Downloading akfire_interconnect_quic m3u8 information
[vimeo:ondemand] url: Downloading akfire_interconnect_quic m3u8 information
[vimeo:ondemand] url: Downloading fastly_skyfire m3u8 information
[vimeo:ondemand] url: Downloading fastly_skyfire m3u8 information
[vimeo:ondemand] url: Downloading akfire_interconnect_quic MPD information
[vimeo:ondemand] url: Downloading akfire_interconnect_quic MPD information
[vimeo:ondemand] url: Downloading fastly_skyfire MPD information
[vimeo:ondemand] url: Downloading fastly_skyfire MPD information
[download] url.mp4 has already been downloaded
[download] 100% of 41.58MiB

[edit - took out the url link]

@mmathys
Copy link
Author

mmathys commented Mar 2, 2021

@poischiche-glitch in the end it says that video has been successfully downloaded

@poischiche-glitch
Copy link

@poischiche-glitch in the end it says that video has been successfully downloaded

yes, but only the trailer of the movie - not the actual 1h film that I rented...

@mmathys
Copy link
Author

mmathys commented Mar 2, 2021

Hmm. Did you make sure that the cookies file is up to date?

@poischiche-glitch
Copy link

@mmathys I'm not sure how to do that.
I downloaded the cookies just before I tried to use youtube-dl...

@poischiche-glitch
Copy link

As far as I can tell, the url for the rented vod is the same as the trailer...
If that helps...

@eins78
Copy link

eins78 commented Mar 13, 2021

just a simple header (instead of a cookie jar file) is enough for Vimeo, and can simply be extracted from the javascript console without needing an extension (look for how to open the developer tools in your browser).

the following code logs the argument you need to add to youtube-dl,

console.log(' --add-header "Cookie:' + document.cookie + '" ')

example:

youtube-dl "https://vimeo.com/ondemand/<video>"  --add-header "Cookie:vimeo=xxx..."

@meepybub
Copy link

meepybub commented Apr 9, 2021

Using the above cookie method did not work for me, it just downloaded the trailer. But, i used the -u argument and that worked.

youtube-dl -u <youremailaddress@example.com> "https://vimeo.com/ondemand/<video>"

It prompts for your password and then voila.

@mmathys
Copy link
Author

mmathys commented Apr 9, 2021

thanks @meepybub, updated the gist

@dhanielcal
Copy link

Hi. I did both steps above but sadly they didn't work. It just keeps on downloading the trailer instead of the full movie. Can anyone help me please? Here is the link of the video that I want to download: https://vimeo.com/ondemand/expresswayinternational

@mmathys
Copy link
Author

mmathys commented Apr 15, 2021

@dhanielcal did you try variant 1 or 2?

@poischiche-glitch
Copy link

This was my way to resolve, hope it helps;

open up dev tools, in the network tab, filter for master.json, start the video to make sure you find the right url, right click it and copy url.
then use;

youtube-dl -o file.mp4 "URL"

before you hit enter, edit the URL so it ends in .mpd instead of .json

@synchromesh
Copy link

Thanks @poischiche-glitch, that worked for me!

@mcerioni
Copy link

@poischiche-glitch should the master.json be available for all videos? I can not seem to find it for this one https://vimeo.com/ondemand/metagame/

@5p4r74cu5
Copy link

5p4r74cu5 commented May 23, 2021

A paid option, is IDM (internet download manager). Already own it and it worked so thought I'd mention it for anyone who has it or might buy it anyway.

EDIT: Think the free trial should work as well for the duration of the trial.

@poischiche-glitch
Copy link

@poischiche-glitch should the master.json be available for all videos? I can not seem to find it for this one https://vimeo.com/ondemand/metagame/

I've no idea. Maybe I should add that I rented the video I wanted to dl first. Then on the page with the full video you open dev tools etc.

@kenji3112
Copy link

I tried the 2 methods but sadly, it didn't work. Do you have any idea on how to downlod a full movie instead of a trailer? Thanks in advance.

@rgarrigue
Copy link

rgarrigue commented Jun 21, 2021

I installed & used firefox's extension "Export cookies" when connected on the VOD page, then youtube-dl https://vimeo.com/ondemand/xxxxxxxxx --cookies cookies-vimeo-com.txt. The URL behing the VOD's one, which is the same as the trailer, but well when you're in the rental period it's the full video. It worked fine.

@teewz
Copy link

teewz commented Aug 30, 2021

@rgarrigue thank you, this worked for me!

@pascat25
Copy link

pascat25 commented Oct 2, 2021

Hello, I would like to have these 21 videos for vod, but I did not understand how the tutorial works, can you help me?

https://vimeo.com/ondemand/moneyschoolexces/

@user7230724
Copy link

user7230724 commented Feb 14, 2022

T͏h͏i͏s͏ ͏t͏u͏t͏o͏r͏i͏a͏l͏ ͏i͏s͏ ͏m͏i͏s͏l͏e͏a͏d͏i͏n͏g͏.͏ ͏I͏t͏ ͏c͏a͏n͏ ͏h͏e͏l͏p͏ ͏y͏o͏u͏ ͏o͏n͏l͏y͏ ͏i͏f͏ ͏y͏o͏u͏ ͏a͏l͏r͏e͏a͏d͏y͏ ͏p͏u͏r͏c͏h͏a͏s͏e͏d͏ ͏t͏h͏e͏ ͏v͏i͏d͏e͏o͏.͏ ͏I͏f͏ ͏y͏o͏u͏r͏ ͏a͏c͏c͏o͏u͏n͏t͏ ͏d͏o͏e͏s͏ ͏n͏o͏t͏ ͏h͏a͏v͏e͏ ͏a͏c͏c͏e͏s͏s͏ ͏t͏o͏ ͏t͏h͏e͏ ͏v͏i͏d͏e͏o͏,͏ ͏i͏t͏ ͏j͏u͏s͏t͏ ͏d͏o͏w͏n͏l͏o͏a͏d͏s͏ ͏t͏h͏e͏ ͏t͏r͏a͏i͏l͏e͏r͏.͏ ͏V͏i͏m͏e͏o͏ ͏i͏s͏ ͏a͏ ͏g͏r͏e͏a͏t͏ ͏b͏u͏l͏l͏s͏h͏i͏t͏ ͏a͏n͏d͏ ͏a͏l͏l͏ ͏c͏o͏p͏y͏r͏i͏g͏h͏t͏e͏d͏ ͏v͏i͏d͏e͏o͏s͏ ͏a͏r͏e͏ ͏j͏u͏s͏t͏ ͏a͏ ͏p͏i͏e͏c͏e͏ ͏o͏f͏ ͏c͏r͏a͏p͏,͏ ͏i͏n͏cl͏u͏d͏i͏n͏g͏ ͏a͏l͏l͏ ͏t͏h͏e͏i͏r͏ ͏a͏u͏t͏h͏o͏r͏s͏.

@milahu
Copy link

milahu commented Feb 27, 2022

alternative: video downloadhelper extension for chrome or firefox

@Gionidelaparis
Copy link

The variant 1 is still working. Thanks a lot (and yes of course, if you have purchased the video for 48h). Searching for a solution for downloading the subtitles

@milahu
Copy link

milahu commented Apr 16, 2022

@juniorjruk
Copy link

juniorjruk commented Mar 22, 2023

THIS ONLY WORKS IF YOU HAVE A VIMEO ACCOUNT. If you're signed into Vimeo via a Google, Facebook, or Apple account, the variants don't work.

@alexandervlpl
Copy link

Update: currently nothing works. 😢 Purchased (not rented) video, tried with user account and/or cookies.txt. It seems we're blocked by Google CDN which is hosting the video fragments.

$ youtube-dl --cookies cookies.txt -u <user> https://vimeo.com/ondemand/<video>
[dashsegments] Total fragments: 910
[download] Destination: <video>.fdash-google_mediacdn_sep-video-de62fcb4.mp4
[download] Got server HTTP error: HTTP Error 403: Forbidden. Retrying fragment 1 (attempt 1 of 10)...

Using latest youtube-dl from Github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment