Closed NguyenDucQuan12 closed 5 months ago
Thanks for opening this issue, a maintainer will get back to you shortly!
@NguyenDucQuan12 It is a bad Idea to put multi-threading over a already multi-threaded API like NetGear. It is not connecting because that thread is still be running in the background as zombie process, since you used self.thread.daemon = True
. The zombie process might be holding the address already 172.31.99.35
causing it to fail when trying to connect. Hope this helps.
@NguyenDucQuan12 Also, 172.31.99.35
is IP address of server or client machine? You need to put IP address of machine running NetGear with recieve_mode=True
on both server and client. See if that is true or not.
@abhiTronix That is the ip address of the machine without an ip camera. If I don't use multithreading, the frames lag, the fps is only 8 while the camera has a fps configuration of 25, (1920x1080)
@NguyenDucQuan12 Don't use OpenCV then, use CamGear or VideoGear instead like official examples does, which essentially does same multi-threading you're doing and in much safer way. Also if you want to auto reconnect then see this example: https://abhitronix.github.io/vidgear/v0.3.2-stable/help/videogear_ex/#using-videogear-for-capturing-rtsprtmp-urls
@abhiTronix Please let me know if there are device hardware requirements. I am currently able to stream images from the camera to another computer device, but the latency problem is very large, do you think I should use vidgear, camgear or netgear for better results. I am familiar with opencv, should I switch to using videogear?
Issue guidelines
Issue Checklist
Describe your Question
If I run the netgear tutorial with cv2 it works great, but the lag is huge so I tested the new thread for reading frames and it improved the camera lag significantly. However, when I run the code again it fails to connect to the server and client. I don't know why, after the first successful run I didn't edit my code but the error still appeared.
Terminal log output(Optional)
Python Code(Optional)
VidGear Version
0.3.2
Python version
3.11.8
Operating System version
window 10 pro
Any other Relevant Information?