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

FFprobeTimeout on very simple configurations, but container internal `ffmpeg` command works. #750

Closed carlosrodfern closed 1 month ago

carlosrodfern commented 1 month ago

Hello, I'm having a hard time connecting to the rtsp cameras.

Here is my configuration:

## Start by adding some cameras
ffmpeg:
  camera:
    camera_1:  # This value has to be unique across all cameras
      name: Camera 1
      host: NVR-P.lan
      port: 554
      path: '/cam/realmonitor?channel=1&subtype=0'
      stream_format: rtsp
      protocol: rtsp
      rtsp_transport: tcp
      username: REDACTED
      password: REDACTED

darknet:
  object_detector:
    cameras:
      camera_1:  # Attach detector to the configured camera_1 above
        fps: 1
        scan_on_motion_only: false  # Scan for objects even when there is no motion
        labels:
          - label: person
            confidence: 0.75
            trigger_recorder: true

nvr:
  camera_1:  # Run NVR for camera_1

I get these errors:

[2024-05-16 08:40:13] [ERROR   ] [viseron.components.ffmpeg.stream.camera_1] - Retrying None in 16.0 seconds as it raised FFprobeTimeout: FFprobe command timed out after 60s.

When I get into the shell of the container, this command outputs encoded stuff:

ffmpeg -hide_banner -loglevel error -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts -use_wallclock_as_timestamps 1 -vsync 0 -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -rtsp_transport tcp -i 'rtsp://REDACTED:REDACTED@NVR-P.lan:554/cam/realmonitor?channel=1&subtype=0' -f rawvideo -pix_fmt nv12 pipe:1

I have also tried using the raw_command option but no luck.

I have also tried version 2.2.0, 2.3.0, and 3.0.0b4, and they all have this error.

So, there is no connectivity issues per se. Am I missing something in the configuration?

carlosrodfern commented 1 month ago

Never mind, I got it to work by adding this:

      fps: 6
      width: 1920
      height: 1080
      codec: h264
      audio_codec: null
roflcoopter commented 1 month ago

Yeah something is definitely off with ffprobe. Have not been able to figure out what. I should move to something else.

Glad you got it sorted