Skip to content
This repository has been archived by the owner on Feb 7, 2025. It is now read-only.

Commit

Permalink
Set initial encoder bitrate on creating pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
mengelbart committed Sep 16, 2022
1 parent 7768e14 commit 982fa3e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions media/gstreamer.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ func NewGstreamerSource(rtpWriter interceptor.RTPWriter, src string, useGstPacke
gstreamer.Set("error-resilient", "default"),
gstreamer.Set("cpu-used", 4),
gstreamer.Set("deadline", 1),
gstreamer.Set("target-bitrate", c.targetBitrate),
))
if useGstPacketizer {
builder = append(builder, gstreamer.NewElement(fmt.Sprintf("rtp%vpay", c.codec), payloaderSettings...))
Expand All @@ -88,6 +89,7 @@ func NewGstreamerSource(rtpWriter interceptor.RTPWriter, src string, useGstPacke
gstreamer.Set("pass", 5),
gstreamer.Set("speed-preset", 4),
gstreamer.Set("tune", 4),
gstreamer.Set("bitrate", c.targetBitrate/1000),
// gstreamer.Set("key-int-max", 10),
))
if useGstPacketizer {
Expand Down

0 comments on commit 982fa3e

Please sign in to comment.