Add lab restream pipeline with pirate_drift logo and lib/env.sh.

Encode-once/fanout scripts, HLS output, and single overloadable env source.
Commits assets/pirate_drift.png as default watermark for cluster runs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Anton Afanasyeu
2026-07-11 15:27:24 +02:00
parent d990862b64
commit 5ca8a9f539
27 changed files with 911 additions and 1 deletions

23
bin/run-encode-only.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# shellcheck disable=SC1091
source "${ROOT}/lib/common.sh"
SRC_ARG="${1:-1}"
PID_ENCODE="${RUN_DIR}/encode.pid"
LOG_RUN="${STORAGE_DIR}/run-encode-only.log"
ensure_storage
mkdir -p "${RUN_DIR}"
if [[ -f "${PID_ENCODE}" ]] && kill -0 "$(cat "${PID_ENCODE}")" 2>/dev/null; then
die "encode-only already running (pid $(cat "${PID_ENCODE}")). use bin/stop.sh first"
fi
chmod +x "${ROOT}/bin/"*.sh 2>/dev/null || true
log "starting encode-only source=${SRC_ARG}"
nohup "${ROOT}/bin/encode-only.sh" "${SRC_ARG}" >> "${LOG_RUN}" 2>&1 &
echo $! > "${PID_ENCODE}"
log "encode pid $(cat "${PID_ENCODE}")"