frigate: [Beta2] Frigate clips occasionally do not "autoplay" -- unexpected client/server interaction?

Describe the bug

With Frigate 0.9.0 beta2, and the matching HA integration pre-release 2.0.0, occasionally a clip/event will not autoplay in the browser. When the video element loads, manually clicking the play icon will correctly play the video. I have observed this behavior:

  • In the HA media browser
  • In the Lovelace card where I’m manually assembling URLs and passing them to the HLS player.

I am confident this is new behavior from Frigate 0.9.0 onwards, and as the URLs are resolving to correctly formed Frigate URLs and the video elements have the attribute autoplay enabled – I am not convinced this is a “client-side” issue even though it has all the appearance of one. This happens across multiple browsers and OSes.

This makes media browsing more painful.

Version of frigate 0.9.0-3340952

Config file Include your full config file wrapped in triple back ticks.

mqtt:
  host: mqtt
ffmpeg:
  global_args:
    - -hide_banner
    - -loglevel
    - info
  hwaccel_args:
    - -hwaccel
    - vaapi
    - -hwaccel_device
    - /dev/dri/renderD128
    - -hwaccel_output_format
    - yuv420p
   - -fflags
   - +genpts+discardcorrupt
   - -rtsp_transport
   - tcp
   - -stimeout
   - '5000000'
cameras:
  sitting_room:
    ffmpeg:
      inputs:
        - path: rtsp://rtsp:{FRIGATE_WYZE_RTSP_PASSWORD}@{HOST_PATH}
          roles:
            - detect
            - rtmp
            - record
    detect:
      enabled: True
      width: 1920
      height: 1080
      fps: 4
    record:
      events:
        enabled: True
        objects:
          - person
    motion:
      mask:
        - 1868,1058,1868,1018,1392,1018,1392,1058

[cut as the file is lengthy and this is likely not relevant to the issue at hand. Full available upon request]

detectors:
  coral:
    type: edgetpu
    device: usb
objects:
  filters:
    person:
      # Optional: minimum score for the object to initiate tracking (default: shown below)
      min_score: 0.6
      # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
      threshold: 0.75

Frigate container logs

Nothing logged of interest.

Query logs

Logs from my reverse proxy (Apache) on the requests being made from HomeAssistant to Frigate:

On video element load (where I would expect autoplay):

frigate:443 [IP] - - [28/Aug/2021:09:28:57 -0700] "GET /vod/event/1630123639.21596-l1y9af/index.m3u8?authSig=[REDACTED] HTTP/1.1" 200 955 "https://[DOMAIN]/lovelace-test/0" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36"
frigate:443 [IP] - - [28/Aug/2021:09:28:57 -0700] "GET /vod/event/1630123639.21596-l1y9af/index.m3u8?authSig=[REDACTED] HTTP/1.1" 200 5691 "https://[DOMAIN]/lovelace-test/0" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36"
frigate:443 [IP] - - [28/Aug/2021:09:28:57 -0700] "GET /vod/event/1630123639.21596-l1y9af/seg-1-v1.ts?authSig=[REDACTED] HTTP/1.1" 200 1173025 "https://[DOMAIN]/lovelace-test/0" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36"
frigate:443 [IP] - - [28/Aug/2021:09:28:57 -0700] "GET /vod/event/1630123639.21596-l1y9af/seg-2-v1.ts?authSig=[REDACTED] HTTP/1.1" 200 1049014 "https://[DOMAIN]/lovelace-test/0" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36"
frigate:443 [IP] - - [28/Aug/2021:09:28:57 -0700] "GET /vod/event/1630123639.21596-l1y9af/seg-3-v1.ts?authSig=[REDACTED] HTTP/1.1" 200 1157897 "https://[DOMAIN]/lovelace-test/0" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36"

… when play is manually clicked:

frigate:443 [IP] - - [28/Aug/2021:09:28:59 -0700] "GET / HTTP/1.1" 200 6028 "-" "Go-http-client/1.1"
frigate:443 [IP] - - [28/Aug/2021:09:29:00 -0700] "GET /vod/event/1630123639.21596-l1y9af/seg-4-v1.ts?authSig=[REDACTED] HTTP/1.1" 200 149091 "https://[DOMAIN]/lovelace-test/0" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36"

Frigate stats

{"back_yard":{"camera_fps":4.1,"capture_pid":285,"detection_fps":1.0,"pid":247,"process_fps":4.1,"skipped_fps":0.0},"detection_fps":7.1,"detectors":{"coral":{"detection_start":0.0,"inference_speed":9.53,"pid":227}},"front_door":{"camera_fps":4.0,"capture_pid":290,"detection_fps":0.0,"pid":249,"process_fps":4.0,"skipped_fps":0.0},"garage":{"camera_fps":4.1,"capture_pid":275,"detection_fps":0.0,"pid":244,"process_fps":4.1,"skipped_fps":0.0},"kitchen":{"camera_fps":0.1,"capture_pid":259,"detection_fps":0.1,"pid":238,"process_fps":0.1,"skipped_fps":0.0},"landing":{"camera_fps":4.0,"capture_pid":281,"detection_fps":0.0,"pid":246,"process_fps":4.0,"skipped_fps":0.0},"living_room":{"camera_fps":4.0,"capture_pid":266,"detection_fps":0.0,"pid":241,"process_fps":4.0,"skipped_fps":0.0},"master_bedroom":{"camera_fps":4.1,"capture_pid":270,"detection_fps":0.0,"pid":243,"process_fps":4.1,"skipped_fps":0.0},"office":{"camera_fps":0.1,"capture_pid":261,"detection_fps":0.0,"pid":239,"process_fps":0.1,"skipped_fps":0.0},"service":{"storage":{"/dev/shm":{"free":234.4,"mount_type":"tmpfs","total":268.4,"used":34.1},"/media/frigate/clips":{"free":15628.6,"mount_type":"ext4","total":244529.7,"used":216408.2},"/media/frigate/recordings":{"free":15628.6,"mount_type":"ext4","total":244529.7,"used":216408.2},"/tmp/cache":{"free":1999.7,"mount_type":"tmpfs","total":2000.0,"used":0.3}},"uptime":2177,"version":"0.9.0-3340952"},"sitting_room":{"camera_fps":4.1,"capture_pid":251,"detection_fps":6.0,"pid":235,"process_fps":4.1,"skipped_fps":0.0}}

Screenshots If applicable, add screenshots to help explain your problem.

Maybe ~75% of clicked clips will autoplay, 25% will act like this (no autoplay, but work fine when play is manually clicked).

Peek 2021-08-28 09-36

Computer Hardware

  • OS: Ubuntu 20.04.3 LTS
  • Install method: Manual docker
  • Virtualization: None
  • Coral Version: USB
  • Network Setup: Both

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 18 (17 by maintainers)

Most upvoted comments

Fantastic! Thanks for testing. I actually think this will help some other issues that have been hard to track down. I believe it tries to force 10s segments, but not all cameras have consistent enough key frame intervals. I will add it in and do some testing on my end in the morning. If I don’t run into anything, I will add it in and put up the next RC.