Load videos into memory and play random frames

Hello and good day!

I’d like to know if anyone can point me to some code that would make this at a good performance.

Load (say 3 or 5) videos into memory and play a random frame each 50ms.

Thanks in advance

Hi @kashik001,

Since random frames would just be images anyway, maybe consider converting them to image sequences? It might be better performance. For 50ms per frame, maybe just set your frame rate to 20 (ofSetFrameRate(20)) which would be 50 ms per frame.

Image sequences can be easily generated using ffmpeg: ffmpeg -i input.mp4 -vf fps=25 out%03d.png

And perhaps using this tool: https://github.com/thomasgeissl/ofxImageSequencePlayer