blakeblackshear / frigate

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

[Support]: Recordings and clips no longer playing since upgrade to 0.12.0-rc1. #5862

Closed limitless-code closed 1 year ago

limitless-code commented 1 year ago

Describe the problem you are having

Recordings and clips no longer playing since upgrade to 0.12.0-rc1. videos not playing back. Uploading an mp4 sample file does play from the "media" folder, jpg and png files display as well as an mp3 file plays that was uploaded, but recordings do not. Was fine yesterday after upgrade to rc1 but over night all recordings and clips fail to play.

Version

0.12.0-rc1

Frigate config file

# yaml-language-server: $schema=http://ccab4aaf-frigate-fa-beta:5000/api/config/schema
mqtt:  
  host: <>
  user: <>
  password: <>

detectors:
  coral:
    type: edgetpu
    device: usb

cameras:
  Main-Drive:
    rtmp:
      enabled: false
    ffmpeg:
      global_args: -y -hide_banner -loglevel warning
      hwaccel_args:
        - -hwaccel
        - vaapi
        - -hwaccel_device
        - /dev/dri/renderD128
        - -hwaccel_output_format 
        - yuv420p
#      input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1
      input_args: preset-rtsp-generic
      output_args:
        detect: -f rawvideo -pix_fmt yuv420p
#        record: -map 0:v -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -b:v 4M -r 25
        record: preset-record-generic
        rtmp: -c:vv copy -c:a aac -f flv
      inputs:
        - path: rtsp://viewer:<>:<>@<>:554
          roles:
            - detect
            - clips
    detect:  
      # Optional: width of the frame for the input with the detect role (default: shown below)
      width: 1280
      # Optional: height of the frame for the input with the detect role (default: shown below)
      height: 720
      # Optional: desired fps for your camera for the input with the detect role (default: shown below)
      # NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.
      fps: 25
      # Optional: enables detection for the camera (default: True)
      # This value can be set via MQTT and will be updated in startup based on retained value
      enabled: True
      # Optional: Number of frames without a detection before frigate considers an object to be gone. (default: 5x the frame rate)
      #max_disappeared: 25        
    zones:
      main_drive:
        coordinates: 1025,450,883,354,583,382,327,364,87,537,0,720,1280,720
#     zone_main_drive_full_height:
#      coordinates: 0,720,1280,720,1280,131,0,140
    record:
      enabled: True
        # Optional: Number of days to retain recordings regardless of events (default: shown below)#        
        # NOTE: This should be set to 0 and retention should be defined in events section below
        #       if you only want to retain recordings of events.
      retain:
        days: 7
        mode: active_objects
      # Optional: Event recording settings
      events:
          # Optional: Maximum length of time to retain video during long events. (default: shown below)#          # NOTE: If an object is being tracked for longer than this amount of time, the retained recordings
          #       will be the last x seconds of the event unless retain_days under record is > 0.
#        max_seconds: 300
          # Optional: Number of seconds before the event to include (default: shown below)
        pre_capture: 15
          # Optional: Number of seconds after the event to include (default: shown below)
        post_capture: 20
          # Optional: Objects to save recordings for. (default: all tracked objects)
        objects:
          - person
          - car
        retain:
          default: 7
          mode: active_objects
        # Optional: Restrict recordings to objects that entered any of the listed zones (default: no required zones)
        required_zones: [main_drive]
          # Optional: Retention settings for recordings of events
#    retain:
          # Required: Default retention days (default: shown below)
#      default: 7
      # Optional: Per object retention days
 #     objects:
 #       person: 10
 #   motion:
 #     mask: 
  #      - 380,689,918,682,918,639,383,636
