creation of chunks directory if it doesn't exist and rename the webcam receiver to have a clearar name

This commit is contained in:
Joe Tretter
2022-09-06 11:12:10 -05:00
parent d65d1800c9
commit f8de654574
2 changed files with 2 additions and 0 deletions

12
Decoder/webcamReceiver.sh Executable file
View File

@@ -0,0 +1,12 @@
#/bin/bash
mkdir -p chunks
while /bin/true;do
fswebcam -q -r 800x800 a.png
#dta=$(fswebcam -q -r 1280x720 - | zbarimg -q --raw --nodbus -)
dta=$(zbarimg -q --raw --nodbus a.png)
chunkNum=${dta/|*/}
chunkData=${dta/*|/}
echo received: ${chunkNum}
echo $chunkData | base64 -d > chunks/${chunkNum}.chunk
done