summaryrefslogtreecommitdiffstats
path: root/roles/obs
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2022-11-26 18:55:10 -0500
committerSacha Chua <sacha@sachachua.com>2022-11-26 18:55:10 -0500
commit07d8698dde10d57e58c464f0472b244ec78b8254 (patch)
tree97c8739f6985dadbe4e0611bc2503882487e6337 /roles/obs
parent033117f23aae412f9b5f8d9525d08f2830be7f79 (diff)
downloademacsconf-ansible-07d8698dde10d57e58c464f0472b244ec78b8254.tar.xz
emacsconf-ansible-07d8698dde10d57e58c464f0472b244ec78b8254.zip
remove extra /emacsconf/ from mounts
Diffstat (limited to 'roles/obs')
-rw-r--r--roles/obs/tasks/track.yml1
-rw-r--r--roles/obs/templates/emacsconf-stream-config.el6
-rwxr-xr-xroles/obs/templates/mpv-track11
-rw-r--r--roles/obs/templates/profile.ini2
4 files changed, 16 insertions, 4 deletions
diff --git a/roles/obs/tasks/track.yml b/roles/obs/tasks/track.yml
index da44bac..8b138ae 100644
--- a/roles/obs/tasks/track.yml
+++ b/roles/obs/tasks/track.yml
@@ -54,7 +54,6 @@
owner: "{{ emacsconf_user }}"
group: "{{ emacsconf_group }}"
mode: 0775
- loop: "{{ emacsconf_tracks }}"
- name: Copy logo
copy:
src: logo.png
diff --git a/roles/obs/templates/emacsconf-stream-config.el b/roles/obs/templates/emacsconf-stream-config.el
index a1a048b..610d16e 100644
--- a/roles/obs/templates/emacsconf-stream-config.el
+++ b/roles/obs/templates/emacsconf-stream-config.el
@@ -10,4 +10,8 @@
(setq completion-category-defaults nil)
(setq completion-category-overrides '((file (styles orderless))))
-
+(setq emacsconf-track "{{ item.name }}")
+(autoload 'text-property-search-forward "text-property-search")
+(add-to-list 'load-path "~/emacsconf-el")
+(require 'emacsconf)
+(require 'emacsconf-stream)
diff --git a/roles/obs/templates/mpv-track b/roles/obs/templates/mpv-track
index 77d73bd..db3ea62 100755
--- a/roles/obs/templates/mpv-track
+++ b/roles/obs/templates/mpv-track
@@ -10,7 +10,9 @@ fi
# Update the overlay
FILE=$1
if [[ ! -f $FILE ]]; then
- FILE="/data/emacsconf/assets/stream/emacsconf-2022-$FILE*.webm"
+ LIST=(/data/emacsconf/assets/stream/emacsconf-2022-$FILE*.webm)
+ FILE="${LIST[0]}"
+ BY_SLUG=1
fi
shift
SLUG=$(echo "$FILE" | perl -ne 'if (/^emacsconf-[0-9]*-(.*?)--/) { print $1; } else { print; }')
@@ -28,5 +30,12 @@ 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
+if [[ "x$BY_SLUG" == "x1" ]] && [[ -f /data/emacsconf/assets/intros/$SLUG.webm ]]; then
+ INTRO=/data/emacsconf/assets/intros/$SLUG.webm
+ echo "Found intro $INTRO"
+else
+ echo "Could not find /data/emacsconf/assets/intros/$SLUG.webm"
+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/profile.ini b/roles/obs/templates/profile.ini
index ba09dec..d00e3af 100644
--- a/roles/obs/templates/profile.ini
+++ b/roles/obs/templates/profile.ini
@@ -35,7 +35,7 @@ FFAudioTrack=1
FFAudioMixes=1
Pre22.1Settings=true
FLVTrack=1
-FFURL=icecast://{{ icecast_emacsconf_user }}:{{ icecast_emacsconf_password }}@{{ icecast_hostname }}:{{ icecast_port }}/{{ emacsconf_id }}/{{ item.id }}.webm
+FFURL=icecast://{{ icecast_emacsconf_user }}:{{ icecast_emacsconf_password }}@{{ icecast_hostname }}:{{ icecast_port }}/{{ item.id }}.webm
FFExtension=webm
FFMCustom={{ ff_mcustom }}
FFVBitrate={{ ff_vbitrate }}