Hi all,
I have been impressed very much with the VP9 capabilities demonstrated in Google IO recently, so first of all, I want to say thank you google once again for making this technology available to everyone.
In the meantime, I was trying to reproduce same level of result in my company (it is a Video On Demand service), with VP9 codec, but without much success, to be honest.
Basically, the idea was to measure AVG PSNR value on same bitrates for VP9 and H.264 and make sure that VP9 video has same level of quality in comparison to H.264 with lower bitrates (or higher PSNR with same bitrates).
So, I took a video sample ("Hobbit" trailer from iTunes), uncompressed it to yuv, then compressed it back with VP9 and x.264 with a few bitrates, and measured average PSNR for each result.
--- This is the command line I used for x264:
HD (720p sample):
for i in 384 512 768 1200 2000; do
x264 --input-res 1280x544 --fps 24000/1001 --pass 1 --preset veryslow --tune psnr --bitrate $i --aq 2 --psy-rd 0:0 --psnr -o $i.mkv testHD.yuv;
x264 --input-res 1280x544 --fps 24000/1001 --pass 2 --preset veryslow --tune psnr --bitrate $i --aq 2 --psy-rd 0:0 --psnr -o $i.mkv testHD.yuv;
rm x264_2pass.*;
done;
SD sample:
for i in 384 512 768 1200 2000; do
x264 --input-res 720x306 --fps 24000/1001 --pass 1 --preset veryslow --tune psnr --bitrate $i --aq 2 --psy-rd 0:0 --psnr -o $i.mkv test.yuv;
x264 --input-res 720x306 --fps 24000/1001 --pass 2 --preset veryslow --tune psnr --bitrate $i --aq 2 --psy-rd 0:0 --psnr -o $i.mkv test.yuv;
rm x264_2pass.*;
done;
--- And this is the way I made VP9 sample:
HD (720p):
for i in 384 512 768 1200 2000; do
vpxenc -w 1280 -h 544 --fps=24000/1001 --codec=vp9 --passes=2 --best --cpu-used=0 --target-bitrate=$i --auto-alt-ref=1 --bias-pct=80 --lag-in-frames=25 --static-thresh=0 --min-q=0 --max-q=63 --q-hist=40 --rate-hist=16 --sharpness=1 -v --tune=psnr --psnr -o $i.webm testHD.yuv;
done;
SD:
for i in 384 512 768 1200 2000; do
vpxenc -w 720 -h 306 --fps=24000/1001 --codec=vp9 --passes=2 --best --cpu-used=0 --target-bitrate=$i --auto-alt-ref=1 --bias-pct=80 --lag-in-frames=25 --static-thresh=0 --min-q=0 --max-q=63 --q-hist=40 --rate-hist=16 --sharpness=1 -v --tune=psnr --psnr -o $i.webm test.yuv;
done;
This is the summary of PSNRs for HD sample
bitrate VP9 H264
384 39,381 38,817
512 40,358 40,086
768 42,365 42,058
1200 44,26 43,334
2000 46,262 46,635

And this is the summary of PSNRs for SD sample
bitrate VP9 H264
384 41,032 40,56
512 42,225 41,74
768 43,814 43,521
1200 45,651 45,833
2000 47,993 49,547

As you can see, my results are pretty much identical.
So, the question is - what am I doing wrong? Which command line options should I use to get the better compression from VP9 with same quality (AVG PSNR in this case) in comparison to H.264 (X.264 in ffmpeg)?
Thank you and best regards,
Sergey Stepanov