Convert MP4 to OGV and to WEBM
Using ffmpeg to shrink and convert convert mp4 files
MP4 Original
OGV version
ffmpeg -i xxx.mp4 -c:v libtheora -q:v 7 -c:a libvorbis -q:a 4 xxx.ogv
You must adjust the value of -q:v (up better) and -q:a (down better) to get balance between quality and size you want. Those values range from 0 to 10.
This one worked and produces a reasonable video, but I do not show it here. There is a lot of controversy about OGG formats related to HTML5. So I am avoiding OGG on my site until that is properly resolved such I can them working in browsers.
WEBM version
ffmpeg -i xxx.mp4 -c:v libvpx-vp9 -crf 30 -b:v 0 -b:a 128k -c:a libopus xxx.webm
You need to adjust the size of the CRF value to get the balance between quality and size you want.
The command produced this webm version: