Skip to content

Commit

Permalink
Cap vbv-buf-capacity to 10s to match gstreamer's max allowed value
Browse files Browse the repository at this point in the history
  • Loading branch information
biglittlebigben committed Sep 15, 2023
1 parent ee559a4 commit 80c8fbe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/pipeline/builder/video.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,12 @@ func (b *VideoBin) addEncoder() error {
}
bufCapacity = uint(time.Duration(b.conf.GetSegmentConfig().SegmentDuration) * (time.Second / time.Millisecond))
}

if bufCapacity > 10000 {
// Max value allowed by gstreamer
bufCapacity = 10000
}

if err = x264Enc.SetProperty("vbv-buf-capacity", bufCapacity); err != nil {
return err
}
Expand Down

0 comments on commit 80c8fbe

Please sign in to comment.