blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
19.22k stars 1.76k forks source link

[Support]: Events and recordings not being saved when using go2rtc #7251

Closed ttopholm closed 1 year ago

ttopholm commented 1 year ago

Describe the problem you are having

Hi,

I have a reolink RLC-511WA, and followed the guide here: https://docs.frigate.video/configuration/camera_specific#reolink-cameras

I can see the stream live, and it detects fine in frigate, but the recording doesn't work, when I look in the look it says the following:

Event does not have recordings: 1689966525.154536-tezilr

Version

0.12.1-367D724

Frigate config file

mqtt:
  enabled: True
  host: 192.168.xx.xx

detectors:
  coral:
    type: edgetpu
    device: usb

go2rtc:
  streams:
    skur_main: 
      - http://192.168.xx.xx/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=xx&password=xx
      - "ffmpeg:skur_main#audio=opus"
    skur_sub: 
      - http://192.168.xx.xx/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=xx&password=xxx

cameras:
  Skur: # <------ Name the camera
    ffmpeg:
      hwaccel_args: preset-vaapi
      inputs:
        - path: rtsp://127.0.0.1:8554/skur_sub?video=copy # <----- The stream you want to use for detection
          input_args: preset-rtsp-restream
          roles:
            - detect
        - path: rtsp://127.0.0.1:8554/skur?video=copy&audio=aac
          input_args: preset-rtsp-restream
          roles:
            - record
    detect:
      width: 640 # <---- update for your camera's resolution
      height: 480
      fps: 7
    record:
      enabled: True
    snapshots:
      enabled: True
    mqtt:
      timestamp: False
      bounding_box: False
      crop: True
      quality: 100
      height: 500
    objects:
      track:
      - person
      - car
      - dog
      - cat

Relevant log output

2023-07-21 21:09:05.559611344  [2023-07-21 21:09:05] frigate.http                   ERROR   : No recordings found for the requested time range
2023-07-21 21:09:05.622948873  [2023-07-21 21:09:05] frigate.http                   ERROR   : Event does not have recordings: 1689966525.154536-tezilr

FFprobe output from your camera

N/A

Frigate stats

No response

Operating system

Debian

Install method

Docker Compose

Coral version

USB

Network connection

Wireless

Camera make and model

RLC-511WA

Any other information that may be helpful

No response

NickM-27 commented 1 year ago

First thing I'd suggest trying is moving to ffmpeg: for the entire go2rtc config and see if that makes a difference.

ttopholm commented 1 year ago

@NickM-27 can you explain what you mean ;-)

NickM-27 commented 1 year ago
go2rtc:
  streams:
    skur_main: 
      - "ffmpeg:http://192.168.xx.xx/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=xx&password=xx#video=copy#audio=copy#audio=opus"
    skur_sub: 
      - "ffmpeg:http://192.168.xx.xx/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=xx&password=xxx"
ttopholm commented 1 year ago

that didn't do the trick. If I use: rtsp://xx:xx@192.168.xx.xx:554/h264Preview_01_main in the camera -> ffmpeg->inputs->path. it works fine, but have the jigger in the video sometimes.

NickM-27 commented 1 year ago

Then Id suggest just having frigate connect directly to the camera using http-flv

ttopholm commented 1 year ago

@NickM-27 that works, thanks.