Fix keyframe alignment

monorepo
Varun Patil 2022-11-13 22:08:14 -08:00
parent e20888f244
commit e40f53c18b
1 changed files with 5 additions and 0 deletions

View File

@ -268,6 +268,11 @@ func (s *Stream) restartAtChunk(w http.ResponseWriter, id int) {
}
func (s *Stream) transcode(startId int) {
if startId > 0 {
// Start one frame before
// This ensures that the keyframes are aligned
startId--
}
startAt := float64(startId * s.c.chunkSize)
args := []string{