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

Problem support for proxying HLS clips for events #809

Closed
jjavin opened this issue Dec 13, 2024 · 2 comments
Closed

Problem support for proxying HLS clips for events #809

jjavin opened this issue Dec 13, 2024 · 2 comments

Comments

@jjavin
Copy link

jjavin commented Dec 13, 2024

Version of the custom_component

5.6.0

Configuration

qtt:
  host: 192.168.0.12
  port: 1883
  topic_prefix: frigate
  client_id: frigate
  user: ***
  password: ****
  stats_interval: 60
ffmpeg:
  hwaccel_args: preset-intel-qsv-h264
  output_args:
    record: preset-record-generic-audio-aac

##############################
go2rtc:
  streams:
    Pozo_H:
      - rtsp://*******:*******@192.168.2.126:554/h264Preview_01_main
      - ffmpeg:Pozo_H#audio=aac

    Pozo_L:
      - rtsp://*******:*******@192.168.2.126:554/h264Preview_01_sub
      - ffmpeg:Pozo_L#audio=aac
    Jacuzzi_H:
      - rtsp://*******:*******@192.168.2.119:554/h264Preview_01_main
      - ffmpeg:Jacuzzi_H#audio=aac#video=h264#hardware

    Jacuzzi_L:
      - rtsp://*******:*******@192.168.2.119:554/Preview_01_sub
      - ffmpeg:Jacuzzi_L#audio=aac
    Puerta_H:
      - rtsp://*******:*******@192.168.2.131:554/Preview_01_main
      - ffmpeg:Puerta_H#audio=aac#video=h264#hardware

    Puerta_L:
      - rtsp://*******:*******@192.168.2.131:554/h264Preview_01_sub
      - ffmpeg:Puerta_L#audio=aac
    Rocalla_H:
      - rtsp://*******:*******@192.168.2.77:554/Preview_01_main
      - ffmpeg:Rocalla_H#audio=aac

    Rocalla_L:
      - rtsp://*******:*******@192.168.2.77:554/h264Preview_01_sub
      - ffmpeg:Rocalla_L#audio=aac
    Portero_H:
      - rtsp://*******:*******@192.168.2.137:554/h264Preview_01_main
      - ffmpeg:Portero_H#audio=aac#audio=copy#audio=opus

    Portero_L:
      - rtsp://*******:*******@192.168.2.137:554/h264Preview_01_sub
      - ffmpeg:Portero_L#audio=aac
    Garaje_H:
      - rtsp://*******:*******@192.168.2.100:554/h264Preview_01_main
      - ffmpeg:Garaje_H#audio=aac

    Garaje_L:
      - rtsp://*******:*******@192.168.2.100:554/h264Preview_01_sub
      - ffmpeg:Garaje_L#audio=aac
    Interior_H:
      - rtsp://*******:*******@192.168.2.97:554/h264Preview_01_main
      - ffmpeg:Interior_H#audio=aac

    Interior_L:
      - rtsp://*******:*******@192.168.2.97:554/h264Preview_01_sub
      - ffmpeg:Interior_L#audio=aac
  webrtc:
    candidates:
      - 192.168.0.6:8555
      - stun:8555


detectors:
  coral:
    type: edgetpu
    device: usb

model:
  path: plus://*****

birdseye:
  enabled: true
  mode: continuous
  restream: true


