Create rc3-4k-monitor-nolingo.sh

This commit is contained in:
Jan Koppe 2021-12-24 17:08:12 +01:00 committed by GitHub
parent 2a9a1da256
commit 5a1d0f3e20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 0 deletions

23
rc3-4k-monitor-nolingo.sh Normal file
View File

@ -0,0 +1,23 @@
#!/bin/bash
set -euxo pipefail
FONT='/opt/comic.ttf'
STREAM="${1:-cwtv}"
STREAM_OUT_SUFFIX="monitor"
SRT_SRC_HOST="srt://ingest${2:-}.c3voc.de:1337"
SRT_DST_HOST="srt://127.0.0.1:1337"
ffmpeg -y -i "${SRT_SRC_HOST}?streamid=play/$STREAM" \
-nostats -progress "/tmp/ffmpeg/${STREAM}_${STREAM_OUT_SUFFIX}" -loglevel repeat+level+info \
-filter_complex \
"[0:v:0]scale=640x360[orig_scaled];\
[orig_scaled]drawtext=fontfile=$FONT:text=$STREAM:fontcolor=white:fontsize=100:box=1:boxcolor=black@0.5:boxborderw=5:x=(w-text_w)/2:y=(h-text_h)/1.5[preview_overlay];\
[0:a:0]ebur128=video=1:size=640x480:meter=9:target=-16:gauge=shortterm[native][native_a]; [native_a]anullsink; \
[native]drawtext=fontfile=$FONT:text=native:fontcolor=white:fontsize=60:box=1:boxcolor=black@0.5:boxborderw=5:x=(w-text_w)/2:y=(h-text_h)/1.5[native_overlay];\
[0:a:0]showvolume=r=50:w=640:h=60:b=0:ds=log:dm=1.0[native_vu]; \
[preview_overlay][native_vu][native_overlay]vstack=inputs=3[full_mix]; \
[full_mix]framerate=fps=10[out]" \
-map "[out]" \
-g 30 \
-c:v libx264 -preset ultrafast -f mpegts "${SRT_DST_HOST}?streamid=publish/${STREAM}_${STREAM_OUT_SUFFIX}"