erik When I do ctrl+c the script doesn't end since it never gets to the "except KeyboardInterrupt:" clause. I have to issue a kill -TERM on the process. The console log just has:
$ python3 rgb_encoding.py
C C
After doing the kill -TERM I end up with a zero byte video.h265 file since nothing ever gets written to it. This only happens on the Raspberry Pi. Everything works properly on my Macbook.