summaryrefslogtreecommitdiffstats
path: root/roles/obs/templates/stream-desktop-with-ffmpeg.sh
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2022-10-30 10:06:47 -0400
committerSacha Chua <sacha@sachachua.com>2022-10-30 10:06:47 -0400
commitb8c97d14ed81871eef51ba7253982c45258ec538 (patch)
treeb9e6252349df072aca9b6ff66ca0cf000f7c9cc2 /roles/obs/templates/stream-desktop-with-ffmpeg.sh
parenta1e9bd2ba2cabd37a298c4ed951dfe2344bd750f (diff)
downloademacsconf-ansible-b8c97d14ed81871eef51ba7253982c45258ec538.tar.xz
emacsconf-ansible-b8c97d14ed81871eef51ba7253982c45258ec538.zip
Add obs role
Diffstat (limited to 'roles/obs/templates/stream-desktop-with-ffmpeg.sh')
-rwxr-xr-xroles/obs/templates/stream-desktop-with-ffmpeg.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/roles/obs/templates/stream-desktop-with-ffmpeg.sh b/roles/obs/templates/stream-desktop-with-ffmpeg.sh
new file mode 100755
index 0000000..273505b
--- /dev/null
+++ b/roles/obs/templates/stream-desktop-with-ffmpeg.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+while true; do ffmpeg -loglevel ${LOG:0} -ar 48000 -f alsa -channels 2 -sample_rate 48000 -i default -re -video_size {{ res_x }}x{{ res_y }} -framerate 25 -f x11grab -i :0.0 -cluster_size_limit 2M -cluster_time_limit 5100 -content_type video/webm -c:v libvpx -b:v 1M -crf 30 -g 125 -deadline good -threads 4 -f webm icecast://{{ icecast_emacsconf_user }}:{{icecast_emacsconf_password }}@live0.emacsconf.org:{{ icecast_port }}/{{ emacsconf_id }}/${1:{{ item.id }}}; sleep 5; done