Add Docker setup, .env.example, updated .gitignore/CHANGELOG and ADRs 004-007 + arc42 template

This commit is contained in:
zwitschi committed 2026-08-02 16:05:18 +02:00
1 parent dafcec1303
commit 0785260689
13 files changed
+724 -3

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
#!/bin/bash
set -e
echo "=== Linear Void Playout Service Starting ==="
echo "Playlist path: $PLAYLIST_PATH"
echo "HLS segment duration: ${HLS_SEGMENT_DURATION:-6}s"
# Ensure playlist exists or create a demo one
if [ ! -f "$PLAYLIST_PATH" ]; then
echo "Warning: Playlist not found at $PLAYLIST_PATH. Creating demo playlist."
cat > "$PLAYLIST_PATH" << EOF
file '/app/media/demo1.mp4'
file '/app/media/demo2.mp4'
EOF
fi
# Run FFmpeg in a loop for continuous playback
while true; do
echo "[$(date)] Starting FFmpeg playout..."
ffmpeg -re -f concat -safe 0 -i "$PLAYLIST_PATH" \
-c:v copy -c:a copy \
-f hls \
-hls_time ${HLS_SEGMENT_DURATION:-6} \
-hls_list_size ${HLS_WINDOW_SIZE:-24} \
-hls_flags delete_segments+append_list \
-hls_segment_filename "/app/hls/segment_%03d.ts" \
"/app/hls/playlist.m3u8" || echo "FFmpeg exited with error. Restarting in 5s..."
echo "Playout loop crashed or ended. Restarting in 5 seconds..."
sleep 5
done