-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Socket Error #25
Comments
It means your OpenCV isn't configured correctly. I had similar errors and ended up building OpenCV from source and that worked. |
@Portscanner This seems more like you're connecting to the camera over SOCKS5 and cannot retrieve the frame you requested (hence the OpenCV error). Could you give me a more detailed description of your setup and maybe some code (where you are calling and using the reolink-api library). |
I have a Raspberry Pi 4 with a Coral-Accelerator attached. I followed the instructions below: Now I try to read the Camera Frames directly via the Reolink Camera: I can't get any further. |
It might be a versioning issue. Did you install the pypi package or import directly from github? |
That's a good point, I forgot my RTSP changes aren't in the released pypi package. |
Excellent, I'm getting a stream now. But there are many error messages. Login success EDIT: When I restart the Camera, there are no Errors |
@Portscanner These errors seem to be more related to the OpenCV VideoCapture method which is in use in our RTSP client https://github.com/Benehiko/ReolinkCameraAPI/blob/25ce2cbb555e046efa4b6aaa76a35add02bafff2/RtspClient.py#L36 There seems to be a thread on how to solve this. @themoosman I think we need to remove the imshow method here and return the frames in a non-blocking fashion so the user could do with it what they want. https://github.com/Benehiko/ReolinkCameraAPI/blob/25ce2cbb555e046efa4b6aaa76a35add02bafff2/RtspClient.py#L40 |
This might fix the stream errors in issue #25 Also refactored the code a bit since we do not want to display a window from within the API (offload to the person implementing it).
@themoosman I've updated the RTSP client with a non-blocking and blocking method (so the client can choose based on their config). The API should work on the camera and can be tested using the example file I made https://github.com/Benehiko/ReolinkCameraAPI/blob/dev/examples/streaming_video.py I tested it on a video file, but not sure if it will work on the camera stream. @Portscanner if you are daring enough, checkout the dev branch and use the API directly from github instead of pypi. I can update as you get issues. Will release to v0.0.5 once tested by @themoosman |
Hi, i get an Error when i start camera.py
`pi@raspberrypi:~/tflite/examples $ python3 mytest.py
Login success
Getting information [{'cmd': 'GetDevInfo', 'code': 0, 'value': {'DevInfo': {'B485': 0, 'IOInputNum': 0, 'IOOutputNum': 0, 'audioNum': 1, 'buildDay': 'build 20103104', 'cfgVer': 'v3.0.0.0', 'channelNum': 1, 'detail': 'IPC_51516M5MS10E1W31100000001', 'diskNum': 1, 'firmVer': 'v3.0.0.116_20103104', 'frameworkVer': 1, 'hardVer': 'IPC_51516M5M', 'model': 'RLC-511W', 'name': 'Pond', 'pakSuffix': 'pak,paks', 'serial': '00000000065536', 'type': 'IPC', 'wifi': 1}}}]
Error connecting to SOCKS5 proxy 127.0.0.1:8000: [Errno 111] Connection refused
Error connecting to SOCKS5 proxy 127.0.0.1:8000: [Errno 111] Connection refused
'NoneType' object has no attribute 'send'
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.7/site-packages/api/recording.py", line 44, in open_video_stream
rtsp_client.preview()
File "/home/pi/.local/lib/python3.7/site-packages/RtspClient.py", line 78, in preview
cv2.imshow(win_name, self.get_frame())
cv2.error: OpenCV(4.4.0) /tmp/pip-wheel-2l8ccy47/opencv-python/opencv/modules/highgui/src/window.cpp:376: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'imshow'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "mytest.py", line 5, in
c.open_video_stream()
File "/home/pi/.local/lib/python3.7/site-packages/api/recording.py", line 44, in open_video_stream
rtsp_client.preview()
File "/home/pi/.local/lib/python3.7/site-packages/RtspClient.py", line 34, in exit
self.sockt.close()
AttributeError: 'NoneType' object has no attribute 'close'
The text was updated successfully, but these errors were encountered: