Fix missing last segment

This commit is contained in:
Zoe Roux 2024-02-10 21:54:52 +01:00
parent bb29b7e7f7
commit 2877083ebe

View File

@ -135,9 +135,13 @@ func (ts *Stream) run(start int32) error {
"-ss", fmt.Sprintf("%.6f", ts.file.Keyframes[start]),
"-i", ts.file.Path,
"-to", fmt.Sprintf("%.6f", ts.file.Keyframes[end]),
"-copyts",
}
if end != int32(len(ts.file.Keyframes)-1) {
args = append(args,
"-to", fmt.Sprintf("%.6f", ts.file.Keyframes[end]),
)
}
args = append(args, ts.handle.getTranscodeArgs(segments_str)...)
args = append(args, []string{
"-f", "segment",