Merge branch 'bugfix/KASM-2021_kali_choppy_audio' into 'develop'

KASM-2021 Add fragment_size argument for ffmpeg pulseaudio

Closes KASM-2021

See merge request kasm-technologies/internal/workspaces-core-images!29
This commit is contained in:
Justin Travis 2021-11-15 16:19:10 +00:00
commit 1aa3ffcf74

View File

@ -98,11 +98,11 @@ function start_audio_out (){
if [[ $DEBUG == true ]]; then
echo 'Starting audio service in debug mode'
no_proxy=127.0.0.1 ffmpeg -f pulse -ar 44100 -i default -f mpegts -correct_ts_overflow 0 -codec:a mp2 -b:a 128k -ac 1 -muxdelay 0.001 http://127.0.0.1:8081/kasmaudio &
no_proxy=127.0.0.1 ffmpeg -f pulse -fragment_size ${PULSEAUDIO_FRAGMENT_SIZE:-2000} -ar 44100 -i default -f mpegts -correct_ts_overflow 0 -codec:a mp2 -b:a 128k -ac 1 -muxdelay 0.001 http://127.0.0.1:8081/kasmaudio &
KASM_PROCS['kasm_audio_out']=$!
else
echo 'Starting audio service'
no_proxy=127.0.0.1 ffmpeg -v verbose -f pulse -ar 44100 -i default -f mpegts -correct_ts_overflow 0 -codec:a mp2 -b:a 128k -ac 1 -muxdelay 0.001 http://127.0.0.1:8081/kasmaudio > /dev/null 2>&1 &
no_proxy=127.0.0.1 ffmpeg -v verbose -f pulse -fragment_size ${PULSEAUDIO_FRAGMENT_SIZE:-2000} -ar 44100 -i default -f mpegts -correct_ts_overflow 0 -codec:a mp2 -b:a 128k -ac 1 -muxdelay 0.001 http://127.0.0.1:8081/kasmaudio > /dev/null 2>&1 &
KASM_PROCS['kasm_audio_out']=$!
echo -e "\n------------------ Started Audio Out ----------------------------"
echo "Kasm Audio Out PID: ${KASM_PROCS['kasm_audio_out']}";