#        - 0,283,399,241,393,0,0,0
#        - 639,225,1014,182,1280,160,1280,0,686,0
#        - 681,234,683,0,359,0,379,218
#        - 312,366,500,359,551,259,686,139,553,146,400,156,316,158
#        - 1280,139,835,261,1280,720
 #       - 567,269,527,211,409,206,360,244,281,343,558,343
    motion:
      mask:
          - 380,689,918,682,918,639,383,636
          - 567,269,527,211,409,206,360,244,281,343,558,343
 #         - 121,492,189,416,155,290,55,308
 #         - 247,261,284,364,197,318
    objects:
              # Optional: list of objects to track from labelmap.txt (default: shown below)
      track:
        - person
        - car
              # Optional: mask to prevent all object types from being detected in certain areas (default: no mask)
              # Checks based on the bottom center of the bounding box of the object.
              # NOTE: This mask is COMBINED with the object type specific mask below
              # Optional: filters to reduce false positives for specific object types
      filters:
        person:
                  # Optional: minimum width*height of the bounding box for the detected object (default: 0)
          min_area: 5000
                  # Optional: maximum width*height of the bounding box for the detected object (default: 24000000)
          max_area: 200000
                # 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.7
                  # Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
                  # Checks based on the bottom center of the bounding box of the object
        #  mask: 0,0,1000,0,1000,200,0,200
        car:
        # Optional: minimum width*height of the bounding box for the detected object (default: 0)
          min_area: 10000
        # Optional: maximum width*height of the bounding box for the detected object (default: 24000000)
          max_area: 500000
            # 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.7
        # Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
        # Checks based on the bottom center of the bounding box of the object
        #  mask:  0,0,1000,0,1000,200,0,200
        #mask:  367,111,365,249,307,326,37,316,40,134        
    snapshots:
      enabled: True
      timestamp: True
      bounding_box: True
      retain:
        default: 2
timestamp_style:
          # Optional: Position of the timestamp (default: shown below)
          #           "tl" (top left), "tr" (top right), "bl" (bottom left), "br" (bottom right)
  position: "tl"
          # Optional: Format specifier conform to the Python package "datetime" (default: shown below)
          #           Additional Examples:
          #             german: "%d.%m.%Y %H:%M:%S"
  format: "%d/%m/%Y %H:%M:%S"
#    color:
    #        # All Required when color is specified (default: shown below)
#      red: 255
#      green: 255
#      blue: 255
    #      # Optional: Line thickness of font (default: shown below)
#      thickness: 2
          # Optional: Effect of lettering (default: shown below)
          #           None (No effect), none is not valid
          #           "solid" (solid background in inverse color of font)
          #           "shadow" (shadow for font)
