Giter Site home page Giter Site logo

Socket Error about reolinkapipy HOT 8 CLOSED

reolinkcameraapi avatar reolinkcameraapi commented on July 20, 2024
Socket Error

from reolinkapipy.

Comments (8)

themoosman avatar themoosman commented on July 20, 2024

It means your OpenCV isn't configured correctly. I had similar errors and ended up building OpenCV from source and that worked.

from reolinkapipy.

Benehiko avatar Benehiko commented on July 20, 2024

@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).

from reolinkapipy.

 avatar commented on July 20, 2024

I have a Raspberry Pi 4 with a Coral-Accelerator attached. I followed the instructions below:
https://gilberttanner.com/blog/google-coral-usb-accelerator-introduction
and
https://github.com/pmcbride/coral-webcam-detection/blob/master/my_classify_capture.py
and
https://github.com/EdjeElectronics/TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi/blob/master/Raspberry_Pi_Guide.md

Now I try to read the Camera Frames directly via the Reolink Camera:
from Camera import Camera
c = Camera ("192.168.1.44", "admin", "123456")
print ("Getting information", c.get_information ())
c.open_video_stream ()

I can't get any further.

from reolinkapipy.

Benehiko avatar Benehiko commented on July 20, 2024

It might be a versioning issue. Did you install the pypi package or import directly from github?
I have now updated the pypi package to version 0.0.4 which should include the update @themoosman made to the rtsp streaming service.

from reolinkapipy.

themoosman avatar themoosman commented on July 20, 2024

It might be a versioning issue. Did you install the pypi package or import directly from github?
I have now updated the pypi package to version 0.0.4 which should include the update @themoosman made to the rtsp streaming service.

That's a good point, I forgot my RTSP changes aren't in the released pypi package.

from reolinkapipy.

 avatar commented on July 20, 2024

Excellent, I'm getting a stream now. But there are many error messages.

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}}}]
[h264 @ 0x1148450] error while decoding MB 128 116, bytestream -5
[h264 @ 0xea5d10] error while decoding MB 108 80, bytestream -5
[h264 @ 0xe20780] error while decoding MB 12 83, bytestream -5
[h264 @ 0x1148450] error while decoding MB 53 112, bytestream -7
[h264 @ 0xea5d10] error while decoding MB 14 113, bytestream -5
[h264 @ 0xe1ee30] error while decoding MB 9 111, bytestream -7
[h264 @ 0xe1ee30] error while decoding MB 28 107, bytestream -5
[h264 @ 0xe20780] error while decoding MB 11 85, bytestream -5
[h264 @ 0x1148450] left block unavailable for requested intra4x4 mode -1
[h264 @ 0x1148450] error while decoding MB 0 13, bytestream 19905
[h264 @ 0xe20780] error while decoding MB 126 85, bytestream -5
[h264 @ 0xe20780] error while decoding MB 67 55, bytestream -11
[h264 @ 0xea5d10] cabac decode of qscale diff failed at 47 119
[h264 @ 0xea5d10] error while decoding MB 47 119, bytestream 20347
[h264 @ 0xe1ee30] cabac decode of qscale diff failed at 156 55
[h264 @ 0xe1ee30] error while decoding MB 156 55, bytestream -5
[h264 @ 0x1148450] error while decoding MB 7 86, bytestream -5
[h264 @ 0x1148450] error while decoding MB 9 47, bytestream -15
[h264 @ 0xe20780] error while decoding MB 40 52, bytestream -5
[h264 @ 0x1148450] error while decoding MB 17 84, bytestream -5
[h264 @ 0xe1ee30] error while decoding MB 10 83, bytestream -5
[h264 @ 0xe20780] error while decoding MB 93 115, bytestream -5
etc......

EDIT: When I restart the Camera, there are no Errors

from reolinkapipy.

Benehiko avatar Benehiko commented on July 20, 2024

@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.
https://stackoverflow.com/questions/49233433/opencv-read-errorh264-0x8f915e0-error-while-decoding-mb-53-20-bytestream

@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

from reolinkapipy.

Benehiko avatar Benehiko commented on July 20, 2024

@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

from reolinkapipy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.