adding video decoder

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

12
Decoder/extractVideo.sh Executable file
View File

@@ -0,0 +1,12 @@
#/bin/bash
echo extracting frames
ffmpeg -loglevel 24 -stats -i input.mp4 /tmp/$$.out%05d.png
echo done, processing frames
ls /tmp/$$.out*.png | while read f;do
dta=$(zbarimg -q --raw --nodbus ${f})
chunkNum=${dta/|*/}
chunkData=${dta/*|/}
echo from ${f} received: ${chunkNum}
echo $chunkData | base64 -d > chunks/${chunkNum}.chunk
done