VP9 and H.264, AVG PSNR very similar (need advice) -- copy from WebM discussion group

376 views
Skip to first unread message

Sergey Stepanov

unread,
Jun 5, 2013, 7:15:40 AM6/5/13
to codec...@webmproject.org
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

Jim Bankoski

unread,
Jun 5, 2013, 10:54:18 AM6/5/13
to codec...@webmproject.org
Thanks for testing our codec !   

I think these settings should work a bit better. 

-p 2 --min-q=0 --drop-frame=0 --bias-pct=50 --minsection-pct=0 --maxsection-pct=2000 --end-usage=vbr --target-bitrate=100 --codec=vp9 --good --profile=0 --auto-alt-ref=1 --lag-in-frames=25 --arnr-maxframes=7 --arnr-strength=5 --arnr-type=3 --kf-min-dist=0 --kf-max-dist=9999 -v --psnr --tune=psnr --test-decode=warn

The codec is still pretty new.  The encoder algorithms and behavior on videos like this will improve over time.   


--
You received this message because you are subscribed to the Google Groups "Codec Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codec-devel...@webmproject.org.
To post to this group, send email to codec...@webmproject.org.
Visit this group at http://groups.google.com/a/webmproject.org/group/codec-devel/?hl=en.
For more options, visit https://groups.google.com/a/webmproject.org/groups/opt_out.
 
 

Reply all
Reply to author
Forward
Message has been deleted
0 new messages