HTML Video Background Rendering

HTML Video Background Rendering

There are nice tools to generate all formats you need for a background video. The best I found is ffmpeg. With the following commands you can create a webm and ogv format from a mp4.

ffmpeg -i background.mp4 -c:v libvpx -b:v 1M -c:a libvorbis background.webm

Video 1M scale so -b:v to 1M.

ffmpeg -i background.mp4 -qscale:v 10 -qscale:a 0 background.ogv

Video should look as good as possible so v for video to 10. Without audio so a for audio scale to 0.