Overview
At the company I work for, we use Vimeo to store videos and distrubite for reviews. It works great, however Vimeo isn't so great at post-upload organisation or doing bulk operations. I inherited a library which had zero organisation, it was essentially one big bucket containing thousands of videos.
We eventually decided to tackle this and have a spring clean. First, organising videos into appropriate folders and purging what what was no longer needed due to getting close to storage limits.
Now we could finally see the woods through the trees and everything was organised by folders.
However, I then realised some of the files stored on Vimeo may have been our only, or at the very least, accessible versions of some videos. Downloading the source files one by one would have been painful - there had to be another way.
I discovered Vimeo offer an API and they allow programmatic access to source files!
Key Features
- Bulk download videos from your Vimeo account (Pro account or higher required)
- Download all videos or download by folder
- Allows max 3 concurrent downloads
- Logs all videos into a csv file - title, date uploaded, quality, etc.
- 'Retry mode' which can retry downloading files marked as failed
- TUI or GUI versions
Script Version
The first version consisted of a Python script which downloaded every single video stored on our account. Whilst this sounds great, in practice it was OTT for us. It also failed after ~1,000 videos due to rate limits, even though I was only downloading 2 videos at once.
A few iterations later, I now had an interactive script to run in the terminal, which allowed me to paste in the API key every time. The script was then able to scan the Vimeo account for any folders and display these as results. The user is asked what folder to download, to where, and what quality. The script begins downloading all the videos in the selected fodler, downloading 3 at a time. Vimeo limit the speed of the downloads to ~3MB/s and I found 3 concurrent downloads didn't seem to trigger any rate limits - however if you're downloading a folder of 500+ videos then this may error out.
As well as downloading videos, the script also creates a csv file and logs all the downloaded videos' titles, date uploaded, folder, video quality and a few other data points, including whether it was succesfully downloaded.
Occasionally, whilst the script tries to obtain the source files, it fails to do so even though a source files exist. I'm not too sure why, assuming it's a glitch on Vimeo's backend. By default, the script will switch to download the next highest quality video available.
Because everything is logged, the next time you run the script and select the same output directory, it will detect the csv file and go into 'retry mode'. It will detect the failed videos and attempt to retry downloading at source resolution.
The script worked great and I managed to download everything I needed.
The GUI
I figured now I had a working script, I'd explore adding a GUI on top to explore various Python GUI frameworks and to create a version that some people would find less daunting to run. I used PyInstaller which I used in another project which could package the app into a .app file (and down the line, an .exe) and allow to run just like a normal app.
After some tinkering, I managed to get the app up and running and it should be available to download from the GitHub repo now.
It's great to be able to package the script like this, however it does make the app pretty heavy after having to package Python runtimes into it which is a downside to this workflow.
As of writing, I haven't explore packaging for Windows yet but if there's demand I'll look into it.