summaryrefslogtreecommitdiff
path: root/dan/ele-hyperion.yml
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2023-02-23 20:57:26 +0100
committerChristian Pointner <equinox@spreadspace.org>2023-02-23 20:57:26 +0100
commitb9154beee61ec240984362676cb72ec9d6eeefe8 (patch)
treeca05f6057e807d2575716ec32a0ca6e19c7b4988 /dan/ele-hyperion.yml
parentelevate: install ele-tarvos (diff)
ele-hyperion: install docker and play-on-decklink script
Diffstat (limited to 'dan/ele-hyperion.yml')
-rw-r--r--dan/ele-hyperion.yml23
1 files changed, 23 insertions, 0 deletions
diff --git a/dan/ele-hyperion.yml b/dan/ele-hyperion.yml
index afa44507..ba3c986c 100644
--- a/dan/ele-hyperion.yml
+++ b/dan/ele-hyperion.yml
@@ -20,6 +20,7 @@
- role: core/admin-users
- role: streaming/blackmagic/desktopvideo
- role: streaming/blackmagic/mediaexpress
+ - role: docker/engine
post_tasks:
## TODO: move to network/netplan when this is done
- name: install vlan interfaces
@@ -42,3 +43,25 @@
- {{ (vlan_iface | first).address }}
{% endif %}
{% endfor %}
+
+ - name: install script to play videos via decklink card
+ copy:
+ dest: /usr/local/bin/play-on-decklink.sh
+ mode: 0755
+ content: |
+ #!/bin/bash
+
+ if [ -z "$1" ]; then
+ echo "Usage: $0 <vidoe-file>"
+ exit 1
+ fi
+ video_path_full=$(realpath "$1")
+ video_name=$(basename "$video_path_full")
+
+ decklink_device="DeckLink Duo (2)"
+
+ exec docker run --rm -it --device=/dev/blackmagic:/dev/blackmagic -v /usr/lib/libDeckLinkAPI.so:/usr/lib/libDeckLinkAPI.so \
+ -v /usr/lib/libDeckLinkAPI.so:/usr/lib/libDeckLinkAPI.so -v /usr/lib/blackmagic:/usr/lib/blackmagic \
+ -v "$video_path_full:/srv/$video_name" \
+ registry.gitlab.com/spreadspace/docker/ffmpeg:bullseye-decklink11.7-2022-07-08.29 \
+ /usr/bin/ffmpeg -i "/srv/$video_name" -ac 2 -pix_fmt uyvy422 -s 1920x1080 -r 50 -f decklink "$decklink_device"