0

I'm running ffmpeg to convert a 4k hevc video to vp9 but no matter what setting I use, it always comes out horrible quality and the same filesize.

Command:

ffmpeg -y -i /tmp/longsample.mkv -threads 6 -c:a libopus -c:v libvpx-vp9 -crf 30 /tmp/vp9-30.mkv
ffmpeg -y -i /tmp/longsample.mkv -threads 6 -c:a libopus -c:v libvpx-vp9 -crf 15 /tmp/vp9-15.mkv
ffmpeg -y -i /tmp/longsample.mkv -threads 6 -c:a libopus -c:v libvpx-vp9 -crf 0 /tmp/vp9-0.mkv

I'm using the ffmpeg:latest on docker.

cclloyd
  • 8,171
  • 16
  • 57
  • 104

1 Answers1

1

What the VPx codecs in ffmpeg do is use the video bitrate value as a ceiling. If not set by the user, ffmpeg assumes a default of 200 kbps. You need to reset the value to get unconstrained CRF encoding.

ffmpeg -y -i in.mkv -threads 6 -c:a libopus -c:v libvpx-vp9 -crf 30 -b:v 0 out.mkv

See https://trac.ffmpeg.org/wiki/Encode/VP9#constantq

Gyan
  • 85,394
  • 9
  • 169
  • 201