diff --git a/transcoder/src/filestream.go b/transcoder/src/filestream.go index 8a83205a..0b8bfc03 100644 --- a/transcoder/src/filestream.go +++ b/transcoder/src/filestream.go @@ -81,7 +81,7 @@ func (fs *FileStream) GetMaster() string { } } // TODO: also check if the codec is valid in a hls before putting transmux - if fs.CanTransmux { + if true { bitrate := float64(fs.Info.Video.Bitrate) master += "#EXT-X-STREAM-INF:" master += fmt.Sprintf("AVERAGE-BANDWIDTH=%d,", int(math.Min(bitrate*0.8, float64(transmux_quality.AverageBitrate())))) diff --git a/transcoder/src/keyframes.go b/transcoder/src/keyframes.go index e86c6a47..a27f945b 100644 --- a/transcoder/src/keyframes.go +++ b/transcoder/src/keyframes.go @@ -34,8 +34,6 @@ func GetKeyframes(path string) ([]float64, bool, error) { scanner := bufio.NewScanner(stdout) ret := make([]float64, 0, 1000) - last := 0. - can_transmux := true for scanner.Scan() { frame := scanner.Text() if frame == "" { @@ -70,22 +68,6 @@ func GetKeyframes(path string) ([]float64, bool, error) { ret = append(ret, 0) continue } - - // If we have a segment of more than 20s, create new keyframes during transcode and disable transmuxing - if fpts-last > 20 { - can_transmux = false - - fake_count := math.Ceil(fpts - last/4) - duration := (fpts - last) / fake_count - // let the last one be handled normally, this prevents floating points rounding - for fake_count > 1 { - fake_count-- - last = last + duration - ret = append(ret, last) - } - } - - last = fpts ret = append(ret, fpts) } return ret, can_transmux, nil