Moving my videos from Vimeo to a cloud server
I have been using Vimeo for a couple of years to host the videos I’ve created, including those on this website. However, my account renewal is coming up shortly and I’ve decided I am no longer going to use Vimeo, for the following reasons:
Bending Spoons sucks
Vimeo has recently been acquired by Bending Spoons. Bending Spoons sucks as a company — they buy businesses with a good long term relationship with their customers and then exploit the lock-in that a long-term relationship fosters. They raise prices (they purchased meetup.com and tripled the subscription I was paying!), sack long-term staff, and use dark patterns to squeeze money from formerly loyal users. It totally sucks. I want out.
I want a long-term solution I have complete control over
I had another personal account that I haven’t touched for some years. I received an email that Vimeo is now going to delete those videos. I don’t want to have to pay just to continue hosting videos that are rarely looked at, and I don’t want my websites, which I build for the long term, to suddenly lose content, or for me to have to spend time replacing old content.
My video usage is actually fairly modest and standard web hosting would do
A Hetzner server would cost less than Vimeo subscription and I could use it for other things as well as video hosting. Hetzner have a good reputation for low cost and reliability. I think I’ll go for the following configuration:
- CX32 (shared vCPU)
- 4 / 8 GB
- ~€7.56
- ~20 TB
Of course with this type of setup you don’t get fancy streaming video, but my videos are fairly short and I am not planning on having huge numbers of users (I’ll use YouTube for that).
faststart
One interesting thing I have discovered whilst investigating using a standard web host for video is that you should enable “faststart”. MP4 files store metadata (called the “moov atom”) that describes where every frame and chunk of audio/video is located. By default, FFmpeg writes this metadata at the end of the file. That’s fine for local playback, but on the web it causes a problem: the browser has to download the entire file before it can find the moov atom and start playback. For delivery from a standard web-server you should encode the video something like this:
ffmpeg -i in.mp4 -c:v libx264 -crf 20 -preset medium -c:a aac -b:a 128k -movflags +faststart out.mp4
| Option | Purpose | Typical values |
|---|---|---|
| -i in.mp4 | Input file | — |
| -c:v libx264 | H.264 video encoder | — |
| -crf 20 | Video quality (lower = better) | 18–23 |
| -preset medium | Encode speed vs size tradeoff | slow–ultrafast |
| -c:a aac | Audio codec | — |
| -b:a 128k | Audio bitrate | 96–192k |
| -movflags +faststart | Web playback optimization | +faststart |
The same thing but for 720p.
ffmpeg -i in.mp4 -vf "scale=-2:720" -c:v libx264 -crf 23 -preset veryfast -c:a aac -b:a 96k -movflags +faststart out_720p.mp4
I tested both of these and they seem to work well, compressing the standard FCP 1080p export by about 60%.
In my HTML I will list both versions, so those on slower connections/mobile get the 720p version (which is still perfectly good quality).
<video controls preload="metadata" poster="thumb.jpg">
<source src="video-1080p.mp4" type="video/mp4">
<source src="video-720p.mp4" type="video/mp4">
</video>