Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Force an iframe every segment

Gabe Kangas3376e3c48a88
diff --git a/core/transcoder/transcoder.go b/core/transcoder/transcoder.go
index 93c72ad4f9..1a40e8a07c 100644
--- a/core/transcoder/transcoder.go
+++ b/core/transcoder/transcoder.go
@@ -327,7 +327,7 @@ func (v *HLSVariant) getVideoQualityString(t *Transcoder) string {
return fmt.Sprintf("-map v:0 -c:v:%d copy", v.index)
}
- gop := v.framerate // force an i-frame every second
+ gop := v.framerate * t.currentLatencyLevel.SecondsPerSegment // force an i-frame every segment
// For limiting the output bitrate
// https://trac.ffmpeg.org/wiki/Limiting%20the%20output%20bitrate