#    effect: "solid"       
#  Front-Door:
#    rtmp:
#      enabled: false
#    #detect:
#    #  enabled: True
#    ffmpeg:
#      global_args: -y -hide_banner -loglevel info
#      hwaccel_args:
#        - -hwaccel
#        - vaapi
#        - -hwaccel_device
#        - /dev/dri/renderD128
#        - -hwaccel_output_format
#        - yuv420p
##        - -c:v
##        - h264_v4l2m2m
#      input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport udp -stimeout 5000000 -use_wallclock_as_timestamps 1
#      output_args:
#        detect: -f rawvideo -pix_fmt yuv420p
#        record: -map 0:v -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -b:v 4M -r 25
#        rtmp: -c copy -f flv
#      inputs:
#        - path: rtsp://<>:<>@<>:554/onvif1
#          roles:
#            - detect
#            - clips
#    detect:  
#        # Optional: width of the frame for the input with the detect role (default: shown below)
#      width: 1280
#      # Optional: height of the frame for the input with the detect role (default: shown below)
#      height: 720
#      # Optional: desired fps for your camera for the input with the detect role (default: shown below)
#      # NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.
##      fps: 15
#      # Optional: enables detection for the camera (default: True)
#      # This value can be set via MQTT and will be updated in startup based on retained value
#      enabled: True
#      # Optional: Number of frames without a detection before frigate considers an object to be gone. (default: 5x the frame rate)
#      #max_disappeared: 25
##  zones:
##    zone_entire_main_drive:
##      coordinates: 845,275,582,341,330,320,87,537,0,720,1280,720
##    zone_main_drive_full_height:
##      coordinates: 0,720,1280,720,1280,131,0,140
##  motion:
##    mask:
##     - 385,690,915,680,915,638,385,640
#    objects: 
#      - person
#      #- car
#    record:
#      enabled: True
#      # Optional: Number of days to retain recordings regardless of events (default: shown below)
#      # NOTE: This should be set to 0 and retention should be defined in events section below
#      #       if you only want to retain recordings of events.
#      retain_days: 0
#      # Optional: Event recording settings
#      events:
#        # Optional: Maximum length of time to retain video during long events. (default: shown below)
#        # NOTE: If an object is being tracked for longer than this amount of time, the retained recordings
#        #       will be the last x seconds of the event unless retain_days under record is > 0.
#        max_seconds: 300
#        # Optional: Number of seconds before the event to include (default: shown below)
#        pre_capture: 5
#        # Optional: Number of seconds after the event to include (default: shown below)
#        post_capture: 5
#        # Optional: Objects to save recordings for. (default: all tracked objects)
#        objects:
#          - person
#        # Optional: Restrict recordings to objects that entered any of the listed zones (default: no required zones)
##        required_zones: [zone_entire_main_drive]
#        # Optional: Retention settings for recordings of events
#        retain:
#        # Required: Default retention days (default: shown below)
#          default: 10
#        # Optional: Per object retention days
#          objects:
#            person: 10
#    objects:
#            # Optional: list of objects to track from labelmap.txt (default: shown below)
#      track:
#        - person
#       # - car
#            # Optional: mask to prevent all object types from being detected in certain areas (default: no mask)
#            # Checks based on the bottom center of the bounding box of the object.
#            # NOTE: This mask is COMBINED with the object type specific mask below
#      #mask: 0,0,1000,0,1000,200,0,200
#            # Optional: filters to reduce false positives for specific object types
#      filters:
#        person:
#                # Optional: minimum width*height of the bounding box for the detected object (default: 0)
#          min_area: 5000
#                # Optional: maximum width*height of the bounding box for the detected object (default: 24000000)
#          max_area: 200000
#              # Optional: minimum score for the object to initiate tracking (default: shown below)
#          min_score: 0.5
#                # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
#          threshold: 0.7
#                # Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
#                # Checks based on the bottom center of the bounding box of the object
#       #   mask: 0,0,1000,0,1000,200,0,200
#          mask: 
#            - 0,45,495,46,492,0,0,0
#        car:
#            # Optional: minimum width*height of the bounding box for the detected object (default: 0)
#        #  min_area: 5000
#          # Optional: maximum width*height of the bounding box for the detected object (default: 24000000)
#        #  max_area: 100000
##         min_score: 0.5
#          # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
#         threshold: 0.7
#           # Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
#            # Checks based on the bottom center of the bounding box of the object
#        #  mask:  0,0,1000,0,1000,200,0,200
#        motion:
#          mask:
#            - 0,45,495,46,492,0,0,0
#    snapshots:
#      enabled: True
    # timestamp: True
#      bounding_box: True
#      retain:
#        default: 2
      # clips:
      #   enabled: True
      #  retain:
      #    default: 2

#environment_vars: 
#  LIBVA_DRIVER_NAME: i965
#go2rtc:
#  streams:
#    Drive:
#      - "rtsp://viewer:<>@<>:554#input=rtsp/udp"
#      - "ffmpeg:Drive#video=h264"
#  webrtc:
#    candidates:
#      - 192.168.99.11:8555
#      - stun:8555
#    log:
#      level: info  # default level
#      api: info
#      exec: info
#      ngrok: info
#      rtsp: debug
#      streams: debug
#      webrtc: debug

Relevant log output

