
It is absolutely feasible if you do it the way I described above

It is absolutely feasible if you do it the way I described above

Because you’re right that decoding the QR codes definitely does seem too slow to do it in real time
I assumed this meant you wanted to do it in real-time, but perhaps I was mistaken.

Based on the real-time performance goal you have, a shell script calling external programs millions of times will have no chance.
You can do QR encode/decode of video data in real-time like you want, but it’s going to require (most likely) using a compiled language instead of an interpreted one, and also you’re going to need to buffer the video frames and/or QR codes in memory instead of via files on a (slow) disk.
The end result should be able to stream data directly from one format to another without creating any intermediate files at all.
Perhaps you can use some of that information to steer your AI.
Protest forks never last in my experience