Skip to content

Instantly share code, notes, and snippets.

@chezsick
Last active March 12, 2018 10:08
Show Gist options
  • Save chezsick/21800182677e9f38da18a8fc83068ad9 to your computer and use it in GitHub Desktop.
Save chezsick/21800182677e9f38da18a8fc83068ad9 to your computer and use it in GitHub Desktop.
This Is Encode/Decode The Data In Video Using x264 For Encode, Using Standard Input/Output
t=$(mktemp -d)
ffmpeg -f h264 -i pipe:0 $t/%8d.png
for n in $(ls $t)
do
zbarimg --quiet --raw $t/$n | base58 -d
done
rm -r $t
t=$(mktemp -d)
split -d -a 8 -b 256 - $t/base
for h in $(ls $t)
do
base58 $t/$h | qrencode -v 16 -o - | convert -size 768x576 -gravity center xc:gray - -composite $t/$h.png
done
x264 --fps 10 -o - $t/base%8d.png
rm -r $t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment