Aggiunge overlay server-side burn-in e stabilizza diretta live.
Tabellone, badge e brand sono ricodificati nel flusso _air via OverlayRelay; sync punteggio HTTP, volume condiviso rails/sidekiq, qualità 720p migliorata e badge CONNECTING in ripresa da pausa. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
40
scripts/test/rtmp_test_pattern.sh
Executable file
40
scripts/test/rtmp_test_pattern.sh
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env bash
|
||||
# Pubblica un pattern colorato su RTMP per testare il player web (senza telefono).
|
||||
# Uso:
|
||||
# SESSION_ID=fe09a29f-79db-44d5-864f-397942c0a2c5 ./scripts/test/rtmp_test_pattern.sh
|
||||
# RTMP_URL=rtmp://www.matchlivetv.it:1935/live/match_UUID ./scripts/test/rtmp_test_pattern.sh
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
||||
OUT_DIR="${TMPDIR:-/tmp}/matchlivetv-test"
|
||||
PATTERN="$OUT_DIR/test_pattern.mp4"
|
||||
DURATION="${DURATION_SEC:-0}" # 0 = loop infinito
|
||||
|
||||
if [[ -z "${RTMP_URL:-}" ]]; then
|
||||
if [[ -z "${SESSION_ID:-}" ]]; then
|
||||
echo "Imposta SESSION_ID o RTMP_URL"
|
||||
exit 1
|
||||
fi
|
||||
RTMP_URL="rtmp://www.matchlivetv.it:1935/live/match_${SESSION_ID}"
|
||||
fi
|
||||
|
||||
mkdir -p "$OUT_DIR"
|
||||
|
||||
if [[ ! -f "$PATTERN" ]]; then
|
||||
echo "Genero video di test $PATTERN ..."
|
||||
ffmpeg -y -hide_banner -loglevel warning \
|
||||
-f lavfi -i "testsrc2=size=1280x720:rate=30" \
|
||||
-f lavfi -i "sine=frequency=880:sample_rate=48000" \
|
||||
-t 30 \
|
||||
-c:v libx264 -pix_fmt yuv420p -profile:v baseline -level 3.1 -g 30 -keyint_min 30 \
|
||||
-c:a aac -b:a 128k -ac 1 \
|
||||
"$PATTERN"
|
||||
fi
|
||||
|
||||
echo "Pubblico su $RTMP_URL (Ctrl+C per fermare)"
|
||||
ARGS=(-re -stream_loop -1 -i "$PATTERN" -c copy -f flv "$RTMP_URL")
|
||||
if [[ "$DURATION" != "0" ]]; then
|
||||
ARGS=(-re -t "$DURATION" -i "$PATTERN" -c copy -f flv "$RTMP_URL")
|
||||
fi
|
||||
|
||||
exec ffmpeg -hide_banner "${ARGS[@]}"
|
||||
Reference in New Issue
Block a user