User Tools

Site Tools


ffmpeg:conversions:convert_h264_to_av1:libaom:two-pass

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
ffmpeg:conversions:convert_h264_to_av1:libaom:two-pass [2023/06/15 07:57] – created peterffmpeg:conversions:convert_h264_to_av1:libaom:two-pass [2023/06/15 17:43] (current) peter
Line 1: Line 1:
 ====== ffmpeg - Conversions - Convert H264 to AV1 - libaom - Two-Pass ====== ====== 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**. 
 +
 +<code bash>
 +time ffmpeg -i a.mp4 -c:v libaom-av1 -b:v 2M -pass 1 -an -f null /dev/null && time ffmpeg -i a.mp4 -c:v libaom-av1 -b:v 2M -pass 2 -c:a libopus -f mp4 out.mp4
 +
 +time ffmpeg -i a.mp4 -c:v libaom-av1 -b:v 2000k -pass 1 -an -f null /dev/null && time ffmpeg -i a.mp4 -c:v libaom-av1 -b:v 2000k -pass 2 -ac 2 -c:a libopus  -f mp4 out.mp4x
 +</code>
 +
 +returns:
 +
 +<code bash>
 +...
 +real 98m40.037s
 +user 567m32.622s
 +sys 0m26.253s
 +</code>
 +
 +<WRAP info>
 +**NOTE:** 
 +
 +  * Input test size:  75.5M
 +  * Output test size:  4.2M
 +
 +</WRAP>
 +
 +<WRAP info>
 +**NOTE:**  The bitrate limit by the **-b:v** where the bitrate MUST be non-zero.
 +
 +  * **Opus** is a totally open, royalty-free, highly versatile audio codec. 
 +</WRAP>
  
ffmpeg/conversions/convert_h264_to_av1/libaom/two-pass.1686815841.txt.gz · Last modified: 2023/06/15 07:57 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki