move broadcast constants to config.

This commit is contained in:
Miroslav Šedivý
2021-03-18 13:17:10 +01:00
parent 552223d031
commit 9c6c107ee0
2 changed files with 25 additions and 4 deletions

View File

@ -34,14 +34,14 @@ func New(desktop types.DesktopManager, config *config.Capture) *CaptureManagerCt
"! audio/x-raw,channels=2 "+
"! audioconvert "+
"! queue "+
"! voaacenc bitrate=128000 "+
"! voaacenc bitrate=%d "+
"! mux. "+
"ximagesrc display-name=%s show-pointer=true use-damage=false "+
"! video/x-raw "+
"! videoconvert "+
"! queue "+
"! x264enc threads=4 bitrate=4096 key-int-max=15 byte-stream=true tune=zerolatency speed-preset=veryfast "+
"! mux.", config.AudioDevice, config.Display,
"! x264enc threads=4 bitrate=%d key-int-max=15 byte-stream=true tune=zerolatency speed-preset=%s "+
"! mux.", config.AudioDevice, config.BroadcastAudioBitrate*1000, config.Display, config.BroadcastVideoBitrate, config.BroadcastPreset,
)
}