cameras:

  Pozo:
    birdseye:
      order: 1
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/Pozo_L?video=copy&audio=aac
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/Pozo_L?video=copy
          roles:
            - detect
    live:
      stream_name: Pozo_L
    detect:
      fps: 5
      enabled: true # <---- disable detection until you have a working camera feed
      width: 1536 # <---- update for your camera's resolution
      height: 576
    motion:
      threshold: 30
      contour_area: 10
      frame_height: 150
      mask:
        - 1536,290,1038,197,881,143,758,127,665,99,486,133,483,255,0,321,0,0,1536,0
    record:
      enabled: true
      retain:
        days: 10
        mode: all
      alerts:
        retain:
          days: 10
          mode: motion
    objects:
      track:
        - person
        - face
        - license_plate
        - dog
        - cat
        - car
        - amazon
        - fedex
        - ups
        - package
      filters:
        dog:
          min_score: .7
          threshold: .9
        cat:
          min_score: .7
          threshold: .9
        face:
          min_score: .7
        package:
          min_score: .65
          threshold: .9
        license_plate:
          min_score: .6
        amazon:
          min_score: .75
        ups:
          min_score: .75
        fedex:
          min_score: .75
        person:
          min_score: .7
          threshold: .75
          max_area: 60000
          max_ratio: 0.7
          min_area: 500
        car:
          min_score: 0.70
#         threshold: 0.8
          threshold: .85
          min_area: 4000
          max_area: 100000
          mask:
            - 0,576,0,270,497,164,675,127,878,177,1387,576
  Jacuzzi:
    birdseye:
      order: 4
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/Jacuzzi_L?video=copy&audio=aac
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/Jacuzzi_L?video=copy
          roles:
            - detect
    live:
      stream_name: Jacuzzi_L
    detect:
      fps: 5
      enabled: true # <---- disable detection until you have a working camera feed
      width: 1536 # <---- update for your camera's resolution
      height: 576
    motion:
      threshold: 30
      contour_area: 10
      frame_height: 150
      mask:
        - 0,0,0,304,280,281,345,269,457,41,321,193,842,152,916,187,1025,187,1536,31,1536,0,1536,0
    record:
      enabled: true
      retain:
        days: 10
        mode: all
      alerts:
        retain:
          days: 10
          mode: motion
    objects:
      track:
        - person
        - face
        - license_plate
        - dog
        - cat
        - car
        - amazon
        - fedex
        - ups
        - package
      filters:
        dog:
          min_score: .7
          threshold: .9
        cat:
          min_score: .7
          threshold: .9
        face:
          min_score: .7
        package:
          min_score: .65
          threshold: .9
        license_plate:
          min_score: .6
        amazon:
          min_score: .75
        ups:
          min_score: .75
        fedex:
          min_score: .75
        person:
          min_score: .7
          threshold: .75
          max_area: 60000
          max_ratio: 0.7
        car:
          min_score: 0.70
#         threshold: 0.8
          threshold: .85
          min_area: 4000
          max_area: 100000
          mask:
            - 0,576,0,270,497,164,675,127,878,177,1387,576
  Rocalla:
    birdseye:
      order: 1
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/Rocalla_L?video=copy&audio=aac
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/Rocalla_L?video=copy
          roles:
            - detect
    onvif:
      host: 192.168.2.77
      port: 8000
      user: *******
      password: *******
    live:
      stream_name: Rocalla_H
    detect:
      fps: 5
      enabled: true # <---- disable detection until you have a working camera feed
      width: 640 # <---- update for your camera's resolution
      height: 360
    motion:
      threshold: 30
      contour_area: 10
      frame_height: 150
    record:
      enabled: true
      retain:
        days: 10
        mode: all
      alerts:
        retain:
          days: 10
          mode: motion
    objects:
      track:
        - person
        - face
        - license_plate
        - dog
        - cat
        - car
        - amazon
        - fedex
        - ups
        - package
      filters:
        dog:
          min_score: .7
          threshold: .9
        cat:
          min_score: .7
          threshold: .9
        face:
          min_score: .7
        package:
          min_score: .65
          threshold: .9
        license_plate:
          min_score: .6
        amazon:
          min_score: .75
        ups:
          min_score: .75
        fedex:
          min_score: .75
        person:
          min_score: .7
          threshold: .75
          max_area: 60000
          max_ratio: 0.7
        car:
          min_score: 0.70
