mirror of
https://github.com/datarhei/restreamer.git
synced 2025-12-11 22:14:02 +01:00
ADD v0.1.0-rc.7
This commit is contained in:
31
run.sh
31
run.sh
@@ -15,7 +15,36 @@ then
|
||||
sleep 5
|
||||
fi
|
||||
done
|
||||
/opt/vc/bin/raspivid -t 0 -w 1280 -h 720 -fps 25 -b 500000 -o - | ffmpeg -i - -f lavfi -i aevalsrc=0 -vcodec copy -acodec aac -strict experimental -map 0:0 -map 1:0 -shortest -flags +global_header -f flv rtmp://127.0.0.1:1935/live/raspicam.stream > /dev/null 2>&1
|
||||
|
||||
if [ "$RS_RASPICAM_WIDTH" = "" ]
|
||||
then
|
||||
RASPICAM_WIDTH=1280
|
||||
else
|
||||
RASPICAM_WIDTH=$RS_RASPICAM_WIDTH
|
||||
fi
|
||||
|
||||
if [ "$RS_RASPICAM_HEIGHT" = "" ]
|
||||
then
|
||||
RASPICAM_HEIGHT=720
|
||||
else
|
||||
RASPICAM_HEIGHT=$RS_RASPICAM_HEIGHT
|
||||
fi
|
||||
|
||||
if [ "$RS_RASPICAM_FPS" = "" ]
|
||||
then
|
||||
RASPICAM_FPS=25
|
||||
else
|
||||
RASPICAM_FPS=$RS_RASPICAM_FPS
|
||||
fi
|
||||
|
||||
if [ "$RS_RASPICAM_BITRATE" = "" ]
|
||||
then
|
||||
RASPICAM_BITRATE=50000
|
||||
else
|
||||
RASPICAM_BITRATE=$RS_RASPICAM_BITRATE
|
||||
fi
|
||||
|
||||
/opt/vc/bin/raspivid -t 0 -w $RASPICAM_WIDTH -h $RASPICAM_HEIGHT -fps $RASPICAM_FPS -b $RASPICAM_BITRATE -o - | ffmpeg -i - -f lavfi -i aevalsrc=0 -vcodec copy -acodec aac -strict experimental -map 0:0 -map 1:0 -shortest -flags +global_header -f flv rtmp://127.0.0.1:1935/live/raspicam.stream > /dev/null 2>&1
|
||||
elif [ "${MODE}" == "USBCAM" ];
|
||||
then
|
||||
apt-get update && apt-get install -y v4l-utils libv4l-0
|
||||
|
||||
Reference in New Issue
Block a user