Add video codec profiles (#5154)

This commit is contained in:
NodudeWasTaken
2024-08-27 10:03:48 +02:00
committed by GitHub
parent 3089e1ad69
commit ce47efc415
5 changed files with 80 additions and 49 deletions

View File

@@ -45,12 +45,31 @@ func CodecInit(codec VideoCodec) (args Args) {
"-rc", "vbr",
"-cq", "15",
)
case VideoCodecI264:
case VideoCodecN264H:
args = append(args,
"-profile", "p7",
"-tune", "hq",
"-profile", "high",
"-rc", "vbr",
"-rc-lookahead", "60",
"-surfaces", "64",
"-spatial-aq", "1",
"-aq-strength", "15",
"-cq", "15",
"-coder", "cabac",
"-b_ref_mode", "middle",
)
case VideoCodecI264, VideoCodecIVP9:
args = append(args,
"-global_quality", "20",
"-preset", "faster",
)
case VideoCodecV264:
case VideoCodecI264C:
args = append(args,
"-q", "20",
"-preset", "faster",
)
case VideoCodecV264, VideoCodecVVP9:
args = append(args,
"-qp", "20",
)
@@ -67,15 +86,6 @@ func CodecInit(codec VideoCodec) (args Args) {
"-preset", "superfast",
"-crf", "25",
)
case VideoCodecIVP9:
args = append(args,
"-global_quality", "20",
"-preset", "faster",
)
case VideoCodecVVP9:
args = append(args,
"-qp", "20",
)
}
return args