seydx / homebridge-camera-ui

Homebridge plugin for RTSP Cameras with HSV, motion detection support, Image Rekognition, Web UI to manage/watch streams and WebApp support
MIT License
648 stars 92 forks source link

Reolink-RLC 822A #409

Closed agsenna closed 2 years ago

agsenna commented 2 years ago

hi there,

i use this code for the Reolink Camera and the "stillImageSource" after i changed from http// to https// the stllimage works perfekt but the rest doesn't (see the code at the end).

i get this error message

24/01/2022, 22:08:35] [CameraUI] CAMERA NAME: FFmpeg exited with code: 1 and signal: null - [tcp @ 0x322cac0] [error] Connection to tcp://192.168.181.94:554?timeout=0 failed: Connection refused - [error] rtsp://USER:XXX@192.168.181.94:554/h264Preview_01_main: Connection refused [24/01/2022, 22:08:35] [CameraUI] CAMERA NAME: Stopped video stream.

and here is the code:

"name": "CAMERA NAME", "motion": true, "motionTimeout": 15, "unbridge": true, "hsv": true, "prebuffering": true, "prebufferLength": 4, "videoConfig": { "source": "-rtsp_transport tcp -re -i rtsp://USER:XXX@192.168.181.94:554/h264Preview_01_main", "subSource": "-rtsp_transport tcp -re -i rtsp://USER:XXX@192.168.181.94:554/h264Preview_01_main", "stillImageSource": "-i https://192.168.181.94/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=wuuPhkmUCeI9WG7C&user=XXX&password=XXX", "maxStreams": 2, "vcodec": "copy", "acodec": "libfdk_aac", "audio": false }, "smtp": { "email": "CAMERA NAME" }, "videoanalysis": { "active": true }, "mqtt": {}

thank you in advance georgios

iGranDav commented 2 years ago

Hi,

As a RLC 822A owner I can help 🙂 this camera is a 4K one so the main stream doesn't support h264 but h265. Since camera UI currently only support rtsp over h264 here is the configuration you need to apply in your videoConfig:

"videoConfig": {
    "source": "-i rtsp://user:password@192.168.181.94:554/h264Preview_01_sub",
    "subSource": "-i rtsp://user:password@192.168.181.94:554/h264Preview_01_sub",
    "stillImageSource": "-i  https://192.168.181.94/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=wuuPhkmUCeI9WG7C&user=XXX&password=XXX",
    "rtspTransport": "tcp",
    "maxStreams": 2,
    "vcodec": "copy",
    "acodec": "libfdk_aac",
    "stimeout": 10,
    "audio": false
}
seydx commented 2 years ago

Please adopt the config as described above

agsenna commented 2 years ago

i've done it but still doesn't work. i'm gonna try something else and i will come back to you. thank you georgios

iGranDav commented 2 years ago

If you have the latest firmware version v3.1.0.764_21121707 or above (for users in the future) you need to enable RTSP.

Simplest way is to use the web interface using https https://<your camera ip address> then:

I had this issue yesterday after updating my cameras 🙂

agsenna commented 2 years ago

THANK YOU!!! it's working you are great!

georgios_