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