2023-03-28 21:22:57.620356677  [INFO] Starting Frigate...
2023-03-28 21:23:00.084612033  [2023-03-28 22:23:00] frigate.app                    INFO    : Starting Frigate (0.12.0-7d589bd)
2023-03-28 21:23:00.123247397  [2023-03-28 22:23:00] frigate.app                    INFO    : Creating directory: /tmp/cache
2023-03-28 21:23:00.125489055  [2023-03-28 22:23:00] peewee_migrate                 INFO    : Starting migrations
2023-03-28 21:23:00.136800033  [2023-03-28 22:23:00] peewee_migrate                 INFO    : There is nothing to migrate
2023-03-28 21:23:00.153389098  [2023-03-28 22:23:00] detector.coral                 INFO    : Starting detection process: 299
2023-03-28 21:23:00.155932564  [2023-03-28 22:23:00] frigate.app                    INFO    : Output process started: 301
2023-03-28 21:23:00.162559759  [2023-03-28 22:23:00] frigate.app                    INFO    : Camera processor started for Main-Drive: 305
2023-03-28 21:23:00.162565752  [2023-03-28 22:23:00] frigate.detectors.plugins.edgetpu_tfl INFO    : Attempting to load TPU as usb
2023-03-28 21:23:04.421666490  [2023-03-28 22:23:00] frigate.app                    INFO    : Capture process started for Main-Drive: 306
2023-03-28 21:23:04.440081488  [2023-03-28 22:23:04] frigate.detectors.plugins.edgetpu_tfl INFO    : TPU found

FFprobe output from your camera

fprobe Output
Stream 0:
Return Code: 0

Video:

Codec: H.265 / HEVC (High Efficiency Video Coding)
Resolution: 1280x720
FPS: 15/1

Audio:

Codec: PCM A-law / G.711 A-law

Frigate stats

No response

Operating system

HassOS

Install method

HassOS Addon

Coral version

USB

Network connection

Wired

Camera make and model

digoo lantern

Any other information that may be helpful

mime-type frigate-recordings

NickM-27 commented 1 year ago

What version did you upgrade from?

And please use chrome://media-internals to see why playback is failing

limitless-code commented 1 year ago
render_id: 16
player_id: 0
created: 2023-03-28 21:35:55.957 UTC
origin_url: https://<>:8123/
kFrameUrl: https://<>:8123/media-browser/browser/app%2Cmedia-source%3A%2F%2Ffrigate/video%2Cmedia-source%3A%2F%2Ffrigate%2Ffrigate%2Frecordings%2F%2F%2F/video%2Cmedia-source%3A%2F%2Ffrigate%2Ffrigate%2Frecordings%2FMain-Drive%2F%2F/video%2Cmedia-source%3A%2F%2Ffrigate%2Ffrigate%2Frecordings%2FMain-Drive%2F2023-03-28%2F
kFrameTitle: Media – Home Assistant
url: blob:https://<>:8123/c5e2f687-4908-4685-b3de-81cd983a2739
kTextTracks: 
info: ChunkDemuxer
kRendererName: RendererImpl
pipeline_state: kStopped
error: MediaSource endOfStream before demuxer initialization completes (before HAVE_METADATA) is treated as an error. This may also occur as consequence of other MediaSource errors before HAVE_METADATA.
event: kWebMediaPlayerDestroyed
duration: 51.515
limitless-code commented 1 year ago
00:00:00.000 | created | "2023-03-28 21:35:56.881 UTC"
-- | -- | --
00:00:00.000 | origin_url | "https://<>:8123/"
00:00:00.000 | kFrameUrl | "https://<>:8123/media-browser/browser/app%2Cmedia-source%3A%2F%2Ffrigate/video%2Cmedia-source%3A%2F%2Ffrigate%2Ffrigate%2Frecordings%2F%2F%2F/video%2Cmedia-source%3A%2F%2Ffrigate%2Ffrigate%2Frecordings%2FMain-Drive%2F%2F/video%2Cmedia-source%3A%2F%2Ffrigate%2Ffrigate%2Frecordings%2FMain-Drive%2F2023-03-28%2F"
00:00:00.000 | kFrameTitle | "Media – Home Assistant"
00:00:00.000 | url | "blob:https://<>:8123/6e22662e-0403-4aa7-8c59-b6cfe58e63a8"
00:00:00.000 | kTextTracks | []
00:00:00.000 | info | "ChunkDemuxer"
00:00:00.000 | kRendererName | "RendererImpl"
00:00:00.000 | pipeline_state | "kStarting"
00:00:00.371 | error | "MediaSource endOfStream before demuxer initialization completes (before HAVE_METADATA) is treated as an error. This may also occur as consequence of other MediaSource errors before HAVE_METADATA."
00:00:00.371 | event | "kWebMediaPlayerDestroyed"
00:00:00.371 | pipeline_state | "kStopping"
00:00:00.371 | pipeline_state | "kStopped"
00:00:00.001 | duration | 51.515
NickM-27 commented 1 year ago

