#!/bin/bash monitor=$(pactl list short sources | grep output | grep monitor | cut -d ' ' -f 2) mic=$(pactl list short sources | grep input | cut -d ' ' -f 2) combined=$(pactl list short sources | grep combined | cut -d ' ' -f 2) echo $monitor $mic $combined ffmpeg \ -hide_banner \ -thread_queue_size 512 \ -video_size 1920x1200 \ -framerate 30 \ -f x11grab \ -i :0.0+1050+0 \ -thread_queue_size 512 \ -f pulse \ -channel_layout stereo \ -i "$monitor" \ -thread_queue_size 512 \ -f pulse \ -channel_layout stereo \ -i "$mic" \ -thread_queue_size 512 \ -f pulse \ -channel_layout stereo \ -i "$combined" \ -c:a aac \ -b:a 256k \ -c:v libx264rgb \ -crf 0 \ -preset ultrafast \ -f mpegts \ -map 0 \ -map 1 \ -map 2 \ -map 3 tcp://10.0.1.22:9999