I noticed that no other samples of OpenCV VideoWriter online really go into multithreading nor, more importantly, do they adequately solve for smooth video playback speeds.
More often than not, they don't deal with write-to-disk time AND they put the reading and writing in the same thread as each other and as the same thread as main. This can effect playback speed.
However, before I post it here, I just wanted to lay this out as a proposal to you of some additional classes for your Computer-Vision/Multithread project:
VideoWrite.py - Similar to VideoShow.py and VideoGet.py, which could be used to measure the effects of multi-threading on video writing.
VideoConvert.py - Again, similar, but doing cvtColor (generally, VideoConvert would be an interesting place to show that you can thread any frame manipulations, such as cvtColor, flip, resize, putText/Rectangle/etc., color mapping, etc, etc etc)
If you're interested, at least, in the VideoWrite code I wrote, let me know. I can attach it here and you can morph it to your liking.
I noticed that no other samples of OpenCV VideoWriter online really go into multithreading nor, more importantly, do they adequately solve for smooth video playback speeds.
More often than not, they don't deal with write-to-disk time AND they put the reading and writing in the same thread as each other and as the same thread as main. This can effect playback speed.
I wrote a simple version based off of the examples here: https://github.com/codingforentrepreneurs/OpenCV-Python-Series/blob/master/src/lessons/record-video.py which is referenced in the blog post here: https://www.codingforentrepreneurs.com/blog/how-to-record-video-in-opencv-python
However, before I post it here, I just wanted to lay this out as a proposal to you of some additional classes for your Computer-Vision/Multithread project: VideoWrite.py - Similar to VideoShow.py and VideoGet.py, which could be used to measure the effects of multi-threading on video writing. VideoConvert.py - Again, similar, but doing cvtColor (generally, VideoConvert would be an interesting place to show that you can thread any frame manipulations, such as cvtColor, flip, resize, putText/Rectangle/etc., color mapping, etc, etc etc)
If you're interested, at least, in the VideoWrite code I wrote, let me know. I can attach it here and you can morph it to your liking.