Closed phpb-com closed 2 years ago
https://github.com/master-of-zen/Av1an/blob/77f77a1aea4bf0162d9ebac91561a0991124852d/av1an-core/src/encoder.rs#L161 https://github.com/master-of-zen/Av1an/blob/77f77a1aea4bf0162d9ebac91561a0991124852d/av1an-core/src/encoder.rs#L243
Is probably where it comes from and is not accepted by rav1e any longer.
rav1e --help
rav1e p20220913-4-g17a70d5 (Release)
AV1 video encoder
USAGE:
rav1e [OPTIONS] --output <OUTPUT> <INPUT> [SUBCOMMAND]
OPTIONS:
-h, --help
Print help information
-V, --version
Print version information
INPUT/OUTPUT:
-o, --output <OUTPUT>
Compressed AV1 in IVF video output
-y
Overwrite output file
<INPUT>
Uncompressed YUV4MPEG2 video input
THREADING:
--threads <THREADS>
Set the threadpool size
[default: 0]
--tile-cols <TILE_COLS>
Number of tile columns. Must be a power of 2. rav1e may override this based on video resolution
[default: 0]
--tile-rows <TILE_ROWS>
Number of tile rows. Must be a power of 2. rav1e may override this based on video resolution
[default: 0]
--tiles <TILES>
Number of tiles. Tile-cols and tile-rows are overridden so that the video has at least this many tiles
ENCODE SETTINGS:
-b, --bitrate <BITRATE>
Bitrate (kbps)
--film-grain-table <FILM_GRAIN_TABLE>
Uses a film grain table file to apply grain synthesis to the encode. Uses the same table file format as aomenc and svt-av1
--first-pass <STATS_FILE>
Perform the first pass of a two-pass encode, saving the pass data to the specified file for future passes
-i, --min-keyint <MIN_KEYINT>
Minimum interval between keyframes
[default: 12]
-I, --keyint <KEYINT>
Maximum interval between keyframes. When set to 0, disables fixed-interval keyframes
[default: 240]
-l, --limit <LIMIT>
Maximum number of frames to encode
[default: 0]
--low-latency
Low latency mode; disables frame reordering. Has a significant speed-to-quality trade-off
--min-quantizer <MIN_QUANTIZER>
Minimum quantizer (0-255) to use in bitrate mode [default: 0]
--no-scene-detection
Disables scene detection entirely. Has a significant speed-to-quality trade-off in full encodes. Useful for chunked encoding
--photon-noise <PHOTON_NOISE>
Uses grain synthesis to add photon noise to the resulting encode. Takes a strength value 0-64
[default: 0]
--quantizer <QUANTIZER>
Quantizer (0-255), smaller values are higher quality [default: 100]
--rdo-lookahead-frames <RDO_LOOKAHEAD_FRAMES>
Number of frames encoder should lookahead for RDO purposes\n\ [default value for speed levels: 10,9 - 10; 8,7,6 - 20; 5,4,3 - 30; 2,1,0 - 40]
--reservoir-frame-delay <RESERVOIR_FRAME_DELAY>
"Number of frames over which rate control should distribute the reservoir [default: min(240, 1.5x keyint)] A minimum value of 12 is enforced
-s, --speed <SPEED>
Speed level (0 is best quality, 10 is fastest)
Speeds 10 and 0 are extremes and are generally not recommended
[default: 6]
-S, --switch-frame-interval <SWITCH_FRAME_INTERVAL>
Maximum interval between switch frames. When set to 0, disables switch frames
[default: 0]
--scd-speed <SCD_SPEED>
Speed level for scene-change detection, 0: best quality, 1: fastest mode. [default: 0 for s0-s9, 1 for s10]
--second-pass <STATS_FILE>
Perform the second pass of a two-pass encode, reading the pass data saved from a previous pass from the specified file
--skip <SKIP>
Skip n number of frames and encode
[default: 0]
--still-picture
Still picture mode
--tune <TUNE>
Quality tuning
[default: Psychovisual]
VIDEO METADATA:
--content-light <CONTENT_LIGHT>
Content light level used to describe content luminosity (cll,fall)
--frame-rate <FRAME_RATE>
Constant frame rate to set at the output (inferred from input when omitted)
--mastering-display <MASTERING_DISPLAY>
Mastering display primaries in the form of G(x,y)B(x,y)R(x,y)WP(x,y)L(max,min)
--matrix <MATRIX>
Matrix coefficients used to describe color parameters
--primaries <PRIMARIES>
Color primaries used to describe color parameters
--range <RANGE>
Pixel range
--time-scale <TIME_SCALE>
The time scale associated with the frame rate if provided (ignored otherwise)
[default: 0]
--transfer <TRANSFER>
Transfer characteristics used to describe color parameters
DEBUGGING:
--benchmark
Provide a benchmark report at the end of the encoding
--metrics
Calculate and display several metrics including PSNR, SSIM, CIEDE2000 etc
--psnr
Calculate and display PSNR metrics
--quiet
Do not output any status message
-r, --reconstruction <RECONSTRUCTION>
Outputs a Y4M file containing the output from the decoder
--verbose
Verbose logging; outputs info for every frame
SUBCOMMANDS:
advanced
Advanced features
help
Print this message or the help of the given subcommand(s)
I've opened https://github.com/xiph/rav1e/pull/3022 to add back the -q
flag
why not do it in av1an and just use long form? I am sure I am missing something, but still ...
diff --git a/av1an-core/src/encoder.rs b/av1an-core/src/encoder.rs
--- a/av1an-core/src/encoder.rs
+++ b/av1an-core/src/encoder.rs
@@ -158,7 +158,7 @@ impl Encoder {
)
.collect(),
Self::rav1e => chain!(
- into_array!["rav1e", "-", "-y", "-q"],
+ into_array!["rav1e", "-", "-y", "--quiet"],
params,
into_array!["--first-pass", format!("{}.stat", fpf), "--output", NULL]
)
@@ -240,7 +240,7 @@ impl Encoder {
)
.collect(),
Self::rav1e => chain!(
- into_array!["rav1e", "-", "-y", "-q"],
+ into_array!["rav1e", "-", "-y", "--quiet"],
params,
into_array!["--second-pass", format!("{}.stat", fpf), "--output", output]
)
why not do it in av1an and just use long form?
My reasoning was that you have to update one of the binaries either way, and fixing it in rav1e would also fix any other scripts/programs that were broken by the removal of the flag. I'll make a PR for av1an as well though.
Very good point, thanks for explanation. Yeah, it must have broken a few scripts out there.
I was trying to use rav1e encoder for some HDR content and it is failing with:
The command that spins-up av1an is:
I suspect it is
--target-quality
trying to adjust quality for the scenes.