some bugfixes

This commit is contained in:
mmaster 2021-09-23 22:53:00 +02:00
parent 3e5969856a
commit ca4883916f
2 changed files with 10 additions and 8 deletions

9
vars
View File

@ -6,9 +6,6 @@ playerpackage=vlc
randomsh=randomvideo.sh randomsh=randomvideo.sh
pingserver=raspbian.raspberrypi.org pingserver=raspbian.raspberrypi.org
usbdevice=sda1 usbdevice=sda1
camparamr=random
camparam1=birdcam1
camparam2=birdcam2
# automount.sh # automount.sh
mountpoint=/media/video mountpoint=/media/video
@ -25,6 +22,9 @@ camerash=/home/pi/birdcam/view_birdcam.sh
buttonpolling=0.05 buttonpolling=0.05
buttontimeout=1 buttontimeout=1
countermax=1200 countermax=1200
camparamr=random
camparam1=birdcam1
camparam2=birdcam2
# randomvideo.sh # randomvideo.sh
folderext=/media/video/video folderext=/media/video/video
@ -32,5 +32,6 @@ folderint=/home/pi/birdcam/video
# view_birdcam.sh # view_birdcam.sh
cameralist=/home/pi/birdcam/conf/cameralist.txt cameralist=/home/pi/birdcam/conf/cameralist.txt
streamurl=rtsp://$1:554/user=admin&password=&channel=1&stream=0.sdp?real_stream
randompathsh=/home/pi/birdcam/randomvideo.sh randompathsh=/home/pi/birdcam/randomvideo.sh
#streamurl=rtsp://$1:554/user=admin&password=&channel=1&stream=0.sdp?real_stream - Please set local in file view_birdcam.sh!

View File

@ -34,7 +34,6 @@ fi
cameralist="$(cat $vars | grep cameralist | cut -d'=' -f2)" cameralist="$(cat $vars | grep cameralist | cut -d'=' -f2)"
playerproc="$(cat $vars | grep playerproc | cut -d'=' -f2)" playerproc="$(cat $vars | grep playerproc | cut -d'=' -f2)"
playerparam="$(cat $vars | grep playerparam | cut -d'=' -f2)" playerparam="$(cat $vars | grep playerparam | cut -d'=' -f2)"
streamurl="rtsp://$1:554/user=admin&password=&channel=1&stream=0.sdp?real_stream"
randomvideosh="$(cat $vars | grep randompathsh | cut -d'=' -f2)" randomvideosh="$(cat $vars | grep randompathsh | cut -d'=' -f2)"
randomvideoproc="$(cat $vars | grep randomsh | cut -d'=' -f2)" randomvideoproc="$(cat $vars | grep randomsh | cut -d'=' -f2)"
@ -47,15 +46,17 @@ if [ -n "$(pgrep $randomvideoproc)" ]; then
pkill $randomvideoproc pkill $randomvideoproc
fi fi
if [ "$1" = "$(cat $vars | grep camparamr | cut -d'=' -f2)" ]; then if [ "$1" = "random" ]; then
$randomvideosh $randomvideosh
exit 0 exit 0
fi fi
if [ "$1" = "$(cat $vars | grep camparam1 | cut -d'=' -f2)" ]; then streamurl="rtsp://$1:554/user=admin&password=&channel=1&stream=0.sdp?real_stream"
if [ "$1" = "birdcam1" ]; then
$player_path $playerparam "$streamurl" $player_path $playerparam "$streamurl"
elif [ "$1" = "$(cat $vars | grep camparam2 | cut -d'=' -f2)" ]; then elif [ "$1" = "birdcam2" ]; then
$player_path $playerparam "$streamurl" $player_path $playerparam "$streamurl"
else else