| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| vp8 [2020/06/09 10:11] – beandog | vp8 [2023/04/20 04:17] (current) – [Notes] beandog |
|---|
| * [[https://trac.ffmpeg.org/wiki/Encode/VP8|ffmpeg wiki: Encode VP8]] | * [[https://trac.ffmpeg.org/wiki/Encode/VP8|ffmpeg wiki: Encode VP8]] |
| * [[http://ffmpeg.org/ffmpeg-all.html#libvpx|ffmpeg libvpx documentation]] | * [[http://ffmpeg.org/ffmpeg-all.html#libvpx|ffmpeg libvpx documentation]] |
| | |
| | ==== Notes ==== |
| | |
| | Both VP8 and [[VP9]] are a bit confusing on how to get good encodes related to specific levels of quality, when using the documentation and ''vpxenc'' help output as references. |
| | |
| | In it's simplest approach, if using ''vpxenc'', use ''max-q'' as the target CRF -- the encoder won't drop quality below that level (starts at 0, ends at 63). |
| | |
| | For ''ffmpeg'', use ''-crf'' with your number and ''-b:v 0'' is required. |
| | |
| | For HandBrake, use ''-q'' with your CRF. I can't tell from docs or the code if it's passing anything about min-q and max-q to the encoder, but I don't think it is. <del>I think it's using libavcodec to do crf=X and then b:v of 0.</del> |
| |
| ==== Encoding Quality ==== | ==== Encoding Quality ==== |
| With the defaults, vpxenc will create low quality encodes, its bitrate is too low. It will have to be bumped up to get some good quality. | With the defaults, vpxenc will create low quality encodes, its bitrate is too low. It will have to be bumped up to get some good quality. |
| |
| When using ffmpeg, pass ''-b 0'' (bitrate 0) so that it doesn't limit bitrate. Also use a CRF. For very high quality encodes, I'd say around 6 to 8. | SETTING crf and b:v 0 only works on VP9, DESPITE what the ffmpeg docs say. |
| | <del>When using ffmpeg, pass ''-b 0'' (bitrate 0) so that it doesn't limit bitrate. Also use a CRF. For very high quality encodes, I'd say around 6 to 8. |
| |
| <code> | <code> |
| ffmpeg -i video.y4m -vcodec libvpx -crf 6 -b:v 0 -y video.mkv | ffmpeg -i video.y4m -vcodec libvpx -crf 6 -b:v 0 -y video.mkv |
| | </code></del> |
| | |
| | HandBrake's default CRF for VP8 is 22. |
| | |
| | <code> |
| | HandBrakeCLI -i video.y4m -e VP8 -q 18 -o video.mkv |
| </code> | </code> |