summaryrefslogtreecommitdiffstats
path: root/roles/obs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--roles/obs/defaults/main.yml2
-rw-r--r--roles/obs/tasks/main.yml7
-rw-r--r--roles/obs/tasks/obs-setup.yml4
-rw-r--r--roles/obs/tasks/track.yml26
-rw-r--r--roles/obs/tasks/user.yml1
-rw-r--r--roles/obs/templates/Mumble.conf78
-rw-r--r--roles/obs/templates/bashrc4
-rw-r--r--roles/obs/templates/emacsconf-stream-config.el2
-rwxr-xr-xroles/obs/templates/mpv-track24
-rw-r--r--roles/obs/templates/mpv.conf4
-rwxr-xr-xroles/obs/templates/pulse6
-rw-r--r--roles/obs/templates/scenes.json4
-rwxr-xr-xroles/obs/templates/xstartup-track1
13 files changed, 144 insertions, 19 deletions
diff --git a/roles/obs/defaults/main.yml b/roles/obs/defaults/main.yml
index 4038fa9..6eb9451 100644
--- a/roles/obs/defaults/main.yml
+++ b/roles/obs/defaults/main.yml
@@ -3,3 +3,5 @@ ff_vcustom: rt cpu-used=5 threads=2 error-resilient=1 crf=30 g=120 minrate=1.5M
ff_vbitrate: 1500
ff_vgopsize: 120
obs_profile_path: /home/{{ emacsconf_user }}/.config/obs-studio/basic/profiles
+emacsconf_asset_dir: /data/{{ emacsconf_id }}/assets
+mumble_server: mumble.emacsconf.org
diff --git a/roles/obs/tasks/main.yml b/roles/obs/tasks/main.yml
index 8c1e059..ab94878 100644
--- a/roles/obs/tasks/main.yml
+++ b/roles/obs/tasks/main.yml
@@ -19,6 +19,7 @@
- alsa-utils
- dbus-x11
- obs-studio
+ - mumble
- xserver-xorg-dev
- xdotool
update_cache: yes
@@ -67,10 +68,6 @@
file:
owner: "{{ emacsconf_user }}"
group: "{{ emacsconf_group }}"
- path: "{{ item }}"
+ path: "{{ emacsconf_asset_dir }}"
state: directory
mode: 0775
- loop:
- - /data/{{ emacsconf_id }}/stream
- - /data/{{ emacsconf_id }}/overlays
-
diff --git a/roles/obs/tasks/obs-setup.yml b/roles/obs/tasks/obs-setup.yml
index 911f609..acd3c1c 100644
--- a/roles/obs/tasks/obs-setup.yml
+++ b/roles/obs/tasks/obs-setup.yml
@@ -49,15 +49,13 @@
mode: 0664
- name: Create text files for OBS sources
copy:
- content: "Initializing..."
+ content: ""
owner: "{{ emacsconf_user }}"
group: "{{ emacsconf_group }}"
dest: "~{{ emacsconf_user }}/{{ filename }}.txt"
mode: 0664
loop:
- news
- - url
- - bottom
loop_control:
loop_var: filename
- name: Create OBS scripts for tracks
diff --git a/roles/obs/tasks/track.yml b/roles/obs/tasks/track.yml
index 14533df..fe49116 100644
--- a/roles/obs/tasks/track.yml
+++ b/roles/obs/tasks/track.yml
@@ -1,5 +1,5 @@
- name: Set vars
- tags: obs-scene, obs-profile, mpv, wip
+ tags: obs-scene, obs-profile, mpv, wip, mumble
set_fact:
old_emacsconf_user: "{{ emacsconf_user }}"
old_emacsconf_home: "{{ emacsconf_home }}"
@@ -79,11 +79,33 @@
dest: "~{{ emacsconf_user }}/.config/i3/config"
owner: "{{ emacsconf_user }}"
group: "{{ emacsconf_group }}"
+ - name: Set up Mumble configuration directory
+ tags: mumble
+ file:
+ path: "~{{ emacsconf_user }}/.config/Mumble"
+ state: directory
+ owner: "{{ emacsconf_user }}"
+ group: "{{ emacsconf_group }}"
+ - name: Debug mumble
+ debug:
+ var: mumble_certificates['dev']
+ - name: Set up mumble
+ tags: mumble
+ template:
+ src: Mumble.conf
+ dest: "~{{ emacsconf_user }}/.config/Mumble/Mumble.conf"
+ owner: "{{ emacsconf_user }}"
+ group: "{{ emacsconf_group }}"
- name: Set up Emacs configuration
tags: wip
include: emacs.yml
+ - name: Set up symbolic links
+ file:
+ src: "/data/{{ emacsconf_id }}/assets/stream"
+ dest: "~{{ emacsconf_user }}/stream"
+ state: link
- name: Reset vars
- tags: obs-scene, obs-profile, mpv, wip
+ tags: obs-scene, obs-profile, mpv, wip, mumble
set_fact:
old_emacsconf_user: "{{ emacsconf_user }}"
old_emacsconf_home: "{{ emacsconf_home }}"
diff --git a/roles/obs/tasks/user.yml b/roles/obs/tasks/user.yml
index fae7d9f..00e68a8 100644
--- a/roles/obs/tasks/user.yml
+++ b/roles/obs/tasks/user.yml
@@ -11,6 +11,7 @@
file:
path: "/home/{{ emacsconf_user }}/.ssh"
owner: "{{ emacsconf_user }}"
+ group: "{{ emacsconf_group }}"
state: directory
mode: 700
- name: Set up SSH key access
diff --git a/roles/obs/templates/Mumble.conf b/roles/obs/templates/Mumble.conf
new file mode 100644
index 0000000..06449d4
--- /dev/null
+++ b/roles/obs/templates/Mumble.conf
@@ -0,0 +1,78 @@
+[General]
+lastupdate=2
+
+[audio]
+echomulti=false
+input=PulseAudio
+output=PulseAudio
+outputdelay=4
+positional=false
+transmit=2
+vadmax=@Variant(\0\0\0\x87?z\xe1\xf6)
+vadmin=@Variant(\0\0\0\x87?L\xcd\x9a)
+whisperfriends=true
+
+[messages]
+10\log=1
+12\log=1
+14\log=1
+15\log=1
+17\log=1
+18\log=1
+19\log=1
+2\log=1
+20\log=1
+21\log=1
+22\log=1
+23\log=1
+25\log=1
+26\log=1
+27\log=1
+28\log=1
+29\log=1
+5\log=1
+6\log=1
+9\log=1
+size=29
+
+[messagesounds]
+size=29
+
+{% if mumble_certificates[item.id] is defined %}
+[net]
+certificate="{{ mumble_certificates[item.id] }}"
+{% endif %}
+
+[overlay]
+blacklist=@Invalid()
+blacklistexclude=@Invalid()
+launchers=@Invalid()
+launchersexclude=@Invalid()
+paths=@Invalid()
+pathsexclude=@Invalid()
+version=1.3.4
+whitelist=@Invalid()
+whitelistexclude=@Invalid()
+
+[pulseaudio]
+output={{ item.id }}-qa
+
+[shortcuts]
+1\data=@Invalid()
+1\index=1
+1\keys=@Variant(\0\0\0\t\0\0\0\x1\0\0\0\x2\0\0\0`)
+1\suppress=false
+size=1
+
+[tts]
+enable=false
+
+[ui]
+ConfigGeometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0n\0\0\0\x31\0\0\x4\x86\0\0\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0\0\0\0\0\0\x1\0\0\0\x2~\xfc\x2\0\0\0\x2\xfb\0\0\0\f\0q\0\x64\0w\0L\0o\0g\x1\0\0\0>\0\0\x2\x61\0\0\0z\0\xff\xff\xff\xfb\0\0\0\xe\0q\0\x64\0w\0\x43\0h\0\x61\0t\x1\0\0\x2\xa3\0\0\0\x19\0\0\0\x19\0\0\0\x19\0\0\x3\xf8\0\0\x2~\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\x1\0\0\0\x2\0\0\0\x1\0\0\0\x1a\0q\0t\0I\0\x63\0o\0n\0T\0o\0o\0l\0\x62\0\x61\0r\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0)
+usage=false
diff --git a/roles/obs/templates/bashrc b/roles/obs/templates/bashrc
index 3677017..4d65cbd 100644
--- a/roles/obs/templates/bashrc
+++ b/roles/obs/templates/bashrc
@@ -112,5 +112,9 @@ if ! shopt -oq posix; then
fi
fi
+alias play=track-mpv
+alias qa-louder="pactl set-sink-volume {{ item.id }}-qa +5% "
+alias qa-quieter="pactl set-sink-volume {{ item.id }}-qa -5% "
+alias qa-vol="pactl set-sink-volume {{ item.id }}-qa "
export PATH=$PATH:$HOME/bin
export DISPLAY=${DISPLAY:-:{{ item.vnc_id }}}
diff --git a/roles/obs/templates/emacsconf-stream-config.el b/roles/obs/templates/emacsconf-stream-config.el
index 8770d60..a1a048b 100644
--- a/roles/obs/templates/emacsconf-stream-config.el
+++ b/roles/obs/templates/emacsconf-stream-config.el
@@ -3,7 +3,7 @@
;; Configuration
(vertico-mode)
(fset 'yes-or-no-p 'y-or-n-p)
-(modus-themes-load-vivendi)
+(modus-themes-load-operandi)
(org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t) (shell . t)))
(setq backup-directory-alist '(("." . "~/.emacs.d/backups")))
(setq completion-styles '(orderless))
diff --git a/roles/obs/templates/mpv-track b/roles/obs/templates/mpv-track
index ee359f1..b6d6d67 100755
--- a/roles/obs/templates/mpv-track
+++ b/roles/obs/templates/mpv-track
@@ -2,4 +2,26 @@
# Run MPV with the output set to the right sink and with an IPC socket
# {{ ansible_managed }}
-DISPLAY="${DISPLAY:-:{{ item.vnc_id }}}" mpv --input-ipc-server={{ emacsconf_home }}/mpv-socket-{{ emacsconf_id }}-{{ item.id }} --audio-device=pulse/{{ item.id }}-vid --profile={{ emacsconf_id }}-talks $* &
+# Update the overlay
+FILE=$1
+if [[ ! -f $FILE ]]; then
+ FILE="/data/emacsconf/assets/stream/emacsconf-2022-$FILE*.webm"
+fi
+shift
+SLUG=$(echo "$FILE" | perl -ne 'if (/^emacsconf-[0-9]*-(.*?)--/) { print $1; } else { print; }')
+if [[ -f /data/emacsconf/assets/overlays/$SLUG-other.png ]]; then
+ echo "Found other overlay for $SLUG, copying"
+ cp /data/emacsconf/assets/overlays/$SLUG-other.png ~/other.png
+else
+ echo "Could not find /data/emacsconf/assets/overlays/$SLUG-other.png, please override ~/other.png manually"
+ cp /data/emacsconf/assets/overlays/blank-other.png ~/other.png
+fi
+if [[ -f /data/emacsconf/assets/overlays/$SLUG-video.png ]]; then
+ echo "Found video overlay for $SLUG, copying"
+ cp /data/emacsconf/assets/overlays/$SLUG-video.png ~/video.png
+else
+ echo "Could not find /data/emacsconf/assets/overlays/$SLUG-video.png, override ~/video.png manually"
+ cp /data/emacsconf/assets/overlays/blank-video.png ~/video.png
+fi
+# Play the video
+DISPLAY="${DISPLAY:-:{{ item.vnc_id }}}" mpv --input-ipc-server={{ emacsconf_home }}/mpv-socket-{{ emacsconf_id }}-{{ item.id }} --audio-device=pulse/{{ item.id }}-vid --profile={{ emacsconf_id }}-talks $FILE $* &
diff --git a/roles/obs/templates/mpv.conf b/roles/obs/templates/mpv.conf
index dce6481..6c90a6b 100644
--- a/roles/obs/templates/mpv.conf
+++ b/roles/obs/templates/mpv.conf
@@ -1,6 +1,8 @@
# {{ ansible_managed }}
# Requires mpv >= 0.34.0
+input-ipc-server={{ emacsconf_home }}/mpv-socket-{{ emacsconf_id }}-{{ item.id }}
+audio-device=pulse/{{ item.id }}-vid
# Comment out the next line if you don't want this profile loaded by default.
profile={{ emacsconf_id }}-talks
# Then you can load it with `--profile={{ emacsconf_id }}-talks`
@@ -14,7 +16,7 @@ video-align-y=-1
sub-use-margins=yes
sub-scale-by-window=yes
sub-pos=103
-sub-margin-x=105
+sub-margin-x=110
sub-margin-y=60
sub-align-x=left
# Style
diff --git a/roles/obs/templates/pulse b/roles/obs/templates/pulse
index cba7fc0..7035cfe 100755
--- a/roles/obs/templates/pulse
+++ b/roles/obs/templates/pulse
@@ -135,8 +135,6 @@ load-module module-filter-apply
#set-default-sink output
#set-default-source input
-{% for track in emacsconf_tracks %}
-load-module module-null-sink sink_name={{ track.id }}-vid sink_properties=device.description={{ track.id }}-vid
-load-module module-null-sink sink_name={{ track.id }}-qa sink_properties=device.description={{ track.id }}-qa
-{% endfor %}
+load-module module-null-sink sink_name={{ item.id }}-vid sink_properties=device.description={{ item.id }}-vid
+load-module module-null-sink sink_name={{ item.id }}-qa sink_properties=device.description={{ item.id }}-qa
load-module module-stream-restore restore_device=false
diff --git a/roles/obs/templates/scenes.json b/roles/obs/templates/scenes.json
index 6d8e7ad..5790efd 100644
--- a/roles/obs/templates/scenes.json
+++ b/roles/obs/templates/scenes.json
@@ -120,7 +120,7 @@
"push-to-talk": false,
"push-to-talk-delay": 0,
"settings": {
- "file": "/home/{{ emacsconf_id }}-{{ item.id }}/other.svg"
+ "file": "/home/{{ emacsconf_id }}-{{ item.id }}/other.png"
},
"sync": 0,
"versioned_id": "image_source",
@@ -145,7 +145,7 @@
"push-to-talk": false,
"push-to-talk-delay": 0,
"settings": {
- "file": "/home/{{ emacsconf_id }}-{{ item.id }}/video.svg"
+ "file": "/home/{{ emacsconf_id }}-{{ item.id }}/video.png"
},
"sync": 0,
"versioned_id": "image_source",
diff --git a/roles/obs/templates/xstartup-track b/roles/obs/templates/xstartup-track
index b80caac..b8d90cd 100755
--- a/roles/obs/templates/xstartup-track
+++ b/roles/obs/templates/xstartup-track
@@ -7,6 +7,7 @@ pulseaudio --start
pacmd set-default-sink {{ item.id }}-qa
firefox file:///data/emacsconf/{{ emacsconf_year }}/index-{{ item.id }}.html &
$HOME/bin/track-obs &
+mumble mumble://{{ emacsconf_id }}-{{ item.id }}@{{ mumble_server }}/{{ item.mumble_channel }} &
termit &
# $HOME/{{ item.id }}-obs &
# $HOME/{{ item.id }}-mpv $HOME/logo.png &