Adjust crf

monorepo
Varun Patil 2022-11-14 00:57:03 -08:00
parent e40f53c18b
commit 7f26d300e3
1 changed files with 8 additions and 3 deletions

View File

@ -313,11 +313,16 @@ func (s *Stream) transcode(startId int) {
} }
// do not scale or set bitrate for full quality // do not scale or set bitrate for full quality
if s.quality != "max" { if s.quality == "max" {
args = append(args, []string{
"-crf", "22",
}...)
} else {
args = append(args, []string{ args = append(args, []string{
"-vf", scale, "-vf", scale,
"-maxrate", fmt.Sprintf("%dk", s.bitrate/1000), "-crf", "24",
"-bufsize", fmt.Sprintf("%dK", s.bitrate/1000), "-maxrate", fmt.Sprintf("%d", s.bitrate),
"-bufsize", fmt.Sprintf("%d", s.bitrate*2),
}...) }...)
} }