roflcoopter / viseron

Self-hosted, local only NVR and AI Computer Vision software. With features such as object detection, motion detection, face recognition and more, it gives you the power to keep an eye on your home, office or any other place you want to monitor.
MIT License
1.5k stars 154 forks source link

Failed connection to rstp. #756

Closed GMagician closed 1 month ago

GMagician commented 1 month ago

It could be a configuration issue but connection with vlc works, using another nvr and same path works, it seems that only viseron has this issue.

P.S. I added width, height, fps and other because I had ffprobe errors (even this works ok on other NVR)

here my config:

ffmpeg:
  camera:
    camera_1:
      name: Retro
      host: 192.168.0.114
      port: 554
      path: /0
      username: !secret username
      password: !secret password
      protocol: rtsp
      stream_format: rtsp
      width: 1944
      height: 2592
      fps: 25
      codec: h264
      audio_codec: null

darknet:
  object_detector:
    cameras:
      camera_1:
        fps: 1
        scan_on_motion_only: false
        labels:
          - label: person
            confidence: 0.75
            trigger_recorder: true

nvr:
  camera_1:

here the log

viseron  | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
viseron  | [s6-init] ensuring user provided files have correct perms...exited 0.
viseron  | [fix-attrs.d] applying ownership & permissions fixes...
viseron  | [fix-attrs.d] done.
viseron  | [cont-init.d] executing container initialization scripts...
viseron  | [cont-init.d] 10-adduser: executing... 
viseron  | ************************ UID/GID *************************
viseron  | User uid:    1000
viseron  | User gid:    1000
viseron  | ************************** Done **************************
viseron  | [cont-init.d] 10-adduser: exited 0.
viseron  | [cont-init.d] 20-gid-video-device: executing... 
viseron  | [cont-init.d] 20-gid-video-device: exited 0.
viseron  | [cont-init.d] 30-edgetpu-permission: executing... 
viseron  | ************** Setting EdgeTPU permissions ***************
viseron  | Coral Vendor IDs:
viseron  | "1a6e"
viseron  | "18d1"
viseron  | No EdgeTPU USB device was found
viseron  | No EdgeTPU PCI device was found
viseron  | ************************** Done **************************
viseron  | [cont-init.d] 30-edgetpu-permission: exited 0.
viseron  | [cont-init.d] 40-set-env-vars: executing... 
viseron  | ****** Checking for hardware acceleration platforms ******
viseron  | OpenCL cannot be used
viseron  | VA-API cannot be used
viseron  | CUDA cannot be used
viseron  | *********************** Done *****************************
viseron  | [cont-init.d] 40-set-env-vars: exited 0.
viseron  | [cont-init.d] 50-check-if-rpi: executing... 
viseron  | ********** Checking if we are running on an RPi **********
viseron  | Not running on any supported RPi
viseron  | *********************** Done *****************************
viseron  | [cont-init.d] 50-check-if-rpi: exited 0.
viseron  | [cont-init.d] 55-check-if-jetson: executing... 
viseron  | ****** Checking if we are running on a Jetson Board ******
viseron  | Not running on any supported Jetson board
viseron  | *********************** Done *****************************
viseron  | [cont-init.d] 55-check-if-jetson: exited 0.
viseron  | [cont-init.d] 60-ffmpeg-path: executing... 
viseron  | ****************** Getting FFmpeg path *******************
viseron  | FFmpeg path: /home/abc/bin/ffmpeg
viseron  | *********************** Done *****************************
viseron  | [cont-init.d] 60-ffmpeg-path: exited 0.
viseron  | [cont-init.d] 70-gstreamer-path: executing... 
viseron  | ***************** Getting GStreamer path *****************
viseron  | GStreamer path: /usr/bin/gst-launch-1.0
viseron  | *********************** Done *****************************
viseron  | [cont-init.d] 70-gstreamer-path: exited 0.
viseron  | [cont-init.d] done.
viseron  | [services.d] starting services
viseron  | [services.d] done.
viseron  | [2024-05-19 22:42:33] [INFO    ] [viseron.core] - -------------------------------------------
viseron  | [2024-05-19 22:42:33] [INFO    ] [viseron.core] - Initializing Viseron
viseron  | [2024-05-19 22:42:33] [INFO    ] [viseron.components] - Setting up component data_stream
viseron  | [2024-05-19 22:42:33] [INFO    ] [viseron.components] - Setup of component data_stream took 0.0 seconds
viseron  | [2024-05-19 22:42:33] [INFO    ] [viseron.components] - Setting up component webserver
viseron  | [2024-05-19 22:42:33] [INFO    ] [viseron.components] - Setup of component webserver took 0.0 seconds
viseron  | [2024-05-19 22:42:33] [INFO    ] [viseron.components] - Setting up component ffmpeg
viseron  | [2024-05-19 22:42:33] [INFO    ] [viseron.components] - Setting up component darknet
viseron  | [2024-05-19 22:42:33] [INFO    ] [viseron.components] - Setting up component nvr
viseron  | [2024-05-19 22:42:33] [INFO    ] [viseron.components] - Setup of component nvr took 0.0 seconds
viseron  | [2024-05-19 22:42:33] [INFO    ] [viseron.components] - Setup of component ffmpeg took 0.0 seconds
viseron  | [2024-05-19 22:42:33] [INFO    ] [viseron.components] - Setup of component darknet took 0.1 seconds
viseron  | [2024-05-19 22:42:34] [INFO    ] [viseron.components] - Setting up domain camera for component ffmpeg with identifier camera_1
viseron  | [2024-05-19 22:42:34] [INFO    ] [viseron.components] - Setting up domain object_detector for component darknet with identifier camera_1
viseron  | [2024-05-19 22:42:34] [INFO    ] [viseron.components] - Setting up domain nvr for component nvr with identifier camera_1
viseron  | [2024-05-19 22:42:34] [INFO    ] [viseron.components] - Setup of domain camera for component ffmpeg with identifier camera_1 took 0.0 seconds
viseron  | [2024-05-19 22:42:34] [INFO    ] [viseron.components] - Setup of domain object_detector for component darknet with identifier camera_1 took 0.0 seconds
viseron  | [2024-05-19 22:42:34] [INFO    ] [viseron.components.nvr.nvr.camera_1] - Motion detector is disabled
viseron  | [2024-05-19 22:42:34] [INFO    ] [viseron.components.nvr.nvr.camera_1] - NVR for camera Retro initialized
viseron  | [2024-05-19 22:42:34] [INFO    ] [viseron.components] - Setup of domain nvr for component nvr with identifier camera_1 took 0.0 seconds
viseron  | [2024-05-19 22:42:34] [INFO    ] [viseron.core] - Viseron initialized in 0.6 seconds
viseron  | [2024-05-19 22:42:34] [ERROR   ] [viseron.components.ffmpeg.stream.camera_1] - [tcp @ 0x55d5f62e1cc0] Connection to tcp://:554?timeout=5000000 failed: Connection refused
viseron  | [2024-05-19 22:42:34] [ERROR   ] [viseron.components.ffmpeg.stream.camera_1] - rtsp://*****:*****@192.168.0.114:554/0: Connection refused
viseron  | [2024-05-19 22:42:34] [ERROR   ] [viseron.components.ffmpeg.camera.camera_1] - Frame reader process has exited
viseron  | [2024-05-19 22:42:39] [ERROR   ] [viseron.components.ffmpeg.camera.camera_1] - Restarting frame pipe
viseron  | [2024-05-19 22:42:39] [ERROR   ] [viseron.components.ffmpeg.stream.camera_1] - [tcp @ 0x556331154cc0] Connection to tcp://:554?timeout=5000000 failed: Connection refused
viseron  | [2024-05-19 22:42:39] [ERROR   ] [viseron.components.ffmpeg.stream.camera_1] - rtsp://*****:*****@192.168.0.114:554/0: Connection refused
viseron  | [2024-05-19 22:42:39] [ERROR   ] [viseron.components.ffmpeg.camera.camera_1] - Frame reader process has exited
viseron  | [2024-05-19 22:42:44] [ERROR   ] [viseron.components.ffmpeg.camera.camera_1] - Restarting frame pipe
viseron  | [2024-05-19 22:42:44] [ERROR   ] [viseron.components.ffmpeg.stream.camera_1] - [tcp @ 0x562c69335cc0] Connection to tcp://:554?timeout=5000000 failed: Connection refused
viseron  | [2024-05-19 22:42:44] [ERROR   ] [viseron.components.ffmpeg.stream.camera_1] - rtsp://*****:*****@192.168.0.114:554/0: Connection refused
viseron  | [2024-05-19 22:42:44] [ERROR   ] [viseron.components.ffmpeg.camera.camera_1] - Frame reader process has exited
viseron  | [2024-05-19 22:42:49] [ERROR   ] [viseron.components.ffmpeg.camera.camera_1] - Restarting frame pipe
viseron  | [2024-05-19 22:42:49] [ERROR   ] [viseron.components.ffmpeg.stream.camera_1] - [tcp @ 0x5650725f5cc0] Connection to tcp://:554?timeout=5000000 failed: Connection refused
viseron  | [2024-05-19 22:42:49] [ERROR   ] [viseron.components.ffmpeg.stream.camera_1] - rtsp://*****:*****@192.168.0.114:554/0: Connection refused
viseron  | [2024-05-19 22:42:49] [ERROR   ] [viseron.components.ffmpeg.camera.camera_1] - Frame reader process has exited
viseron  | [2024-05-19 22:42:54] [ERROR   ] [viseron.components.ffmpeg.camera.camera_1] - Restarting frame pipe
viseron  | [2024-05-19 22:42:54] [ERROR   ] [viseron.components.ffmpeg.stream.camera_1] - [tcp @ 0x55c13c603cc0] Connection to tcp://:554?timeout=5000000 failed: Connection refused
viseron  | [2024-05-19 22:42:54] [ERROR   ] [viseron.components.ffmpeg.stream.camera_1] - rtsp://*****:*****@192.168.0.114:554/0: Connection refused
viseron  | [2024-05-19 22:42:54] [ERROR   ] [viseron.components.ffmpeg.camera.camera_1] - Frame reader process has exited
GMagician commented 1 month ago

Addendum: I double checked username and password in "secret" and they are correct

GMagician commented 1 month ago

Because of #755 I manually removed admin name and ad admin password...

GMagician commented 1 month ago

This is because of chars used by password!

roflcoopter commented 3 weeks ago

So you hade special characters in your password? What were those special characters? Need to find a way to fix that

GMagician commented 3 weeks ago

Thanks for reply.

Meantime I changed my password to try to solve. @ is for sure a problem but it seems also something else in this list &;,*. With my new password, if I launch ffprobe I still get errors regarding ;. I discovered that passing password in between double quotes it runs..eg ffprobe rtsp://user:"password"@ippath

roflcoopter commented 3 weeks ago

Done some changes to escape special characters in the password, ran some tests and it seems to work fine now! Will push it to the next beta soon

roflcoopter commented 3 weeks ago

This is now released in 3.0.0b7