Files
fake-cam/stream.sh
Léo Nonnenmacher 3a727762b2
Some checks failed
Docker Build and Push for Main Branch / docker (push) Has been cancelled
Actualiser stream.sh
2026-04-19 21:40:22 +00:00

13 lines
427 B
Bash

#!/bin/sh
echo "🎬 Démarrage du stream HLS optimisé (segments 2s)..."
ffmpeg -re -stream_loop -1 -i /app/video.mp4 \
-c:v libx264 -preset veryfast -b:v 1500k -maxrate 1500k -bufsize 3000k \
-c:a aac -b:a 128k -ar 44100 \
-force_key_frames "expr:gte(t,n_forced*2)" \
-f hls -hls_time 2 -hls_list_size 5 \
/usr/share/nginx/html/hls/stream.m3u8 &
echo "🌐 Nginx prêt sur le port 80"
exec nginx -g "daemon off;"