bundles/voc-loudness-monitor: inital commit of sources units
This commit is contained in:
parent
b486548d63
commit
8abfe74c2b
4 changed files with 118 additions and 0 deletions
17
bundles/voc-loudness-monitor/files/loudness.service
Normal file
17
bundles/voc-loudness-monitor/files/loudness.service
Normal file
|
@ -0,0 +1,17 @@
|
|||
[Unit]
|
||||
Description=Loudness Monitor for ${url}
|
||||
After=syslog.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
RestartSec=30s
|
||||
Type=simple
|
||||
User=voc
|
||||
Group=voc
|
||||
WorkingDirectory=/opt/voc-loudness-monitor/
|
||||
ExecStart=/opt/voc-loudness-monitor/loudness_${id}.sh
|
||||
Restart=always
|
||||
StartLimitInterval=0
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
25
bundles/voc-loudness-monitor/files/loudness.sh
Executable file
25
bundles/voc-loudness-monitor/files/loudness.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
ffmpeg \
|
||||
-y \
|
||||
-hide_banner \
|
||||
-nostdin \
|
||||
-re \
|
||||
-loglevel warning \
|
||||
-timeout 5 \
|
||||
-i ${url} \
|
||||
-filter_complex "[0:v] scale=w=640:h=360, fps=25 [scaled];
|
||||
[0:a] ebur128=video=1:target=-16:gauge=shortterm:scale=relative:size=640x480[ebur][a1];
|
||||
[ebur] fps=25 [v1];
|
||||
[v1][scaled] vstack=inputs=2 [out];
|
||||
[a1] anullsink" \
|
||||
-map "[out]" \
|
||||
-c:v mpeg2video \
|
||||
-pix_fmt yuv420p \
|
||||
-q:v 2 \
|
||||
-keyint_min 0 \
|
||||
-an \
|
||||
-f rtp rtp://127.0.0.1:${port}
|
Loading…
Add table
Add a link
Reference in a new issue