From f6114cd410bec365403e28778e7aca7e1a6a9eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Wed, 3 Mar 2021 22:30:45 +0100 Subject: [PATCH] pipelines: modify default bitrate ratio. --- internal/capture/manager.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/capture/manager.go b/internal/capture/manager.go index 310e625a..0978b955 100644 --- a/internal/capture/manager.go +++ b/internal/capture/manager.go @@ -80,7 +80,7 @@ func New(desktop types.DesktopManager, config *config.Capture) *CaptureManagerCt videos: map[string]*StreamManagerCtx{ "hd": streamNew(codec.VP8(), func() string { screen := desktop.GetScreenSize() - bitrate := screen.Width * screen.Height * 12 + bitrate := int((screen.Width * screen.Height * 5) / 3) return fmt.Sprintf( "ximagesrc display-name=%s show-pointer=false use-damage=false "+ @@ -95,7 +95,7 @@ func New(desktop types.DesktopManager, config *config.Capture) *CaptureManagerCt screen := desktop.GetScreenSize() width := int(math.Ceil(float64(screen.Width)/6) * 5) height := int(math.Ceil(float64(screen.Height)/6) * 5) - bitrate := width * height * 12 + bitrate := int((width * height * 5) / 3) return fmt.Sprintf( "ximagesrc display-name=%s show-pointer=false use-damage=false "+ @@ -113,7 +113,7 @@ func New(desktop types.DesktopManager, config *config.Capture) *CaptureManagerCt screen := desktop.GetScreenSize() width := int(math.Ceil(float64(screen.Width)/6) * 4) height := int(math.Ceil(float64(screen.Height)/6) * 4) - bitrate := width * height * 8 + bitrate := int((width * height * 5) / 3) return fmt.Sprintf( "ximagesrc display-name=%s show-pointer=false use-damage=false "+ @@ -131,7 +131,7 @@ func New(desktop types.DesktopManager, config *config.Capture) *CaptureManagerCt screen := desktop.GetScreenSize() width := int(math.Ceil(float64(screen.Width)/6) * 3) height := int(math.Ceil(float64(screen.Height)/6) * 3) - bitrate := width * height * 4 + bitrate := int((width * height * 5) / 3) return fmt.Sprintf( "ximagesrc display-name=%s show-pointer=false use-damage=false "+