I did some more compression tests using ffmpeg.
I found that the default bitrate control in vp9 is terrible, resulting in awful macroblocking. Forcing lower qmax parameters reduced macroblocking, but wastes the bit rate advantage of vp9.
The solution: 2-pass encoding.
For example, I tried to create a new "mind-blown.webm" .
My goal was minimum bandwidth need without big visual difference, with original sound and resolution.
Original gif: 200x200 crop, 1.82 MB
-crf 4, 1.0MBit : decent, but quite soft
-crf 4, 1.5Mbit (2.1 MB): better, but still discernible difference
-crf 4, 2.0Mbit (2.7 MB): quite good
-crf 4, 5.0Mbit (6.4 MB): source macroblocking artifacts are kept
gif
2M
http://a.pomf.se/tbnive.webm
5M
http://a.pomf.se/wdszgq.webm
Edit: Hmm .. only audio in chrome, firefox/opera works fine though. Anyone else?
The syntax is
Code:
ffmpeg -i input.mp4 -ss 00:00.000 -to 00:00.000 -c:v libvpx-vp9 -pass 1 -crf 4 -b:v 2M -c:a libvorbis output.webm
followed by
Code:
ffmpeg -i input.mp4 -ss 00:00.000 -to 00:00.000 -c:v libvpx-vp9 -pass 2 -crf 4 -b:v 2M -c:a libvorbis output.webm
syntax explained:
-input.mp4: name of your source video
-ss: start point of your video, in hh:mm:millisecends.
-to: end point. Reomve ss and to options away for whole video)
-pass 1/2. Current pass in 2-pass encoding. Remove for 1 pass encoding
-crf quality setting. 4= best, 63=worst
-b:v maximum bitrate, e.g. 1500K, 5M
output.webm: name of target webm