I have 10 different IP cameras that I need to access in a FLASK server. I would like to know the best way to do that.
Currently, I have a dictionary that uses an ID to map to a VideoCapture object. A client sends the cam ID to the server and the server accesses the video capture object and returns a captured frame via the read function.
So technically I have 10 different objects of VideoCapture. Another method that I have used is, that upon getting camera ID, if the current cam ID is different from the received cam ID, then the video cap object is replaced with a new one.
My question is that is opening 10 video captures at one time fine? My server should be time sensitive. Does opening 10 captures congest the network? If yes then should I stick to the one object approach that always creates a new object on ID change or is there any better way to do this? Thank you.