What version did you upgrade from? Do you see any errors in nginx logs?

limitless-code commented 1 year ago

I upgraded from 0.12.0 beta 9 no errors when i select a recording in nginx logs.

limitless-code commented 1 year ago
Key System: com.widevine.alpha
Robustness: Software Secure
Name: Widevine Content Decryption Module
Version: 4.10.2557.0
Path: /home/<>/.var/app/org.chromium.Chromium/config/chromium/WidevineCdm/4.10.2557.0/_platform_specific/linux_x64/libwidevinecdm.so
Status: Enabled
Capabilities: {"Audio Codecs":["aac","vorbis","flac","opus"],"Encryption Schemes":["CENC","CBCS"],"Session Types":["temporary"],"Video Codecs":{"av1":[],"h264":[],"vp8":[],"vp9":[]}}
NickM-27 commented 1 year ago

If there are no errors in frigate itself then it is difficult to debug, we'd expect nginx errors like this similar issue: https://github.com/blakeblackshear/frigate/issues/5783#issuecomment-1477898072

also, nothing changed relating to recordings from beta9 to rc1 https://github.com/blakeblackshear/frigate/compare/v0.12.0-beta9...dev

limitless-code commented 1 year ago

I think it maybe something to do with zerotier. It works when I have the zerotier client running from my mobile but does not if i access HA from my laptop with out a zerotier client running (everything works apart from recordings and clips), or if I access it via HA companion app without zerotier client running on my mobile.

NickM-27 commented 1 year ago

What about accessing the frigate webUI itself from the laptop without zerotier?

limitless-code commented 1 year ago

If I access frigate itself without zerotier running on the laptop recordings do not play, They also do not play when zerotier is running on the laptop (I checked I could ping the zerotier ip on HA). I get similar symptoms on my rpi 4 running latest version of raspbian.

Its working fine on my mobile using the companion app or chrome with zerotier running or not running it works on the mobile. In firefox or firefox focus on the mobile it does not work (cannot play recordings or clips)

Browser related?

As a side note if i access frigate webUI on HA in firefox (private browsing) it does not display (blank page), it displays fine in firefox when browsing "normally". the following error displays in the firefox browser console:

Uncaught (in promise) DOMException: A mutation operation was attempted on a database that did not allow mutations. 3
GEThttps://hassio.localdomain:8123/frontend_latest/fdbc9d2b.js
[HTTP/1.1 200 OK 48ms]

GEThttps://hassio.localdomain:8123/frontend_latest/b26bc7a3.js
[HTTP/1.1 200 OK 25ms]

GEThttps://hassio.localdomain:8123/frontend_latest/b894386b.js
[HTTP/1.1 200 OK 28ms]

GEThttps://hassio.localdomain:8123/frontend_latest/5ea92711.js
[HTTP/1.1 200 OK 30ms]

GEThttps://hassio.localdomain:8123/frontend_latest/d89fa442.js
[HTTP/1.1 200 OK 22ms]

GEThttps://hassio.localdomain:8123/frontend_latest/73f0328c.js
[HTTP/1.1 200 OK 21ms]

