.\" Automatically generated by Pandoc 3.1.9 .\" .TH "AVIFENC" "1" "2022-04-30" "libavif 1.1.1" "General Commands Manual" .SH NAME avifenc - compress an image file to an AVIF file .SH SYNOPSIS \f[B]avifenc\f[R] [\f[I]options\f[R]] \f[I]input.\f[R][\f[I]jpg\f[R]|\f[I]jpeg\f[R]|\f[I]png\f[R]|\f[I]y4m\f[R]] \f[I]output.avif\f[R] .SH DESCRIPTION \f[B]avifenc\f[R] compresses an image file to an AVIF file. Input format can be either JPEG, PNG or YUV4MPEG2 (Y4M). .SH OPTIONS .TP \f[B]-h\f[R], \f[B]--help\f[R] Show syntax help. .TP \f[B]-V\f[R], \f[B]--version\f[R] Show the version number. .TP \f[B]-j\f[R], \f[B]--jobs\f[R] \f[I]J\f[R] Number of jobs (worker threads). 1 or less means single-threaded. Default is 1. Use \f[B]all\f[R] to use all available cores. .TP \f[B]-o\f[R], \f[B]--output\f[R] \f[I]FILENAME\f[R] Instead of using the last filename given as output, use this filename. .TP \f[B]-l\f[R], \f[B]--lossless\f[R] Set all defaults to encode losslessly, and emit warnings when settings/input don\[cq]t allow for it. .TP \f[B]-d\f[R], \f[B]--depth\f[R] \f[I]D\f[R] Output depth. This is available if the input format is JPEG/PNG, and for y4m or stdin, depth is retained. .RS .TP Possible values are: .IP \[bu] 2 \f[B]8\f[R] .IP \[bu] 2 \f[B]10\f[R] .IP \[bu] 2 \f[B]12\f[R] .RE .TP \f[B]-y\f[R], \f[B]--yuv\f[R] \f[I]FORMAT\f[R] Output format. Ignored for y4m or stdin (y4m format is retained). For JPEG, auto honors the JPEG\[cq]s internal format, if possible. For all other cases, auto defaults to 444. .RS .TP Possible values are: .IP \[bu] 2 \f[B]auto\f[R] (default) .IP \[bu] 2 \f[B]444\f[R] .IP \[bu] 2 \f[B]422\f[R] .IP \[bu] 2 \f[B]420\f[R] .IP \[bu] 2 \f[B]400\f[R] .RE .TP \f[B]-p\f[R], \f[B]--premultiply\f[R] Premultiply color by the alpha channel and signal this in the AVIF. .TP \f[B]--sharpyuv\f[R] Use sharp RGB to YUV420 conversion (if supported). Ignored for y4m or if output is not 420. .TP \f[B]--stdin\f[R] Read y4m frames from stdin instead of files. No input filenames allowed, must be set before specifying the output filename. .TP \f[B]--cicp\f[R], \f[B]--nclx\f[R] \f[I]P\f[R]\f[B]/\f[R]\f[I]T\f[R]\f[B]/\f[R]\f[I]M\f[R] Specify CICP values (nclx colr box) by 3 raw numbers. Use \f[B]2\f[R] for any you wish to leave unspecified. .RS .IP \[bu] 2 \f[I]P\f[R] = color primaries .IP \[bu] 2 \f[I]T\f[R] = transfer characteristics .IP \[bu] 2 \f[I]M\f[R] = matrix coefficients .RE .TP \f[B]-r\f[R], \f[B]--range\f[R] \f[I]RANGE\f[R] YUV range. This is available if the input format is JPEG/PNG, and for y4m or stdin, range is retained. .RS .TP Possible values are: .IP \[bu] 2 \f[B]full\f[R], \f[B]f\f[R] (default) .IP \[bu] 2 \f[B]limited\f[R], \f[B]l\f[R] .RE .TP \f[B]--min\f[R] \f[I]Q\f[R] Set min quantizer for color. Possible values are in the range \f[B]0\f[R]-\f[B]63\f[R], where 0 is lossless. .TP \f[B]--max\f[R] \f[I]Q\f[R] Set max quantizer for color. Possible values are in the range \f[B]0\f[R]-\f[B]63\f[R], where 0 is lossless. .TP \f[B]--minalpha\f[R] \f[I]Q\f[R] Set min quantizer for alpha. Possible values are in the range \f[B]0\f[R]-\f[B]63\f[R], where 0 is lossless. .TP \f[B]--maxalpha\f[R] \f[I]Q\f[R] Set max quantizer for alpha. Possible values are in the range \f[B]0\f[R]-\f[B]63\f[R], where 0 is lossless. .TP \f[B]--tilerowslog2\f[R] \f[I]R\f[R] Set log2 of number of tile rows. Possible values are in the range \f[B]0\f[R]-\f[B]6\f[R]. Default is 0. .TP \f[B]--tilecolslog2\f[R] \f[I]C\f[R] Set log2 of number of tile columns. Possible values are in the range \f[B]0\f[R]-\f[B]6\f[R]. Default is 0. .TP \f[B]--autotiling\f[R] Set \f[B]--tilerowslog2\f[R] and \f[B]--tilecolslog2\f[R] automatically. .TP \f[B]-g\f[R], \f[B]--grid\f[R] \f[I]M\f[R]\f[B]x\f[R]\f[I]N\f[R] Encode a single-image grid AVIF with \f[I]M\f[R] cols and \f[I]N\f[R] rows. Either supply MxN images of the same width, height and depth, or a single image that can be evenly split into the MxN grid and follow AVIF grid image restrictions. The grid will adopt the color profile of the first image supplied. Possible values for \f[I]M\f[R] and \f[I]N\f[R] are in the range \f[B]1\f[R]-\f[B]256\f[R]. .TP \f[B]-s\f[R], \f[B]--speed\f[R] \f[I]S\f[R] Encoder speed. Default is 6. .RS .TP Possible values are: .IP \[bu] 2 \f[B]0\f[R]-\f[B]10\f[R] (slowest-fastest) .IP \[bu] 2 \f[B]default\f[R], \f[B]d\f[R] (codec internal defaults) .RE .TP \f[B]-c\f[R], \f[B]--codec\f[R] \f[I]C\f[R] AV1 codec to use. Possible values depend on the codecs enabled at build time (see \f[B]--help\f[R] or \f[B]--version\f[R] for the available codecs). Default is auto-selected from the available codecs. .RS .TP Possible values are: .IP \[bu] 2 \f[B]aom\f[R] .IP \[bu] 2 \f[B]rav1e\f[R] .IP \[bu] 2 \f[B]svt\f[R] .RE .TP \f[B]--exif\f[R] \f[I]FILENAME\f[R] Provide an Exif metadata payload to be associated with the primary item (implies \[en]ignore-exif). .TP \f[B]--xmp\f[R] \f[I]FILENAME\f[R] Provide an XMP metadata payload to be associated with the primary item (implies \[en]ignore-xmp). .TP \f[B]--icc\f[R] \f[I]FILENAME\f[R] Provide an ICC profile payload to be associated with the primary item (implies \[en]ignore-icc). .TP \f[B]-a\f[R], \f[B]--advanced\f[R] \f[I]KEY\f[R][\f[I]=VALUE\f[R]] Pass an advanced, codec-specific key/value string pair directly to the codec. \f[B]avifenc\f[R] will warn on any unused by the codec. The aom-specific advanced options can be used if the AOM codec is available (see \f[B]--help\f[R] for details). .TP \f[B]--duration\f[R] \f[I]D\f[R] Set all following frame durations (in timescales) to \f[I]D\f[R]. Can be set multiple times (before supplying each filename). Default is 1. .TP \f[B]--timescale\f[R], \f[B]--fps\f[R] \f[I]V\f[R] Set the timescale to \f[I]V\f[R]. If all frames are 1 timescale in length, this is equivalent to frames per second. If neither duration nor timescale are set, \f[B]avifenc\f[R] will attempt to use the framerate stored in a y4m header, if present. Default is 30. .TP \f[B]-k\f[R], \f[B]--keyframe\f[R] \f[I]INTERVAL\f[R] Set the forced keyframe interval (maximum frames between keyframes). Set to \f[B]0\f[R] to disable. Default is 0. .TP \f[B]--ignore-exif\f[R] If the input file contains embedded Exif metadata, ignore it (no-op if absent). .TP \f[B]--ignore-xmp\f[R] If the input file contains embedded XMP metadata, ignore it (no-op if absent). .TP \f[B]--ignore-icc\f[R] If the input file contains an embedded ICC profile, ignore it (no-op if absent). .TP \f[B]--pasp\f[R] \f[I]H\f[R]\f[B],\f[R]\f[I]V\f[R] Add pasp property (aspect ratio). .RS .IP \[bu] 2 \f[I]H\f[R] = horizontal spacing .IP \[bu] 2 \f[I]V\f[R] = vertical spacing .RE .TP \f[B]--crop\f[R] \f[I]CROPX\f[R]\f[B],\f[R]\f[I]CROPY\f[R]\f[B],\f[R]\f[I]CROPW\f[R]\f[B],\f[R]\f[I]CROPH\f[R] Add clap property (clean aperture), but calculated from a crop rectangle. .RS .IP \[bu] 2 \f[I]CROPX\f[R] = X-axis of a crop rectangle .IP \[bu] 2 \f[I]CROPY\f[R] = Y-axis of a crop rectangle .IP \[bu] 2 \f[I]CROPW\f[R] = width of a crop rectangle .IP \[bu] 2 \f[I]CROPH\f[R] = height of a crop rectangle .RE .TP \f[B]--clap\f[R] \f[I]WN\f[R]\f[B],\f[R]\f[I]WD\f[R]\f[B],\f[R]\f[I]HN\f[R]\f[B],\f[R]\f[I]HD\f[R]\f[B],\f[R]\f[I]HON\f[R]\f[B],\f[R]\f[I]HOD\f[R]\f[B],\f[R]\f[I]VON\f[R]\f[B],\f[R]\f[I]VOD\f[R] Add clap property (clean aperture). .RS .IP \[bu] 2 \f[I]WN\f[R] = numerator of width .IP \[bu] 2 \f[I]WD\f[R] = denominator of width .IP \[bu] 2 \f[I]HN\f[R] = numerator of height .IP \[bu] 2 \f[I]HD\f[R] = denominator of height .IP \[bu] 2 \f[I]HON\f[R] = numerator of horizontal offset .IP \[bu] 2 \f[I]HOD\f[R] = denominator of horizontal offset .IP \[bu] 2 \f[I]VON\f[R] = numerator of vertical offset .IP \[bu] 2 \f[I]VOD\f[R] = denominator of vertical offset .RE .TP \f[B]--irot\f[R] \f[I]ANGLE\f[R] Add irot property (rotation). Possible values are in the range \f[B]0\f[R]-\f[B]3\f[R], and makes (90 * \f[I]ANGLE\f[R]) degree rotation anti-clockwise. .TP \f[B]--imir\f[R] \f[I]MODE\f[R] Add imir property (mirroring). .RS .PP Note: Rotation is applied before mirroring at rendering. .TP Possible values are: .IP \[bu] 2 \f[B]0\f[R] (top-to-bottom) .IP \[bu] 2 \f[B]1\f[R] (left-to-right) .RE .TP \f[B]--\f[R] Signals the end of options. Everything after this is interpreted as file names. .SH EXAMPLES .TP Compress a PNG file to an AVIF file: $ \f[B]avifenc input.png output.avif\f[R] .SH REPORTING BUGS .TP Bugs can be reported on GitHub at: \c .UR https://github.com/AOMediaCodec/libavif/issues .UE \c .SH SEE ALSO \f[B]avifdec\f[R](1)