Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Support]: No clip, "Event does not have recordings" right after detection #8167

Closed
marcel263 opened this issue Oct 14, 2023 · 3 comments · Fixed by #8179
Closed

[Support]: No clip, "Event does not have recordings" right after detection #8167

marcel263 opened this issue Oct 14, 2023 · 3 comments · Fixed by #8179

Comments

@marcel263
Copy link

marcel263 commented Oct 14, 2023

Describe the problem you are having

Right after event is detected, usually within a second or 2, if one attempts to play the clip on the web UI, there is the usual error message for failed playback while the log states:

"Event does not have recordings"

However, the clip button remains greyed out permanently, even after the event has finished.

The clip is not actually recorded.

Version

0.12.1-367d724

Frigate config file

mqtt:
  host: 172.17.0.1
  port: 1883
  # Optional: Enable mqtt server (default: shown below)
  #enabled: False
#  tls_insecure: true
#ui:
##  live_mode: jsmpeg

ffmpeg:
  global_args: -hide_banner -loglevel warning -threads 2 -timeout 30000000
go2rtc:
  webrtc:
    candidates:
      - 192.168.1.20:8555
      - stun:8555
  streams:
    side:
      - rtsp://192.168.1.10:554/user=admin_password=x_channel=1_stream=0.sdp?real_stream
   #   - "ffmpeg:side#video=h264"
    side_sub_h264:
      - ffmpeg:rtsp://192.168.1.10:554/user=admin_password=x_channel=1_stream=1.sdp?real_stream#video=h264#hardware
      #- ffmpeg:side_sub#video=h264
    back:
      - rtsp://192.168.1.x:554/user=admin_password=x_channel=1_stream=0.sdp?real_stream
    back_sub_h264:
      - ffmpeg:rtsp://192.168.1.x:554/user=admin_password=x_channel=1_stream=1.sdp?real_stream#video=h264#hardware
    front:
      - rtsp://192.168.1.x:554/user=admin_password=x_channel=1_stream=0_onvif=0.sdp?real_stream
    front_h264:
      - ffmpeg:front#video=h264#hardware
    front_sub_h264:
      - ffmpeg:rtsp://192.168.1.x:554/user=admin_password=x_channel=1_stream=1_onvif=0.sdp?real_stream#video=h264#hardware
cameras:
  back:
  #  live:
  #    stream_name: back_sub_h264      
    motion:
      mask: 508,1166,0,1177,0,1233,493,1222,556,1296,1444,1296,2304,1296,2304,0,1443,0,1760,742,2304,728,2304,927,1147,1116,657,1197
      frame_height: 50
      contour_area: 65
      threshold: 19
      delta_alpha: 0.15
      frame_alpha: 0.68
      improve_contrast: true
    ffmpeg:
      #output_args:
      #  record: preset-record-mjpeg
      #hwaccel_args: -c:v hevc_cuvid
      inputs:
        - path: rtsp://127.0.0.1:8554/back
          input_args: preset-rtsp-restream
          hwaccel_args: preset-nvidia-h265
          roles:
            - detect
            #- record
        - path: rtsp://127.0.0.1:8554/back_sub_h264
          input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 30000000
          hwaccel_args: preset-nvidia-h264
          roles:
            - record
    objects:
     filters:
        person:
          min_score: 0.42
          threshold: 0.46
          min_area: 8500
        cat:
          min_score: 0.2
          threshold: 0.2
