From 8fcd028940b636b3aa96b17d28740e1fed5d69a0 Mon Sep 17 00:00:00 2001 From: David Colburn Date: Thu, 16 May 2024 14:42:23 -0400 Subject: [PATCH] log keyframe interval (#677) --- pkg/pipeline/builder/video.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/pipeline/builder/video.go b/pkg/pipeline/builder/video.go index 02917669..6af5e752 100644 --- a/pkg/pipeline/builder/video.go +++ b/pkg/pipeline/builder/video.go @@ -541,7 +541,11 @@ func (b *VideoBin) addEncoder() error { } x264Enc.SetArg("speed-preset", "veryfast") if b.conf.KeyFrameInterval != 0 { - if err = x264Enc.SetProperty("key-int-max", uint(b.conf.KeyFrameInterval*float64(b.conf.Framerate))); err != nil { + keyframeInterval := uint(b.conf.KeyFrameInterval * float64(b.conf.Framerate)) + if b.conf.Debug.LogKeyFrames { + logger.Debugw("setting key frame interval", "interval", keyframeInterval) + } + if err = x264Enc.SetProperty("key-int-max", keyframeInterval); err != nil { return errors.ErrGstPipelineError(err) } }