Disable scene detection auto keyframes as they create weird segments in transcode

This commit is contained in:
Zoe Roux 2024-02-12 17:27:30 +01:00
parent 4167704f85
commit 970d613285

View File

@ -43,6 +43,10 @@ func (vs *VideoStream) getTranscodeArgs(segments string) []string {
"-maxrate", fmt.Sprint(vs.quality.MaxBitrate()),
// Force segments to be split exactly on keyframes (only works when transcoding)
"-force_key_frames", segments,
// sc_threshold is a scene detection mechanisum used to create a keyframe when the scene changes
// this is on by default and inserts keyframes where we don't want to (it also breaks force_key_frames)
// we disable it to prevents whole scenes from behing removed due to the -f segment failing to find the corresonding keyframe
"-sc_threshold", "0",
"-strict", "-2",
}
}