ffmpeg:conversions:convert_h264_to_av1:libaom:two-pass
This is an old revision of the document!
ffmpeg - Conversions - Convert H264 to AV1 - libaom - Two-Pass
In order to create more efficient encodes when a particular target bitrate should be reached, two-pass encoding should be used.
Two-pass encoding is also beneficial for encoding efficiency when constant quality is used without a target bitrate.
- For two-pass, you need to run ffmpeg twice, with almost the same settings, except for:
- In pass 1 and 2, use the -pass 1 and -pass 2 options, respectively.
- In pass 1, output to a null file descriptor, not an actual file. (This will generate a logfile that ffmpeg needs for the second pass.)
- In pass 1, you can leave audio out by specifying -an.
time ffmpeg -i a.mp4 -c:v libaom-av1 -b:v 2M -pass 1 -an -f null /dev/null && ffmpeg -i a.mp4 -c:v libaom-av1 -b:v 2M -pass 2 -c:a libopus -f mp4 out.mp4
returns:
... real 235m34.669s user 1366m50.037s sys 0m45.396s
NOTE:
- Input test size: 75.5M
- Output test size: 21.1M
ffmpeg/conversions/convert_h264_to_av1/libaom/two-pass.1686816201.txt.gz · Last modified: 2023/06/15 08:03 by peter