Skip to content

Commit 653e0d5

Browse files
committed
av1an: Fixed advanced encoder args not being used with SVT or x265
1 parent fb98918 commit 653e0d5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ff-utils-winforms/Data/Codecs/Video/SvtAv1.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public CodecArgs GetArgs(Dictionary<string, string> encArgs = null, MediaFile me
3939
string thr = encArgs.ContainsKey("threads") ? encArgs["threads"] : "0";
4040
string tiles = ""; // TEMP DISABLED AS IT SEEMS TO SLOW THINGS DOWN // = CodecUtils.GetTilingArgs(mediaFile.VideoStreams.FirstOrDefault().Resolution, "--tile-rows ", "--tile-columns ");
4141
string cust = encArgs.ContainsKey("custom") ? encArgs["custom"] : "";
42+
string adv = encArgs.ContainsKey("advanced") ? encArgs["advanced"] : "";
4243
string colors = "";
4344

4445
if (mediaFile != null && mediaFile.ColorData != null)
@@ -47,7 +48,7 @@ public CodecArgs GetArgs(Dictionary<string, string> encArgs = null, MediaFile me
4748
colors = $"--color-primaries {mediaFile.ColorData.ColorPrimaries} --transfer-characteristics {mediaFile.ColorData.ColorTransfer} --matrix-coefficients {mediaFile.ColorData.ColorMatrixCoeffs} --color-range {range}";
4849
}
4950

50-
return new CodecArgs($" -e svt-av1 --force -v \" --preset {preset} --crf {q} --keyint {g} --lp {thr} --film-grain {grain} {colors} {tiles} {cust} \" --pix-format {pixFmt}");
51+
return new CodecArgs($" -e svt-av1 --force -v \" --preset {preset} --crf {q} --keyint {g} --lp {thr} --film-grain {grain} {colors} {tiles} {adv} {cust} \" --pix-format {pixFmt}");
5152
}
5253
}
5354
}

ff-utils-winforms/Data/Codecs/Video/X265.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public CodecArgs GetArgs(Dictionary<string, string> encArgs = null, MediaFile me
3434
string pixFmt = encArgs.ContainsKey("pixFmt") ? encArgs["pixFmt"] : ColorFormats[ColorFormatDefault];
3535
string thr = encArgs.ContainsKey("threads") ? encArgs["threads"] : "0";
3636
string cust = encArgs.ContainsKey("custom") ? encArgs["custom"] : "";
37+
string adv = encArgs.ContainsKey("advanced") ? encArgs["advanced"] : "";
3738
string colors = "";
3839

3940
if (mediaFile != null && mediaFile.ColorData != null)
@@ -42,7 +43,7 @@ public CodecArgs GetArgs(Dictionary<string, string> encArgs = null, MediaFile me
4243
colors = $"--colorprim {mediaFile.ColorData.ColorPrimaries} --transfer {mediaFile.ColorData.ColorTransfer} --colormatrix {mediaFile.ColorData.ColorMatrixCoeffs} --range {range}";
4344
}
4445

45-
return new CodecArgs($" -e x265 --force -v \" --crf {q} --preset {preset} --keyint {g} --frame-threads {thr} {colors} {cust} \" --pix-format {pixFmt}");
46+
return new CodecArgs($" -e x265 --force -v \" --crf {q} --preset {preset} --keyint {g} --frame-threads {thr} {colors} {adv} {cust} \" --pix-format {pixFmt}");
4647
}
4748
}
4849
}

0 commit comments

Comments
 (0)