Hi.
I'm trying to compress repeated sequence of frames using VP9 codec and
achieve the smallest output size of webm. Unfortunately I can't
effeciently compress sequence of more than 2 frames: output size become
too big. I'm using ffmpeg with libvpx to encode the webm and webm_info
to analyze the compressed frame sizes.
Here are the demo:
Input frames:
https://imgur.com/a/sqdcH (save them to 1.png, 2.png, 3.png)
Encoding commands:
$ ffmpeg -r 5 -loop 1 -i %d.png -c:v libvpx-vp9 -b:v 0 -crf 15 \
-t 10 -pass 1 -f null /dev/null
$ ffmpeg -r 5 -loop 1 -i %d.png -c:v libvpx-vp9 -b:v 0 -crf 15 \
-t 10 -pass 2 -y 3.webm
Analyzing the output:
$ webm_info -i 3.webm -all |\
sed -rn 's/.*(size_payload: *[0-9]+).*/\1/p'
http://pastebin.com/5Miphyj7
As you can see, only few compressed frames have minimal size. If I
remove 3.png and encode once more, webm_info will look like this:
http://pastebin.com/7DzazVw3
VP9 draft states:
https://tools.ietf.org/html/draft-grange-vp9-bitstream-00#section-2.2.2
> but for any particular frame the three available references are
> dynamically selectable from a pool of eight stored reference frames
So as far as I can understand it should work with sequence up to 8
frames length.
Am I missing some option or don't understand something? Thanks.