From b9154beee61ec240984362676cb72ec9d6eeefe8 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 23 Feb 2023 20:57:26 +0100 Subject: ele-hyperion: install docker and play-on-decklink script --- dan/ele-hyperion.yml | 23 +++++++++++++++++++++++ inventory/host_vars/ch-hyperion.yml | 10 ++++++++++ 2 files changed, 33 insertions(+) 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 " + 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" diff --git a/inventory/host_vars/ch-hyperion.yml b/inventory/host_vars/ch-hyperion.yml index 30c03003..e37a897d 100644 --- a/inventory/host_vars/ch-hyperion.yml +++ b/inventory/host_vars/ch-hyperion.yml @@ -70,3 +70,13 @@ blackmagic_desktopvideo_version: 12.2.2a6 blackmagic_desktopvideo_include_gui: yes blackmagic_mediaexpress_version: 3.7a7 + + +docker_pkg_provider: docker-com + +docker_storage: + type: lvm + vg: "{{ host_name }}" + lv: docker + size: 2G + fs: ext4 -- cgit v1.2.3