Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Connect several cameras openCV python

Hi,

I want to connect to 30 cameras at the same time in my python program. If I execute 30 times a simple python script which connects to a rtsp camera and do .read(), I have no problem.

But, if I create 30 threads in my python program, some thread as delay and then crash. It is because of python GIL and my processor core is not to fast to deal all the thread sequentially ...

So I don't know how to deal with it... May be I could use multiprocessing but how can I share and image between my processus. Or use C++ ?

Connect several cameras openCV python

Hi,

I want to connect to 30 cameras at the same time in my python program. If I execute 30 times a simple python script which connects to a rtsp camera and do .read(), I have no problem.

But, if I create 30 threads in my python program, some thread as delay and then crash. It is because of python GIL and my processor core is not to fast to deal all the thread sequentially ...

So I don't know how to deal with it... May be I could use multiprocessing but how can I share and image between my processus. Or use C++ ?