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.51k stars 155 forks source link

Trouble getting one RTMP REOLINK camera going - error - invalid data found when processing input #697

Closed u8915055 closed 6 months ago

u8915055 commented 6 months ago

I really didnt want to open an issue for this. I figure i shoudl be able to get one camera going. However the log messages just point to something i cant figure out.

I am trying to setup one RTMP REOLINK RLC-410 camera. I put the config in as i believe it should go. When i copy the RTMP URI over to VLC, the camera stream opens up no problem.

The key indicator in the log messages seems to be a concatenated camera URI that includes both RTSP AND RTMP.

Here's my config:

ffmpeg:
  camera:
    camera_1:  # This value has to be unique across all cameras
      name: Front
      path: /bcs/channel0_main.bcs?channel=0&stream=0&user=admin&password=xxxxx
      port: 1935
      host: 192.168.1.121
      protocol: rtmp
      stream_format: rtmp
      width: 2560
      height: 1440
      fps: 10
      recorder:
        idle_timeout: 10                    # default: 10
        codec: h264
        retain: 7                         # default: 7

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

## To tie everything together we need to configure one more component.
nvr:
  camera_1:  # Run NVR for camera_1

However, when i look at the logs, i see this message over and over again:

[2024-01-02 15:41:47] [ERROR   ] [viseron.components.ffmpeg.stream.camera_1] - rtsp://192.168.1.121:1935rtmp://192.168.1.121/bcs/channel0_main.bcs?channel=0&stream=0&user=admin&password=***** Invalid data found when processing input
[2024-01-02 15:41:47] [ERROR   ] [viseron.components] - Domain camera for component ffmpeg is not ready. Retrying in 290 seconds. Error: FFprobe could not connect to stream. Output: {'error': {'code': -1094995529, 'string': 'Invalid data found when processing input'}}

You can see the URI up there has a reference to RTSP concatenated with the valid RTMP call.

What am i doing wrong here? I must have something wrong in the syntax but ive been looking at it for a while and just cant figure it out.

Thank you!

u8915055 commented 6 months ago

Ok, so i added in a command called ffmpeg_loglevel: verbose into my camera_1 config.. it didnt like that and it was rejecting that command in the logs after i rebooted (even though its in the documentation).. i removed the command and rebooted and now the camera works. There is something funky about configuration being enacted after saving.

roflcoopter commented 6 months ago

Strange, i have not seen this before, glad you got it sorted tho! Just tested ffmpeg_loglevel: verbose and it definitely works.

If you get any other simiar issues please let me know and i will investigate