diff --git a/transcoder/src/stream.go b/transcoder/src/stream.go index dec0c47f..ccec171c 100644 --- a/transcoder/src/stream.go +++ b/transcoder/src/stream.go @@ -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",