Thank you. For the record, the main goal of using a shell script instead of a python script is maximum portability via the QR code itself. Instead of telling someone to scan a QR code and download hundreds of megabytes of python environment, all most users will have to download for my decoder is zbarimg (because everyone already has ffmpeg)
If I can get it working, anyway
For being not a coder, this is fairly ambitious. I've been coding software for thirty years and I'm not sure I can offer anything technical. Personally, I'd probably try to do this in Python rather than shell script. Shell script is fine if you have tools you're just trying to stitch together, but this is far beyond that.
That being said, I get it. The first coding I ever did was making a character sheet for roleplaying by sending raw commands to my dot matrix printer from my Commodore 64. You have a vision in your head and a computer at your fingertips and you have to bring it all together.
I respect that and if part of your goal is to achieve this using only bash, then god speed. Otherwise I might look at a language that gives you library support and modularity and unit testing. I write Python scripts all the time, and the truth is I don't know Python at all, so I know it can be done. Define a unit of functionality and build that piece. When that piece works build another component. Then build a parent program that calls those two things. Then build more components. Define functions that can be reused when you have code that needs to do similar things.
The key is to build standalone functionality — what is the smallest useful thing you can do? Build it. Now you can invoke that every time you need to do the thing. Construct your program out of components you create.
This is kinda like if I told AI to build me a web service but keep everything in a single Java class. It would be a wild and unreadable, untestable mess.
save