Compare commits
2 commits
e9576def8b
...
838081dfd6
Author | SHA1 | Date | |
---|---|---|---|
838081dfd6 | |||
c05c604a05 |
2 changed files with 37 additions and 0 deletions
1
config.dist
Normal file
1
config.dist
Normal file
|
@ -0,0 +1 @@
|
|||
srt_output="srt://fdqn:6000?mode=caller&transtype=live&pkt_size=1316&streamid=CHANGEME.stream,mode:publish,token:CHANGEME"
|
36
stream.sh
Executable file
36
stream.sh
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "Press CTRL+C to exit"
|
||||
|
||||
source config
|
||||
|
||||
echo ${srt_output}
|
||||
|
||||
while :
|
||||
do
|
||||
CURRENTDATE=`date +"%Y-%m-%d %T"`
|
||||
echo Start at ${CURRENTDATE}
|
||||
|
||||
threads=12
|
||||
|
||||
# gpu
|
||||
hwaccel="-hwaccel vaapi -vaapi_device /dev/dri/renderD128"
|
||||
input_video_filter="-vf format=nv12,hwupload"
|
||||
h264_vaapi="-c:v h264_vaapi -qp 18"
|
||||
|
||||
#cpu
|
||||
#libx264="-c:v libx264"
|
||||
|
||||
#calf plugins
|
||||
#input_audio_filter="-af lv2=p=http\\\\://calf.sourceforge.net/plugins/Gate:c=threshold=0.04010706|knee=8|range=0.03148599, lv2=http\\\\://calf.sourceforge.net/plugins/Compressor:c=knee=8|threshold=0.125, lv2=http\\\\://calf.sourceforge.net/plugins/Limiter:c=level_out=0.71697748|limit=0.62763602"
|
||||
|
||||
#load normalization
|
||||
#output_audio_filter="-filter:a loudnorm"
|
||||
|
||||
ffmpeg -hide_banner -loglevel repeat+level+info ${hwaccel} -f v4l2 -framerate 30 -pix_fmt yuv420p -video_size 1920x1080 -i /dev/video7 -f alsa -thread_queue_size 24000000 -ar 44100 -i plughw:CARD=USB ${input_audio_filter} ${input_video_filter} -f mpegts ${h264_vaapi} ${libx264} -b:v 5500k -c:a aac -b:a 192k ${output_audio_filter} -ac 2 -ar 44100 -threads ${threads} -y ${srt_output}
|
||||
|
||||
CURRENTDATE=`date +"%Y-%m-%d %T"`
|
||||
echo End at ${CURRENTDATE}
|
||||
sleep 5
|
||||
done
|
||||
|
Loading…
Reference in a new issue