Fix x265 2-pass params (#636)

* Fix x265 2-pass params

* Add --level-idc in x265 default params
This commit is contained in:
Y0ba 2022-06-05 21:42:36 +00:00 committed by GitHub
parent edc6acd657
commit 22281844bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -208,16 +208,23 @@ impl Encoder {
Self::x265 => chain!(
into_array![
"x265",
"--stitchable",
"--repeat-headers",
"--log-level",
"error",
"--pass",
"1",
"--demuxer",
"y4m",
"--y4m",
],
params,
into_array!["--stats", format!("{}.log", fpf), "-", "-o", NULL]
into_array![
"--stats",
format!("{}.log", fpf),
"--analysis-reuse-file",
format!("{}_analysis.dat", fpf),
"-",
"-o",
NULL
]
)
.collect(),
}
@ -283,16 +290,23 @@ impl Encoder {
Self::x265 => chain!(
into_array![
"x265",
"--stitchable",
"--repeat-headers",
"--log-level",
"error",
"--pass",
"2",
"--demuxer",
"y4m",
"--y4m",
],
params,
into_array!["--stats", format!("{}.log", fpf), "-", "-o", output]
into_array![
"--stats",
format!("{}.log", fpf),
"--analysis-reuse-file",
format!("{}_analysis.dat", fpf),
"-",
"-o",
output
]
)
.collect(),
}
@ -395,7 +409,16 @@ impl Encoder {
}
}
Encoder::x264 => into_vec!["--preset", "slow", "--crf", "25"],
Encoder::x265 => into_vec!["-p", "slow", "--crf", "25", "-D", "10"],
Encoder::x265 => into_vec![
"-p",
"slow",
"--crf",
"25",
"-D",
"10",
"--level-idc",
"5.0"
],
}
}