Untitled conversation
- User
[ { "Name": "libaom (Two-pass)", "Description": "2-pass, In order to create more efficient encodes when a particular target bitrate should be reached.", "First_pass": "-pass 1 -an -sn -c:v libaom-av1 -b:v 2M -usage good -cpu-used 4 -row-mt 1 -tiles 2x2 -g 250 -keyint_min 250 -pix_fmt yuv420p -f null", "Second_pass": "-pass 2 -c:v libaom-av1 -b:v 2M -usage good -cpu-used 4 -row-mt 1 -tiles 2x2 -g 250 -keyint_min 250 -pix_fmt yuv420p -map 0:v? -map_chapters 0 -map 0:s? -c:a: libopus -compression_level 5 -map 0:a:? -map_metadata 0", "Supported_list": "", "Output_extension": "mkv" } ]Using the provided code block as reference, create a videomass preset that converts a video file to av1 with close to lossless quality while also reducing file size. make sure it is two-pass.
- Assistant
To create a Videomass preset for converting a video file to AV1 with close to lossless quality while also reducing file size, you can modify the provided code block. Since 'lossless' means preserving as much detail as possible, we will use a very high bitrate which achieves near-lossless quality without specifying actual lossless mode, which often results in larger file sizes than high bitrate lossy encoding.
Here's a modified preset for Videomass using the two-pass approach:
[ { "Name": "AV1 Near-Lossless (Two-pass)", "Description": "Two-pass AV1 encoding for high quality and file size reduction.", "First_pass": "-pass 1 -an -sn -c:v libaom-av1 -b:v 0 -crf 10 -cpu-used 4 -row-mt 1 -tiles 2x2 -g 240 -keyint_min 240 -pix_fmt yuv420p10le -f null", "Second_pass": "-pass 2 -c:v libaom-av1 -b:v 0 -crf 10 -cpu-used 4 -row-mt 1 -tiles 2x2 -g 240 -keyint_min 240 -pix_fmt yuv420p10le -map 0:v? -map 0:a? -map_chapters 0 -map 0:s? -c:a libopus -b:a 160k -compression_level 10 -map_metadata 0", "Supported_list": "", "Output_extension": "mkv" } ]Explanation of the modifications:
-
-crf 10: CRF (Constant Rate Factor) is a quality-controlled variable bitrate; lower values mean better quality. CRF 10 is close to lossless but not completely lossless. Lossless mode would be-crf 0, but that could result in a larger file size. -
-b:v 0: This tells the encoder to ignore bitrate settings and focus on the quality specified by CRF. -
-pix_fmt yuv420p10le: This uses a 10-bit pixel format for better color accuracy and gradation, which is important for high quality.yuv420p10lestands for YUV 4:2:0 planar format with 10 bits per channel and little-endian. -
-c:a libopus -b:a 160k: This uses the Opus audio codec with a bitrate of 160 kbps, which is a good balance between quality and file size for audio. -
-compression_level 10: Tells the Opus encoder to spend more time compressing, which can help reduce the file size without affecting audio quality too much. -
-g 240 -keyint_min 240: These settings are for keyframe interval, which is generally set to be around 10 seconds for good seeking ability and efficiency. The actual value you choose may depend on the framerate of your source video.
Ensure that you have the
libaom-av1andlibopuscodecs installed on your system to use this preset. If you're using Videomass, you would import this preset into the application and use it to convert your files. Keep in mind that AV1 encoding is computationally intensive, and two-pass encoding will take roughly twice as long as single-pass encoding. -
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.