This commit is contained in:
douzeb 2023-03-01 14:54:15 +01:00
parent db735c852f
commit 5d8848eb96

View file

@ -5,6 +5,7 @@ RESOLUTION=1280x720
VBITRATE=2048 VBITRATE=2048
ABITRATE=128 ABITRATE=128
V4LDEVICE=0 V4LDEVICE=0
FPS=12
if [[ $# -lt 3 ]] ; then if [[ $# -lt 3 ]] ; then
echo "Not enough arguments supplied" >&2 echo "Not enough arguments supplied" >&2
@ -12,11 +13,11 @@ if [[ $# -lt 3 ]] ; then
echo "first parameter the rtmp port as the second and the streaming key as the third" >&2 echo "first parameter the rtmp port as the second and the streaming key as the third" >&2
echo " " >&2 echo " " >&2
echo "syntax: " >&2 echo "syntax: " >&2
echo " $(basename $0) <peertube-server> <rtmp port> <streaming-key> <duration-in-sec> <resolution> <video-bitrate-kbps> <audio-bitrate-kbps> <v4ldevice>" >&2 echo " $(basename $0) <peertube-server> <rtmp port> <streaming-key> <duration-in-sec> <resolution> <video-bitrate-kbps> <audio-bitrate-kbps> <v4ldevice> <frames per seconds>" >&2
echo " " >&2 echo " " >&2
echo "other parameters are optional and will default to the " >&2 echo "other parameters are optional and will default to the " >&2
echo "values in the following example :" >&2 echo "values in the following example :" >&2
echo " `basename $0` tube.example.com 1935 69ac2d29-eba4-4d5f-a3a6-6047e6768ffb $DURATION $RESOLUTION $VBITRATE $ABITRATE $V4LDEVICE" >&2 echo " `basename $0` tube.example.com 1935 69ac2d29-eba4-4d5f-a3a6-6047e6768ffb $DURATION $RESOLUTION $VBITRATE $ABITRATE $V4LDEVICE $FPS" >&2
exit 1 exit 1
fi fi
@ -49,6 +50,11 @@ then
V4LDEVICE="$8" V4LDEVICE="$8"
fi fi
if [[ ! -z "$9" ]]
then
FPS="$9"
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}.mkv
echo " " echo " "