#         threshold: 0.8
          threshold: .85
          min_area: 4000
          max_area: 100000
  Garaje:
    birdseye:
      order: 4
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/Garaje_L?video=copy&audio=aac
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/Garaje_L?video=copy
          roles:
            - detect
    onvif:
      host: 192.168.2.100
      port: 8000
      user: *******
      password: *******
    live:
      stream_name: Garaje_H
    detect:
      fps: 5
      enabled: true # <---- disable detection until you have a working camera feed
      width: 640 # <---- update for your camera's resolution
      height: 480
    motion:
      threshold: 30
      contour_area: 10
      frame_height: 150
    record:
      enabled: true
      retain:
        days: 10
        mode: all
      alerts:
        retain:
          days: 10
          mode: motion
    objects:
      track:
        - person
        - face
        - license_plate
        - dog
        - cat
        - car
        - amazon
        - fedex
        - ups
        - package
      filters:
        dog:
          min_score: .7
          threshold: .9
        cat:
          min_score: .7
          threshold: .9
        face:
          min_score: .7
        package:
          min_score: .65
          threshold: .9
        license_plate:
          min_score: .6
        amazon:
          min_score: .75
        ups:
          min_score: .75
        fedex:
          min_score: .75
        person:
          min_score: .7
          threshold: .75
          max_area: 60000
          max_ratio: 0.7
        car:
          min_score: 0.70
#          threshold: 0.8
          threshold: .85
          min_area: 4000
          max_area: 100000
  Interior:
    birdseye:
      order: 4
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/Interior_L?video=copy&audio=aac
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/Interior_L?video=copy
          roles:
            - detect
    onvif:
      host: 192.168.2.97
      port: 8000
      user: *******
      password: *******
    live:
      stream_name: Interior_H
    detect:
      fps: 5
      enabled: true # <---- disable detection until you have a working camera feed
      width: 640 # <---- update for your camera's resolution
      height: 360
    motion:
      threshold: 30
      contour_area: 10
      frame_height: 150
    record:
      enabled: false
      retain:
        days: 10
        mode: all
      alerts:
        retain:
          days: 10
          mode: motion
    objects:
      track:
        - person
        - face
        - license_plate
        - dog
        - cat
        - car
        - amazon
        - fedex
        - ups
        - package
      filters:
        dog:
          min_score: .7
          threshold: .9
        cat:
          min_score: .7
          threshold: .9
        face:
          min_score: .7
        package:
          min_score: .65
          threshold: .9
        license_plate:
          min_score: .6
        amazon:
          min_score: .75
        ups:
          min_score: .75
        fedex:
          min_score: .75
        person:
          min_score: .7
          threshold: .75
          max_area: 60000
          max_ratio: 0.7
        car:
          min_score: 0.70
#         threshold: 0.8
          threshold: .85
          min_area: 4000
          max_area: 100000
  Puerta:
    birdseye:
      order: 2
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/Puerta_L?video=copy&audio=aac
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/Puerta_L?video=copy
          roles:
            - detect
      output_args:
        record: preset-record-generic-audio-copy
    live:
      stream_name: Puerta_L
    detect:
      enabled: true # <---- disable detection until you have a working camera feed
      width: 1536
      height: 432
      fps: 5
    motion:
      threshold: 30
      contour_area: 10
    record:
      enabled: true
      retain:
        days: 10
        mode: all
    snapshots:
      required_zones:
        - todas
        - entrada_casa
    zones:
      todas:
        coordinates: 753,432,0,432,0,0,1536,0,1536,432
        objects:
          - dog
          - cat
          - face
          - package
          - license_plate
          - amazon
          - ups
          - fedex
          - person
      entrada_casa:
        coordinates: 68,432,331,248,719,250,870,432
        objects:
          - car
    objects:
      track:
        - person
        - face
        - license_plate
        - dog
        - cat
        - car
        - amazon
        - fedex
        - ups
        - package
      filters:
        dog:
          min_score: .7
          threshold: .9
        cat:
          min_score: .7
          threshold: .9
        face:
          min_score: .7
        package:
          min_score: .65
          threshold: .9
        license_plate:
          min_score: .6
        amazon:
          min_score: .75
        ups:
          min_score: .75
        fedex:
          min_score: .75
        person:
          min_score: .7
          threshold: .75
          max_area: 60000
          max_ratio: 0.7
        car:
          min_score: 0.70
