From fb845a1f188d4bb75631b1037a5f455d2006e3ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Tue, 23 Mar 2021 14:06:40 +0100 Subject: [PATCH] update pipelines. --- internal/capture/manager.go | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/internal/capture/manager.go b/internal/capture/manager.go index df7d8d97..46a88718 100644 --- a/internal/capture/manager.go +++ b/internal/capture/manager.go @@ -79,58 +79,58 @@ func New(desktop types.DesktopManager, config *config.Capture) *CaptureManagerCt videos: map[string]*StreamManagerCtx{ "hd": streamNew(codec.VP8(), func() string { screen := desktop.GetScreenSize() - bitrate := int((screen.Width * screen.Height * 5) / 3) - buf := bitrate / 1000 + bitrate := int((screen.Width * screen.Height * 6) / 4) + buffer := bitrate / 1000 return fmt.Sprintf( "ximagesrc display-name=%s show-pointer=false use-damage=false "+ "! video/x-raw,framerate=25/1 "+ "! videoconvert "+ "! queue "+ - "! vp8enc end-usage=cbr target-bitrate=%d cpu-used=16 threads=4 deadline=1 undershoot=95 error-resilient=partitions keyframe-max-dist=25 min-quantizer=6 max-quantizer=12 buffer-size=%d buffer-initial-size=%d buffer-optimal-size=%d "+ - "! appsink name=appsink", config.Display, bitrate, buf*6, buf*4, buf*5, + "! vp8enc end-usage=cbr target-bitrate=%d cpu-used=4 threads=4 deadline=1 undershoot=95 keyframe-max-dist=25 min-quantizer=3 max-quantizer=32 buffer-size=%d buffer-initial-size=%d buffer-optimal-size=%d "+ + "! appsink name=appsink", config.Display, bitrate, buffer*6, buffer*4, buffer*5, ) }), "hq": streamNew(codec.VP8(), func() string { screen := desktop.GetScreenSize() - bitrate := int((screen.Width * screen.Height * 5) / 3) / 2 - buf := bitrate / 1000 + bitrate := int((screen.Width * screen.Height * 6) / 4) / 2 + buffer := bitrate / 1000 return fmt.Sprintf( "ximagesrc display-name=%s show-pointer=false use-damage=false "+ "! video/x-raw,framerate=15/1 "+ "! videoconvert "+ "! queue "+ - "! vp8enc end-usage=cbr target-bitrate=%d cpu-used=16 threads=4 deadline=1 undershoot=95 error-resilient=partitions keyframe-max-dist=25 min-quantizer=6 max-quantizer=12 buffer-size=%d buffer-initial-size=%d buffer-optimal-size=%d "+ - "! appsink name=appsink", config.Display, bitrate, buf*6, buf*4, buf*5, + "! vp8enc end-usage=cbr target-bitrate=%d cpu-used=4 threads=4 deadline=1 undershoot=95 keyframe-max-dist=25 min-quantizer=3 max-quantizer=32 buffer-size=%d buffer-initial-size=%d buffer-optimal-size=%d "+ + "! appsink name=appsink", config.Display, bitrate, buffer*6, buffer*4, buffer*5, ) }), "mq": streamNew(codec.VP8(), func() string { screen := desktop.GetScreenSize() - bitrate := int((screen.Width * screen.Height * 5) / 3) / 3 - buf := bitrate / 1000 + bitrate := int((screen.Width * screen.Height * 6) / 4) / 3 + buffer := bitrate / 1000 return fmt.Sprintf( "ximagesrc display-name=%s show-pointer=false use-damage=false "+ "! video/x-raw,framerate=10/1 "+ "! videoconvert "+ "! queue "+ - "! vp8enc end-usage=cbr target-bitrate=%d cpu-used=16 threads=4 deadline=1 undershoot=95 error-resilient=partitions keyframe-max-dist=25 min-quantizer=12 max-quantizer=24 buffer-size=%d buffer-initial-size=%d buffer-optimal-size=%d "+ - "! appsink name=appsink", config.Display, bitrate, buf*6, buf*4, buf*5, + "! vp8enc end-usage=cbr target-bitrate=%d cpu-used=4 threads=4 deadline=1 undershoot=95 keyframe-max-dist=25 min-quantizer=3 max-quantizer=32 buffer-size=%d buffer-initial-size=%d buffer-optimal-size=%d "+ + "! appsink name=appsink", config.Display, bitrate, buffer*6, buffer*4, buffer*5, ) }), "lq": streamNew(codec.VP8(), func() string { screen := desktop.GetScreenSize() - bitrate := int((screen.Width * screen.Height * 5) / 3) / 4 - buf := bitrate / 1000 + bitrate := int((screen.Width * screen.Height * 6) / 4) / 4 + buffer := bitrate / 1000 return fmt.Sprintf( "ximagesrc display-name=%s show-pointer=false use-damage=false "+ "! video/x-raw,framerate=5/1 "+ "! videoconvert "+ "! queue "+ - "! vp8enc end-usage=cbr target-bitrate=%d cpu-used=16 threads=4 deadline=1 undershoot=95 error-resilient=partitions keyframe-max-dist=25 min-quantizer=12 max-quantizer=24 buffer-size=%d buffer-initial-size=%d buffer-optimal-size=%d "+ - "! appsink name=appsink", config.Display, bitrate, buf*6, buf*4, buf*5, + "! vp8enc end-usage=cbr target-bitrate=%d cpu-used=4 threads=4 deadline=1 undershoot=95 keyframe-max-dist=25 min-quantizer=3 max-quantizer=32 buffer-size=%d buffer-initial-size=%d buffer-optimal-size=%d "+ + "! appsink name=appsink", config.Display, bitrate, buffer*6, buffer*4, buffer*5, ) }), },