Last Updated: February 25, 2016
· darkliquid

Encoding silent videos for video backgrounds

Looking at sites such as with their snazzy video backdrops at the top of the page, I wanted to be able to take video that already existed and strip the audio, as well as make a webm version as well. FFmpeg to the rescue!

Strip the audio

ffmpeg -i input.mp4 -vcodec copy -an output.mp4

Encode as webm in a reasonable quality (while dropping audio as well)

ffmpeg -i input.mp4 -qmin 0 -qmax 50 -crf 5 -b:v 1M -an output.webm

Since FFmpeg seems to change it's flags every version, the version I ran these on was: ffmpeg version 0.8.6-6:0.8.6-0ubuntu0.12.10.1