Skip to content

Commit

Permalink
log keyframe interval (#677)
Browse files Browse the repository at this point in the history
  • Loading branch information
frostbyte73 authored May 16, 2024
1 parent 17063dd commit 8fcd028
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/pipeline/builder/video.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 8fcd028

Please sign in to comment.