From 07d8698dde10d57e58c464f0472b244ec78b8254 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Sat, 26 Nov 2022 18:55:10 -0500 Subject: remove extra /emacsconf/ from mounts --- roles/obs/templates/emacsconf-stream-config.el | 6 +++++- roles/obs/templates/mpv-track | 11 ++++++++++- roles/obs/templates/profile.ini | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) (limited to 'roles/obs/templates') 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 }} -- cgit v1.2.3