GEThttps://hassio.localdomain:8123/frontend_latest/d25d4332.js
[HTTP/1.1 200 OK 19ms]

GEThttps://hassio.localdomain:8123/frontend_latest/custom-panel.ff0ec5f0.js
[HTTP/1.1 200 OK 0ms]

GEThttps://hassio.localdomain:8123/api/hassio/app/entrypoint.js
[HTTP/1.1 200 OK 16ms]

GEThttps://hassio.localdomain:8123/api/hassio/app/frontend_latest/entrypoint.fc042133.js
[HTTP/1.1 200 OK 0ms]

GEThttps://hassio.localdomain:8123/api/hassio/app/frontend_latest/16b43715.js
[HTTP/1.1 200 OK 0ms]

GEThttps://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc//
[HTTP/1.1 200 OK 17ms]

GEThttps://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js
[HTTP/1.1 200 OK 0ms]

Uncaught (in promise) DOMException: A mutation operation was attempted on a database that did not allow mutations. [index-db0d4912.js:1:29908](https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js)
    c https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
    AsyncFunctionThrow self-hosted:814
    (Async: async)
    Wi https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
    Qt https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
    forEach self-hosted:203
    xi https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
    (Async: setTimeout handler)
    n https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
    (Async: FrameRequestCallback)
    Ei https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
    diffed https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
    vn https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
    Vr https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
    vn https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
    Vr https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
    vn https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
    Vr https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
    vn https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
    Vr https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
    vn https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
    Vr https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
    vn https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
    Vr https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
    vn https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
    Zt https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
    <anonymous> https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:16
limitless-code commented 1 year ago

Have tried chromium and firefox from the laptop running POPOS, chromium on raspbian (rpi4), firefox and firefox focus on the mobile. All do not work for playing recordings or clips.

Only works with home assistant companion app or chrome on the mobile. Zerotier maybe a red herring client-wise. Just tested with Microsoft Edge browser on the mobile and this works as well.

NickM-27 commented 1 year ago

It's known that Firefox can have more issues so that's not surprising. Chrome is odd but without any error messages from frigate it's very unclear where the issue is

limitless-code commented 1 year ago

not sure if this is the cause but I downloaded a clip and took a screenshot of the codec info in vlc of the video playing, it shows H.265/ HEVC: codec info

NickM-27 commented 1 year ago

Oh, well that explains why firefox can't play it back, firefox does not support hevc.

limitless-code commented 1 year ago

I changed one of the settings in the config back to what it used to be

from this:

record: preset-record-generic

back to this

record: -map 0:v -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -b:v 4M -r 25

Since changing the above, I think it's now working as it used to, as the latest clip plays in firefox etc like it did before I upgraded from 0.12.0 beta 9 but will leave it for a while and update once it has recorded more clips and recordings.

limitless-code commented 1 year ago

after changing to this: record: -map 0:v -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -b:v 4M -r 25

Clips and recordings now work in all web browsers as it used to as it outputs recording to H.264/MPEG4

h264-works-in-most-browsers-and-machines

However there is a big difference in CPU usage and therefore electricity (cost) max ~47% (H.265) vs ~90%(H.264):

Screenshot-diff-h265vsh264

So I am going back to using H.265/HEVC and will have to make do with using the mobile + chrome based browsers to play HEVC recordings as it also saves on bandwidth and maybe there will be improvements in web browsers on Linux being able to play HEVC in future or my hardware in not up to scratch. Both the laptop and RPI 4 have hardware acceleration for decoding Video but not encoding so perhaps I need both to be "Hardware accelerated" for it to work in Chromium.

output of vainfo on the laptop

libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.14 (libva 2.12.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.3.1 ()
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointVLD

https://caniuse.com/?search=hevc

Many thanks for helping me get to the source of the issue.

NickM-27 commented 1 year ago

You have hardware acceleration so you could try using the GPU to encode to h.264 which would reduced cpu. But yes hevc is more efficient. I'll go ahead and close, feel free to create a new issue if something else comes up