#  test:
#      ffmpeg:
#       input_args: -rtsp_transport tcp -timeout 60000000
#       inputs: 
#        - path: rtsp://172.17.0.1:8888/mystream
#  test:
#    ffmpeg:
#      input_args: -rtsp_transport tcp -timeout 60000000
#      inputs: 
#       - path: rtsp://172.17.0.1:8888/mystream
#   motion:
#     frame_height: 63
#     contour_area: 23
#     threshold: 19
#     delta_alpha: 0.28
#      mask:
#       - 357,1240,477,1235,474,1174,343,1175
#       - 0,1106,199,963,339,745,326,552,268,386,166,397,232,304,262,237,243,143,251,56,222,0,109,0,0,0
#       - 1829,1296,2031,1095,1956,312,1854,0,2304,0,2304,1296
#       - 378,315,483,116,428,30,315,105,298,55,262,72
#    objects:
#      track:
#        - person
#        - cat
#        - dog
#      filters:
#        cat:
#          min_score: 0.1
#          min_area: 750
#          threshold: 0.1
#        person:
#          min_area: 2750
#          min_score: 0.53
#          threshold: 0.55

  side:
    motion:
      frame_height: 63
      contour_area: 23
      threshold: 17
      delta_alpha: 0.13
      frame_alpha: 0.38
      mask:
       - 357,1240,477,1235,474,1174,343,1175
       - 0,1106,199,963,339,745,326,552,268,386,166,397,232,304,262,237,243,143,251,56,222,0,109,0,0,0
       - 1829,1296,2031,1095,1956,312,1854,0,2304,0,2304,1296
       - 378,315,483,116,428,30,315,105,298,55,262,72
    live:
      stream_name: side
    ffmpeg:
      #output_args:
      #  record: preset-record-mjpeg
      #"ffmpeg -hide_banner -loglevel warning -threads 2 -hwaccel cuda -hwaccel_output_format cuda -user_agent FFmpeg Frigate/0.12.1-367d724 -rtsp_transport tcp -timeout 5000000 -i rtsp://127.0.0.1:8554/side_sub_h264 -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/side-%Y%m%d%H%M%S.mp4"
      #hwaccel_args: -c:v hevc_cuvid
      inputs:
        - path: rtsp://127.0.0.1:8554/side
          hwaccel_args: preset-nvidia-h265
          input_args: preset-rtsp-restream
          roles:
           - detect
          #  - record
        - path: rtsp://127.0.0.1:8554/side_sub_h264
          hwaccel_args: preset-nvidia-h264
          input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 30000000
          roles:
            - record
    objects:
      mask: 0,0,486,0,328,105,312,69,268,94,279,146,0,193
      track:
        - person
        - cat
        - dog
      filters:
        cat:
          min_score: 0.1
          min_area: 750
          threshold: 0.1
        person:
          min_area: 2750
          min_score: 0.53
          threshold: 0.55




  front:
    #live:
      #stream_name: front_h264
      #quality: 3
    ffmpeg:
      #output_args:
       #record: "exec:ffmpeg -hide_banner -loglevel warning -threads 2 -user_agent FFmpeg Frigate/0.12.1-367d724 -rtsp_transport tcp -timeout 5000000 -i rtsp://127.0.0.1:8554/front -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c: v libx264 -an /tmp/cache/front-%Y%m%d%H%M%S.mp4"

      inputs:
        - path: rtsp://127.0.0.1:8554/front
          hwaccel_args: preset-nvidia-h265
          input_args: preset-rtsp-restream
          roles:
            - detect
            #- record
        - path: rtsp://127.0.0.1:8554/front_sub_h264
          input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 30000000
          hwaccel_args: preset-nvidia-h264
          #input_args: preset-rtsp-restream
          roles:
            - record
    objects:
     filters:
         person:
           mask:
            - 0,1296,0,0,668,0,1153,58,1233,295,960,284,1026,397,828,552,557,734,323,825,86,1015,306,1060,516,891,739,930,1142,974,1587,1043,1849,124,786,0,2304,0,2304,1296
            - 1046,246,1126,265,1109,430,999,422
            - 1446,460,1403,447,1394,605,1460,607
            - 1452,389,1531,487,1539,389,1479,332,1430,313,1394,406
            - 1540,613,1587,599,1576,715,1526,709
            - 1656,143,1611,257,1551,268,1523,75
           min_score: 0.14
           threshold: 0.18
           min_area: 1730
         motorcycle:
            mask: 0,1296,0,0,668,0,1153,58,1233,295,960,284,1026,397,828,552,557,734,323,825,86,1015,306,1060,516,891,739,930,1142,974,1587,1043,1849,124,786,0,2304,0,2304,1296
            min_score: 0.25
            threshold: 0.3
         cat:
            mask: 0,1296,0,0,668,0,1153,58,1233,295,960,284,1026,397,828,552,557,734,323,825,86,1015,306,1060,516,891,739,930,1142,974,1587,1043,1849,124,786,0,2304,0,2304,1296
            min_score: 0.08
            threshold: 0.09
    record:
      events:
        pre_capture: 3
        post_capture: 8
      enabled: true
      retain:
        mode: motion
    motion:
      #mask: 1360,203,1218,650,1158,572,971,696,688,634,393,746,110,704,125,0,0,0,0,1296,2304,1296,2304,0,767,0,679,304,637,494,820,585,995,497,904,406,950,324,936,204,1043,219,1068,99,1229,141
      mask:
        - 0,1296,549,1296,2304,1296,2304,0,2097,0,842,0,1851,124,1518,1242,855,1159,86,1015,259,877,486,808,673,676,820,538,966,425,1073,367,1217,315,1258,124,1082,0,0,0
        - 1490,792,1352,866,1222,985,1556,1032,1581,908
        - 737,739,795,643,941,461,1046,549,1026,671,1046,770,855,875
      frame_height: 75
      contour_area: 12
      threshold: 36
      delta_alpha: 0.22
      frame_alpha: 0.85
      improve_contrast: true

detect:
  width: 2304
  height: 1296

detectors:
  tensorrt:
    type: tensorrt
    device: 0 #This is the default, select the first GPU

model:
  path: /trt-models/yolov7-tiny-416.trt
  input_tensor: nchw
  input_pixel_format: rgb
  width: 416
  height: 416

objects:
  track:
    - person
    - cat
    - dog
    - motorcycle
    - bicycle
  filters:
    

record:
  enabled: True
  retain:
    #mode: active_objects
    days: 0
  events:
    pre_capture: 2
    post_capture: 8
    retain:
      mode: motion
      default: 8

snapshots:
  enabled: true

birdseye:
  enabled: True
  restream: true
  quality: 2
  mode: objects

Relevant log output

frigate.http                   ERROR   : No recordings found for the requested time range
frigate.http                   ERROR   : Event does not have recordings:

FFprobe output from your camera

Input #0, rtsp, from 'rtsp://192.168.1.12:554/user=admin_password=x_channel=1_stream=0_onvif=0.sdp?real_stream':
  Metadata:
    title           : RTSP Session
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: hevc (Main), yuvj420p(pc, bt709), 2592x1944, 4 fps, 4 tbr, 90k tbn
  Stream #0:1: Audio: pcm_alaw, 8000 Hz, 1 channels, s16, 64 kb/s

Frigate stats

No response

Operating system

Other Linux

Install method

Docker CLI

Coral version

CPU (no coral)

Network connection

Wired

Camera make and model

Generic ONVIF

Any other information that may be helpful

No response

@NickM-27
Copy link
Sponsor Collaborator

does this happen if you wait 1 minute before trying to watch it?

@marcel263
Copy link
Author

does this happen if you wait 1 minute before trying to watch it?

Thank you for replying. I will try it

@marcel263
Copy link
Author

It really is an issue of timing, if the playing is delayed for 3-5 seconds or so, nothing is wrong. The issue is also reproducible with HomeAssistant add-on's requesting the clip.

If you would like more information please instruct me to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants