Table of Contents

ffmpeg - Conversions - Convert H265 to AV1

Using AMD GPU

ffmpeg -i "input.mkv" -vaapi_device /dev/dri/renderD128 -vf 'format=nv12,hwupload' -profile:v main -c:v av1_vaapi -c:a copy -c:s copy -rc_mode CQP -global_quality 85 -v verbose out.mkv

Using CPU

ffmpeg -y -i a.mp4 -c:v libaom-av1 -strict -2 -b:v 3000K -maxrate 6000K -cpu-used 8 -pass 2 -f matroska out.mkv
 
ffmpeg -i input.mp4 -c:v av1 output.av1
ffmpeg -y -i input.mp4 -c:v libaom-av1 -strict -2 -b:v 3000K -maxrate 6000K -cpu-used 8 -pass 1 -f matroska NUL & \
 
ffmpeg -i input.mp4 -c:v libaom-av1 -strict -2 -b:v 3000K -maxrate 6000K -cpu-used 0 -pass 2 output_AV1.mkv

NOTE: This is extremely slow!

  • This uses the libaom-av1 encoder.

NOTE: AV1 is implemented in libaom and svt-av1.

  • Libaom is the reference codec, it produces smaller files than svt-av1 but it is slow.
  • The svt-av1 encoder is optimized for speed and produces bigger files than libaom.