Weitere Skripte, müssen zur lokalen Verwendung angepasst werden.
This commit is contained in:
parent
91a8cc9190
commit
c62c28ef72
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
while true
|
||||
do
|
||||
for i in $(seq 0 9 20); do ./udp8icon.sh stratrek8x8.png ${i} 10; sleep 0.2; done
|
||||
done
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
input=$1
|
||||
FULLSECONDS="$(ffprobe -i "${input}" -show_entries format=duration -v quiet -of csv="p=0" | sed 's/\..*//')"
|
||||
echo "Seeking ${FULLSECONDS} seconds"
|
||||
for i in $(seq 0 ${FULLSECONDS})
|
||||
do
|
||||
# ffmpeg -y -ss ${i} -i "${input}" -r 1 -vframes 1 -vf scale=8:8 -f image2pipe - 2>/dev/null | convert - -rotate 90 -normalize rgb:- >/dev/udp/172.23.23.54/4210
|
||||
ffmpeg -y -ss ${i} -i "${input}" -r 1 -vframes 1 -f image2 /tmp/movieimg.jpg 2>/dev/null
|
||||
clear; jp2a /tmp/movieimg.jpg
|
||||
ffmpeg -y -ss ${i} -i "${input}" -r 1 -vframes 1 -vf scale=8:8 -f image2 /tmp/movieimg.png 2>/dev/null
|
||||
# convert /tmp/movieimg.png -rotate 90 -normalize rgb:- >/dev/udp/172.23.23.54/4210
|
||||
convert /tmp/movieimg.png -rotate 90 rgb:- >/dev/udp/172.23.23.54/4210
|
||||
sleep 1
|
||||
done
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
CURRENTWIFI=$(iwconfig 2>&1 | grep ESSID | grep \" | sed 's/.*:"\(.*\)"/\1/')
|
||||
if [ ${#CURRENTWIFI} -eq 0 ]; then
|
||||
echo "You have to be in the CTDO-IoT-WiFi for this to work. You're not connected at all."
|
||||
exit 0
|
||||
fi
|
||||
if [ ${CURRENTWIFI} != "CTDO-IoT" ]; then
|
||||
echo "You have to be in the CTDO-IoT-WiFi for this to work"
|
||||
exit 0
|
||||
fi
|
||||
PIXELBOXIP=$(mosquitto_sub -h raum.ctdo.de -t 'homie/pixelbox/$localip' -C 1)
|
||||
echo "Pixelbox should be on ${PIXELBOXIP}, presuming WiFi connection."
|
||||
|
||||
ping -c 1 -s 1 -W 1 ${PIXELBOXIP} 1>/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Pixelbox replies, starting webcam."
|
||||
else
|
||||
echo "The Pixelbox with IP ${PIXELBOXIP} is unreachable."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
while true
|
||||
do
|
||||
ffmpeg -y -f video4linux2 -i /dev/video0 -vframes 1 -vf scale=8:8 -f image2 - 2>/dev/null | convert - -rotate 90 -normalize rgb:- >/dev/udp/${PIXELBOXIP}/4210
|
||||
sleep 0.1
|
||||
done
|
Loading…
Reference in New Issue