From c62c28ef72345c95c3d52c9bfc5292ea61adb1be Mon Sep 17 00:00:00 2001 From: starcalc Date: Thu, 3 Oct 2019 20:50:13 +0200 Subject: [PATCH] =?UTF-8?q?Weitere=20Skripte,=20m=C3=BCssen=20zur=20lokale?= =?UTF-8?q?n=20Verwendung=20angepasst=20werden.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/janeway.sh | 6 ++++++ tools/movie.sh | 15 +++++++++++++++ tools/startrek8x8.png | Bin 0 -> 2320 bytes tools/webcam.sh | 26 ++++++++++++++++++++++++++ 4 files changed, 47 insertions(+) create mode 100755 tools/janeway.sh create mode 100755 tools/movie.sh create mode 100644 tools/startrek8x8.png create mode 100755 tools/webcam.sh diff --git a/tools/janeway.sh b/tools/janeway.sh new file mode 100755 index 0000000..7cbb78a --- /dev/null +++ b/tools/janeway.sh @@ -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 + diff --git a/tools/movie.sh b/tools/movie.sh new file mode 100755 index 0000000..a8859a5 --- /dev/null +++ b/tools/movie.sh @@ -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 + diff --git a/tools/startrek8x8.png b/tools/startrek8x8.png new file mode 100644 index 0000000000000000000000000000000000000000..c9c91560e42ad6940c87b4309e1b1c4d85d14fe7 GIT binary patch literal 2320 zcmV+r3GeoaP)e zSad^gZEa<4bO1wgWnpw>WFU8GbZ8()Nlj2!fese{00?+VL_t(|+U=ZeOdQ7@#vg-A z&W2Ogxhpl4^wwA;;Im?s_!_L{>T8_Kiy~55l}Jtf!4jmd6uH?(C8=svwNw?iw(8=x zR_cUQe4sehRkq_q3WU~yLfT7l59->0d;~AD4K!ZVwRtJ$^3o4@=VtZ=_Kq{=qvyAkC25j0Fc4HzqFn?(n^(Qsi5VFyO<-_B7xI%rKg%XnkiMD zr2?p*eO#>8h@v=8R|tYY&WnnQ003QGU0BNF)jgx=C)=?lo>g}G=h8jn_QBCtThy~i zn<<-ns>zGRk^T3=U-2iyjCi+UdqN&7{p#>{up>}qX#4)@U+@4`_GJc}tw>XJ(GVyB-_D1>KxE{spj!nr;Z<5RQ9+Y)3v`*Mc> z0NH{Ilj<0<1s8sHDQD4Z>95n;+6n;p;rG7HzJ*`7d^>Q|=6NyVkt&Z>(2{NY>ep`} z6au)a?;By=-Wkcll^S{m?<1ip^mvHfQLwG)qB;nhn1&iAi+~0B#?14BnQe z!vKJP^o`(=l04L(`a20)Fc`!)o_i7iFf%G4 z`{p~$(M+9(9%GJXTB;xC`bP3C8QVG@2}64`V+D(of&xQg&I;93gE9+)8K&GIy!79EDAvifUZG+axYahm8E=P6v+)Bf?y z2P`?UA{I2+u=3F4BoS%?0Fz@wO!*7>ZgM^r%U-g**Bdfy;5EH|tkSk;=gyr7hr=i< zD}$maaJ${4+}_>}0JwhrI@;RW5C{Yy%Q6H(z{ZUm7iOW;X`2K^qft`#^H;wG066@+ z768D84I2Oeecc_ns!Wsif*?SaW#s1ySaSfFHzgv}fE$8h;?W0}P!k)-%5~2qQ_gkA zf6=~c|66*QG#M!U_3e1PUM~rj+wF#;C?tp%FJ2_i9&I2+QG~u!(} zyVT+i=A0~-y4WEeBb#1kUjOxFJN?kxfjdo3$ewcRCJS=1N^(x_G&!-_%O%=RD#(cz zG%IpK@8kCFt0CwsPEN22a!!^>UDB1DXhAb0Cz|%|tHJSKAI8&5ho|fkP~`o zTWNAa%Ro-7cKNn)PHd0~JLDu$YGRk#*zs7AlUOW90v8Ab$R5s&n%E^x8ac6|CVFy0 zQxoqtAJ!Z=fO-9Z$MZd`agp9*hfLTZCy7!MyVS;x$BLY2xQiwyG&PZB8Np!Ca3fk# z6YcvfMorAfiAGJl+kD8VsxYR|4ay>lgm`^bMKu~4MDlq>Dn&&_1>@0^lSJr=89A{_ zP0YxNo|>4E6FoJtA}5c!S{aWk{Z zw49TsVT8jDIGyDkLoX{Scn$YAV zGcyyjv$LqLuQ&9gkrTQfnwrq$qoK{4|zC+CDKiKS9cPW047PfpCJi5WRbB zmlp?XS3c*2D~Y9&lM_x(xbDUV{I2Jma3vAARg!bUmEcmj8vf4-*D{`QtKt8ga3w)b ztjLI+oRbef9cMg_`~q^mV}>u6DSyUIc#4^dnfwAY?%j>u#~V>}d%*2@a)$cZ;NBP| z^aPxqq<*RFK3ZU?+Ns^O+zy1Yt|GtV{ z50#+5&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