#        threshold: 0.8
          min_area: 4000
#        max_area: 100000    
          mask:
            - 469,59,348,242,998,187,989,34
            - 681,0,0,0,0,432
    review:
      alerts:
        required_zones:
          - todas
          - entrada_casa
  Portero:
    birdseye:
      order: 3
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/Portero_H?video=copy&audio=aac
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/Portero_L?video=copy
          roles:
            - detect
      output_args:
        record: preset-record-generic-audio-copy
    live:
      stream_name: Portero_H
    detect:
      enabled: true # <---- disable detection until you have a working camera feed
      width: 640 # <---- update for your camera's resolution
      height: 480
      fps: 5
    motion:
#      threshold: 30
#      contour_area: 10
      mask:
        - 0,0,0,299,40,250,99,246,178,201,231,170,253,144,368,39,640,0,640,0
    record:
      enabled: true
      retain:
        days: 10
        mode: all
    objects:
      track:
        - person
        - face
        - license_plate
        - dog
        - cat
        - car
        - amazon
        - fedex
        - ups
        - package
      filters:
        dog:
          min_score: .7
          threshold: .9
        cat:
          min_score: .7
          threshold: .9
        face:
          min_score: .7
        package:
          min_score: .65
          threshold: .9
        license_plate:
          min_score: .6
        amazon:
          min_score: .75
        ups:
          min_score: .75
        fedex:
          min_score: .75
        person:
          min_score: .7
          threshold: .75
          max_area: 60000
          max_ratio: 0.7
        car:
          mask:
            - 640,159,520,242,640,350
          min_area: 500
timestamp_style:
  position: tl
  format: '%d/%m/%Y %H:%M:%S'
  color:
    red: 255
    green: 255
    blue: 255
  thickness: 2
snapshots:
  enabled: true
  timestamp: true
  bounding_box: true
  retain:
    default: 30
version: 0.15-0
camera_groups:
  Interior:
    order: 1
    icon: LuWarehouse
    cameras:
      - Interior
      - Garaje
  Exterior:
    order: 2
    icon: LuFlower2
    cameras:
      - Jacuzzi
      - Portero
      - Pozo
      - Puerta
      - Rocalla
auth:
  failed_login_rate_limit: 1/second;5/minute;20/hour
  trusted_proxies:
    - 172.18.0.0/16
tls:
  enabled: true
notifications:
  enabled: 'true'
  email: ********

Describe the bug

When trying to test HLS in Safari, I continue to have problems.

If I access via http://192.168.0.6:5000/vod/event/1733331723.462579-dw8mp7/master.m3u8 the video plays correctly in Safari and iOS.

If I access via https://xxx.nabu.casa/api/frigate/notifications/1733331723.462579-dw8mp7/Portero/master.m3u8 I get error 502 I try https://xxx.nabu.casa/api/frigate/notifications/1733331723.462579-dw8mp7/master.m3u8 Bad Gateway

I have tried changing elif path.endswith(“master.m3u8”):
url_path = f “vod/events/{event_id}/master.m3u8”
to elif path.endswith(“master.m3u8”):
url_path = f “vod/event/{event_id}/master.m3u8” but still error.

CAPTURE

Debug log

Nothing noteworthy appears.

@NickM-27
Copy link
Collaborator

Thanks, this has been fixed in the latest commit

@jjavin
Copy link
Author

jjavin commented Dec 17, 2024

Thanks to you, I have indeed tested and it works correctly.

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

No branches or pull requests

2 participants