View Single Post
Old 2nd November 2015, 05:20   #13  |  Link
xyzone
Registered User
 
xyzone's Avatar
 
Join Date: Oct 2013
Posts: 24
Quote:
Originally Posted by BadFrame View Post
If I am understanding you correctly you want the same functionality as '--crf' on x264/x265 ?
I guess it's roughly equivalent, but vp9 has it's own scheme.

The parameters you mention are the same ones I already used, as mentioned above. --end-usage=3 is the same as --end-usage=q, and that seems like constrained quality when bitrate is not specified as 0, according to this page. https://trac.ffmpeg.org/wiki/Encode/VP9 It also mentions how to achieve constant quality.

Here is a small comparison between the two encodings. Both from the same input file, and all else is the same. The only difference is the video track.

vpxenc file encoding settings:
Code:
ffmpeg -loglevel warning -y -i "output.avi" -sws_flags bitexact -s 512x112 -r 60.000 -an -sn -f rawvideo -pix_fmt yuv420p - | vpxenc -v --i420 -w 512 -h 112 --profile=0 --threads=4 --codec=vp9 --fps=60000/1000 --kf-min-dist=0 --kf-max-dist=30 --drop-frame=0 --aq-mode=1 --color-space=bt709 --end-usage=q --cq-level=33 --passes=1 --pass=1 - -o "output.webm"


ffmpeg file encoding settings:
Code:
ffmpeg -i input.avi -c:v libvpx-vp9 -crf 33 -b:v 0 -an -threads 4 -pix_fmt yuv420p -profile:v 0 output.webm

The former file does easily seek, but the thing to notice is the file size. Also, I would think the same result as the vpxenc file could be achieve on ffmpeg by omitting the bitrate of 0, or setting it to the vpxenc default of 256. And lastly, it could be my imagination, and I'd have to benchmark, but ffmpeg seems to encode a little faster.

To answer Jamaika's question, I'm using vp9 v1.4.0. This is on a Debian Linux, so both ffmpeg and vpxenc use the same library.

Last edited by xyzone; 2nd November 2015 at 08:07. Reason: corrected aspect ratio of vpxenc file, but doesn't change the point
xyzone is offline   Reply With Quote