mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Use precise durations for segment splits (needed in hardware transcode mode)
This commit is contained in:
parent
f5c629cb8a
commit
00831fdb61
@ -218,9 +218,10 @@ func (ts *Stream) run(start int32) error {
|
||||
"-segment_time_delta", "0.2",
|
||||
"-segment_format", "mpegts",
|
||||
"-segment_times", toSegmentStr(Map(segments, func(seg float64, _ int) float64 {
|
||||
// for a strange reason, -segment-times does not respects -copyts so we must
|
||||
// remove the start_ref (-ss param)
|
||||
return seg - start_ref
|
||||
// segment_times want durations, not timestamps so we must substract the -ss param
|
||||
// since we give a greater value to -ss to prevent wrong seeks but -segment_times
|
||||
// needs precise segments, we use the keyframe we want to seek to as a reference.
|
||||
return seg - ts.file.Keyframes[start]
|
||||
})),
|
||||
"-segment_list_type", "flat",
|
||||
"-segment_list", "pipe:1",
|
||||
|
Loading…
x
Reference in New Issue
Block a user