From 5a4a7dca98e3f805c8aee315553dbe20e1a649fd Mon Sep 17 00:00:00 2001 From: douzeb Date: Wed, 1 Mar 2023 21:34:29 +0100 Subject: [PATCH] W.I.P. --- stream_v4l_device.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stream_v4l_device.sh b/stream_v4l_device.sh index 3c0553f..969c544 100755 --- a/stream_v4l_device.sh +++ b/stream_v4l_device.sh @@ -56,7 +56,7 @@ then fi -FILENAME=live-v4l-${1}-cam${V4LDEVICE}-${RESOLUTION}p-${DURATION}s-${VBITRATE}kbps-${ABITRATE}kbps-${2}.mkv +FILENAME=live-v4l-${1}-cam${V4LDEVICE}-${RESOLUTION}p-${DURATION}s-${VBITRATE}kbps-${ABITRATE}kbps-${2} echo " " echo Will stream to $URL for $DURATION seconds echo and save a copy of the data sent to the peertube server to file : @@ -87,7 +87,7 @@ ffmpeg \ -channel_layout stereo \ -ar 48000 \ -pixel_format yuv420p \ --filter_complex "[1:a]volume=-10dB;[0:v]scale='size=${RESOLUTION}',drawtext='font=DejaVuSansMono:text=%{pts}: fontcolor=white: fontsize=h/7: box=1: boxcolor=black@0.43: boxborderw=5: x=mod(floor(t/10+1)\,2)*mod(t*(w-text_w)/10\,w-text_w)+mod(floor(t/10)\,2)*(w-text_w-mod(t*(w-text_w)/10\,w-text_w)): y=h/2-3*text_h/2', drawtext='font=DejaVuSansMono:text=%{localtime}: fontcolor=white: fontsize=h/7: box=1: boxcolor=black@0.43: boxborderw=5: x=(w-text_w)/2: y=h/2+3*text_h/2'" \ +-filter_complex "[1:a]volume=-10dB;[0:v]scale='size=${RESOLUTION}',drawtext='font=DejaVuSansMono:text=%{pts}: fontcolor=white: fontsize=h/12: box=1: boxcolor=black@0.43: boxborderw=5: x=mod(floor(t/10+1)\,2)*mod(t*(w-text_w)/10\,w-text_w)+mod(floor(t/10)\,2)*(w-text_w-mod(t*(w-text_w)/10\,w-text_w)): y=text_h/2', drawtext='font=DejaVuSansMono:text=%{localtime}: fontcolor=white: fontsize=h/20: box=1: boxcolor=black@0.43: boxborderw=5: x=text_h: y=h-3*text_h/2'" \ -codec:v libx264 \ -preset fast \ -x264opts nal-hrd=cbr:force-cfr=1:vbv-bufsize=${BUFFERSIZE}:bitrate=${VBITRATE}:vbv-maxrate=${VBITRATE} \ @@ -95,4 +95,4 @@ ffmpeg \ -g 1 -segment_format_options movflags=+frag_keyframe+empty_moov+default_base_moof -segment_time 5 -f segment \ -t ${DURATION} \ -flags +global_header \ --f tee -map 0:v -map 1:a "[f=matroska]${FILENAME}|[f=flv]${URL}" +-f tee -map 0:v -map 1:a "[f=matroska]${FILENAME}.mkv|[f=flv]${URL}"