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

[Issue]: IOS clip issues (broken play button) #308

Open
kiloptero opened this issue Nov 1, 2024 · 97 comments
Open

[Issue]: IOS clip issues (broken play button) #308

kiloptero opened this issue Nov 1, 2024 · 97 comments
Labels
help wanted Extra attention is needed

Comments

@kiloptero
Copy link

kiloptero commented Nov 1, 2024

Description

IMG_2892

With the last version of frigate .15beta the clip option is not working. All the rest like always works fine.

the version .14 of frigate works perfect with this addon

Version

Version (0.12.0.4p)

Automation Config

alias: Frigate Not multiple camera
description: ""
use_blueprint:
  path: SgtBatten/Beta.yaml
  input:
    camera:
      - camera.entradacasasub
      - camera.reolink5202
    notify_device: 0f9bb4768279fe312ad33b1b2b6c462b
    message: >-
      A {{ label }} {{ 'is loitering' if loitering else 'was detected' }} on the
      {{ camera_name }} camera{% if entered_zones %} in the {{ entered_zones |
      join(', ') | replace('_',' ') }}{% endif %} at
      {{event['after']['start_time']|timestamp_custom('%H:%M')}}.
    url_3: /lovelace
    button_3: Open HA
    debug: true
    cooldown: 0
    silence_timer: 0
    video: ""
    attachment: thumbnail.jpg

Frigate Config

mqtt:
  host: 10.1.2.100
  user: mqtt_user
  password: hamqtt
  topic_prefix: frigate


objects:
  # Optional: list of objects to track from labelmap.txt (default: shown below)
  track:
    - person
    - cat
    - car
  filters:
          #  bicycle:
          #    threshold: 0.8
    person:
      threshold: 0.75
      min_score: 0.7
    cat:
      threshold: 0.7
      min_score: 0.7
    car:
      threshold: 0.75
      min_score: 0.7

review:
  alerts:
    labels:
      - cat
      - person
      

  detections:
    labels:
      - cat
      - person
      - car
      - bird
      - dog
 


record:
  sync_recordings: True
  enabled: true
  retain:
    days: 10
    mode: all
  alerts:
    retain:
      days: 10
      mode: all
  detections:
    retain:
      days: 10
      mode: all
snapshots:
  enabled: true
  retain:
    default: 500


ffmpeg:
   hwaccel_args: preset-vaapi




go2rtc:
  streams:
    EntradaCasasub:
      - rtsp://login:pass@Ip0:554/h264Preview_01_sub
      - ffmpeg:EntradaCasasub#audio=opus
    EntradaCasa:
      - rtsp://login:pass@Ip0:554/h264Preview_01_main
      - ffmpeg:EntradaCasa#audio=opus

    reolinksub:
      - rtsp://login:pass@Ip1:554/h264Preview_01_sub
      - ffmpeg:reolink#audio=opus
    Reolink5201:
      - rtsp://login:pass@Ip2:554/h264Preview_01_main
      - ffmpeg:reolink#audio=opus
    Reolink5201sub:
      - rtsp://login:pass@Ip2:554/h264Preview_01_sub
      - ffmpeg:reolink#audio=opus
    Reolink5202:
      - rtsp://login:pass@Ip3:554/h264Preview_01_main
      - ffmpeg:reolink#audio=opus
    Reolink5202sub:
      - rtsp://login:pass@Ip3:554/h264Preview_01_sub
      - ffmpeg:reolink#audio=opus
    Reolinkduo21:
      - rtsp://login:pass@Ip4:554/h264Preview_01_main
      - ffmpeg:reolink#audio=opus
    Reolinkduo21sub:
      - rtsp://login:pass@Ip4:554/h264Preview_01_sub
      - ffmpeg:reolink#audio=opus
    Reolinkduo22:
      - rtsp://login:pass@Ip5:554/h264Preview_01_main
      - ffmpeg:reolink#audio=opus
    Reolinkduo22sub:
      - rtsp://login:pass@Ip5:554/h264Preview_01_sub
      - ffmpeg:reolink#audio=opus
    comedero:
      - echo:bash /config/custom_components/expose_camera_stream_source/get_stream.sh
        camera.pet_feeder
    lenovopieza:
      - http://10.1.3.131:2323/?cmd=getCamshot&password=2802
      - ffmpeg:http://127.0.0.1:1984/api/stream.mjpeg?src=lenovopieza#video=h264
    lenovoescritorio:
      - http://10.1.3.130:2323/?cmd=getCamshot&password=2802
      - ffmpeg:http://127.0.0.1:1984/api/stream.mjpeg?src=lenovoescritorio#video=h264
    fire11:
      - http://10.1.3.140:2323/?cmd=getCamshot&password=2802
      - ffmpeg:http://127.0.0.1:1984/api/stream.mjpeg?src=fire11#video=h264
  webrtc:
    candidates:
      - 10.1.2.100:8555
      - stun:8555

#genai:
#  enabled: True
#  provider: gemini
#  api_key: “xxxx”
#  model: gemini-1.5-flash

cameras:
  EntradaCasasub:


    birdseye:
      order: 1
    mqtt:
      timestamp: false
      bounding_box: false
      crop: true
      quality: 100
      height: 720


    ffmpeg:
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps
          1 -strftime 1 -c:v copy -tag:v hvc1 -bsf:v hevc_mp4toannexb -c:a aac
      inputs:
        - path: rtsp://127.0.0.1:8554/EntradaCasa?video=copy&audio=aac
          input_args: preset-rtsp-restream
          roles:
            - record


        - path: rtsp://127.0.0.1:8554/EntradaCasasub?video=copy&audio=aac
          input_args: preset-rtsp-restream
          roles:
            - detect

    live:
      stream_name: EntradaCasasub









    motion:
      mask: 0.335,0.01,0.337,0.071,0.641,0.079,0.636,0.01
    zones: {}
    review:
      alerts: {}
      detections: {}
  Reolinkduo21:
    mqtt:
      timestamp: false
      bounding_box: false
      crop: true
      quality: 100
      height: 720

    ffmpeg:
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps
          1 -strftime 1 -c:v copy -tag:v hvc1 -bsf:v hevc_mp4toannexb -c:a aac
      inputs:
        - path: rtsp://127.0.0.1:8554/Reolinkduo21?video=copy&audio=aac
          input_args: preset-rtsp-restream
          roles:
            - record

        - path: rtsp://127.0.0.1:8554/Reolinkduo21sub?video=copy&audio=aac
          input_args: preset-rtsp-restream
          roles:
            - detect
            - audio
    live:
      stream_name: Reolinkduo21sub




    audio:
      enabled: false
      listen:
        - bark
        - fire_alarm
        - scream
        - speech
        - yell

    zones: {}
    review: {}
  Reolinkduo22:
    mqtt:
      timestamp: false
      bounding_box: false
      crop: true
      quality: 100
      height: 720

    ffmpeg:
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps
          1 -strftime 1 -c:v copy -tag:v hvc1 -bsf:v hevc_mp4toannexb -c:a aac
      inputs:
        - path: rtsp://127.0.0.1:8554/Reolinkduo22?video=copy&audio=aac
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/Reolinkduo22sub?video=copy&audio=aac
          input_args: preset-rtsp-restream
          roles:
            - detect
    live:
      stream_name: Reolinkduo22sub



  reolink:
    mqtt:
      timestamp: false
      bounding_box: false
      crop: true
      quality: 100
      height: 720

    ffmpeg:
      output_args:
        record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://127.0.0.1:8554/reolink?video=copy&audio=aac
          input_args: preset-rtsp-restream
          roles:
            - record

        - path: rtsp://127.0.0.1:8554/reolinksub?video=copy&audio=aac
          input_args: preset-rtsp-restream
          roles:
            - detect
    live:
      stream_name: reolinksub

    objects:
      # Optional: list of objects to track from labelmap.txt (default: shown below)
      track:
        - person
        - cat
        - car
      filters:
              #  bicycle:
              #    threshold: 0.8
        person:
          threshold: 0.75
        cat:
          threshold: 0.75
        car:
          threshold: 0.75

  Reolink5201:
    mqtt:
      timestamp: false
      bounding_box: false
      crop: true
      quality: 100
      height: 720

    ffmpeg:
      output_args:
        record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://127.0.0.1:8554/Reolink5201?video=copy&audio=aac
          input_args: preset-rtsp-restream
          roles:
            - record

        - path: rtsp://127.0.0.1:8554/Reolink5201sub?video=copy&audio=aac
          input_args: preset-rtsp-restream
          roles:
            - detect
    live:
      stream_name: Reolink5201sub



  Reolink5202:
    mqtt:
      timestamp: false
      bounding_box: false
      crop: true
      quality: 100
      height: 720

    ffmpeg:
      output_args:
        record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://127.0.0.1:8554/Reolink5202?video=copy&audio=aac
          input_args: preset-rtsp-restream
          roles:
            - record

        - path: rtsp://127.0.0.1:8554/Reolink5202sub?video=copy&audio=aac
          input_args: preset-rtsp-restream
          roles:
            - detect
    live:
      stream_name: Reolink5202sub



    motion:
      mask: 0.336,0.01,0.341,0.046,0.638,0.051,0.639,0.006


  comedero:
    mqtt:
      timestamp: false
      bounding_box: false
      crop: true
      quality: 100
      height: 720
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/comedero?video
          input_args: preset-rtsp-restream-low-latency
          roles:
            - detect
            - record
            - audio
    objects:
      track:
        - cat
        - person

      filters:
        person:
          threshold: 0.7
          min_score: 0.75




        cat:
          threshold: 0.75
          min_score: 0.7

    audio:
      enabled: false
      listen:
        - speech
        - cat
        - scream
        - purr
        - meow


    motion:
      mask:
        - 0.011,0.083,0.366,0.084,0.363,0.01,0.007,0.014
        - 0.505,0.271,0.503,0.365,0.557,0.372,0.553,0.297
    zones: {}
    review: {}

  lenovopieza:
    mqtt:
      timestamp: false
      bounding_box: false
      crop: true
      quality: 100
      height: 720
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/lenovopieza?video
          input_args: preset-rtsp-restream-low-latency
          roles:
            - detect
            - record





  lenovoescritorio:
    mqtt:
      timestamp: false
      bounding_box: false
      crop: true
      quality: 100
      height: 720
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/lenovoescritorio?video
          input_args: preset-rtsp-restream-low-latency
          roles:
            - detect
            - record




  fire11:
    mqtt:
      timestamp: false
      bounding_box: false
      crop: true
      quality: 100
      height: 720
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/fire11?video
          input_args: preset-rtsp-restream-low-latency
          roles:
            - detect
            - record












detectors:
  coral_1:
    type: edgetpu
    device: usb:0
  coral_2:
    type: edgetpu
    device: usb:1

database:
  path: /config/frigate.db
    # model:
    #  path: "/custom_model.tflite"

birdseye:
  enabled: true
    # 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
  quality: 1
  mode: continuous

detect:
  fps: 5
  enabled: true

#ui:
#  live_mode: mse


version: 0.15-0
camera_groups:
  birdeyes:
    order: 1
    icon: LuBird
    cameras: birdseye
#semantic_search:
#  enabled: true
#  reindex: false
#  model_size: small

Any other relevant information

No response

@kiloptero
Copy link
Author

sending images works perfect
IMG_2895

@SgtBatten
Copy link
Owner

is there a change to the api url?

@kiloptero
Copy link
Author

dont know;(

@SgtBatten SgtBatten added the Awaiting Response Further information is requested label Nov 3, 2024
@SgtBatten
Copy link
Owner

You are using a beta version of software. Surely you read the change notes?

@kiloptero
Copy link
Author

kiloptero commented Nov 3, 2024 via email

@Iceman248
Copy link

I use Frigate 0.15 as well and on this 0.14 version of this blueprint at version 0.14.0.1d, clips worked, but when I updated to f and even g, that is when they stopped working for me. Stays with snapshot.

@kiloptero
Copy link
Author

kiloptero commented Nov 8, 2024 via email

@Iceman248
Copy link

It worked for me with 0.14.0.1d, so I wouldn't say that, it just seems like something after that version broke it.

@kiloptero
Copy link
Author

kiloptero commented Nov 8, 2024 via email

@Iceman248
Copy link

I am using Frigate 0.15. It's just the version number of the blueprint that has 0.14 in it.

@kiloptero
Copy link
Author

kiloptero commented Nov 8, 2024 via email

@kiloptero
Copy link
Author

kiloptero commented Nov 8, 2024 via email

@Iceman248
Copy link

@UPEngineer
Copy link

UPEngineer commented Nov 12, 2024

I am having the same issue. Didn't think about looking in here before I posted in the HA community post.

The weird thing is that if I copy the generated URL and paste it into a computer browser, the clip plays. If I paste it into a browser on my iphone, it does not work and gives me a play icon with a line through it.

@SgtBatten
Copy link
Owner

The weird thing is that if I copy the generated URL and paste it into a computer browser, the clip plays. If I paste it into a browser on my iphone, it does not work and gives me a play icon with a line through it.

this is the weird bit. Not sure where to look. Is everyone on IOS?

@kiloptero
Copy link
Author

kiloptero commented Nov 13, 2024 via email

@Iceman248
Copy link

Android here.

@UPEngineer
Copy link

IOS for me. Neither the stable version or the beta version displays the play clip on Frigate 15 Beta 1. I spun up my Frigate 14 version and it works. Didn't try it with the beta version though.

If you don't know where to look, I dang sure don't know where to do so LOL. Thought about posting something on the frigate github issues page but I didn't know it is a frigate problem, the notification app problem, or an IOS problem.

I was leaning towards maybe something changed the way the video is encoded that mobile devices cannot play correctly. I believe they are using a newer ffmpeg version. Who knows?

@cplemaster
Copy link

cplemaster commented Nov 15, 2024

I’m having the same issue. When I downgrade to Frigate 14 it begins working again. Moving to 15 triggers the problem. Same behavior here that I can copy the link to a desktop browser or mobile VLC and it plays.

iOS user

@kiloptero
Copy link
Author

same issue with the beta 2. image

@Jster42
Copy link

Jster42 commented Nov 28, 2024

Same issue on my iphone, but in a desktop browser it works fine.

@DanielNagy
Copy link

Also noticed this on my iphone post beta1/2 upgrade.

@SgtBatten SgtBatten added help wanted Extra attention is needed and removed Awaiting Response Further information is requested labels Dec 1, 2024
@jjavin
Copy link

jjavin commented Dec 4, 2024

In Safari Mac & iOS it does not load, but the same link in Edge loads perfectly.

@SgtBatten
Copy link
Owner

Apparently HA 2024.12 fixes this. Some people still have an issue with safari browsers, this is a seperate issue but again not something we can fix in the blueprint unfortunately.

Please try 2024.12 and report back.

@jjavin
Copy link

jjavin commented Dec 6, 2024

Hi, with 2024.12 it is already visible from “MEDIA” but the notifications are still not working, when accessing the link https://xxxx.ui.nabu.casa/api/frigate/notifications/173xx95959.778578-xxxx/Portero/clip.mp4 it still does not load the video both on iOS and Safari, however the same link on Egde is visible correctly. From what I have read here in Frigate 0.14 works correctly, so maybe it was some change in 0.15.

Error in inspector: Failed to load resource:
<video controls="" autoplay="" src="https://xxxx.ui.nabu.casa/api/frigate/notifications/173xx95959.778578-xxxx/Portero/clip.mp4" type="video/mp4" class="media-document mac invalid video"></video>

Best regards and thanks for your work.

@kiloptero
Copy link
Author

kiloptero commented Dec 6, 2024 via email

@jjavin
Copy link

jjavin commented Dec 7, 2024

I have opened an issue at Frigate and I have received this answer:

_So it looks like Safari is incapable of handling streaming response MP4 videos. In any case, this is going to be inefficient to handle and safari does support m3u8 natively so the recommendation will be to use the /vod/event/{event_id}/master.m3u8 API call to view videos for iOS instead of the clip API

the integration will be updated to expose this_

blakeblackshear/frigate#15384

I hope it will be helpful in providing a solution to iOS users.
Thank you very much,

@johnlento
Copy link

johnlento commented Feb 12, 2025 via email

@NickM-27
Copy link

right, I asked for the url that was used to view the m3u8 after formatting, so I am just looking for a single URL without any templates

@johnlento
Copy link

johnlento commented Feb 12, 2025 via email

@NickM-27
Copy link

Okay so I think I might see the issue, I forgot that the file types used for HLS are different depending on if the video is h264 or h265. Currently the integration only handles h264, I will need to add support for h265 as well.

@johnlento
Copy link

johnlento commented Feb 12, 2025 via email

@NickM-27
Copy link

@NickM-27
Copy link

Okay I just released version 5.8.0 of the integration which should fix this

@johnlento
Copy link

johnlento commented Feb 12, 2025 via email

@johnlento
Copy link

johnlento commented Feb 12, 2025 via email

@NickM-27
Copy link

So you see video? Nginx bad gateway might be due to video not being available yet

@johnlento
Copy link

johnlento commented Feb 12, 2025 via email

@SgtBatten
Copy link
Owner

So I assume it doesn't work well as an attachment for that reason? Unless you use the delay timer options perhaps?

Just to confirm, you are using a view clip action button and removed the camera variable from the m3u8 option

@johnlento
Copy link

johnlento commented Feb 13, 2025 via email

@codercrack

This comment has been minimized.

@NickM-27

This comment has been minimized.

@codercrack

This comment has been minimized.

@NickM-27

This comment has been minimized.

@codercrack

This comment has been minimized.

@NickM-27
Copy link

NickM-27 commented Feb 14, 2025

When you using master.m3u8, yes. Clip.mp4 does not work on iOS, which is the main topic of discussion here

@SgtBatten
Copy link
Owner

But isn't the link automatically generated by the system?

To reiterate what Nick is saying. you need to change the configuration of the automation. the m3u8 is an option in the dropdowns for action buttons and attchments.

@SgtBatten
Copy link
Owner

@kiloptero @Iceman248 @UPEngineer can we do one check please. This appears solved, Thanks Nick. So i will close it soon.

@FredrikNas
Copy link

FredrikNas commented Feb 18, 2025

Came here from the community forums on the blueprint thread:

This URL plays nicely and swiftly in a desktop browser, but wont play in IOS when i press view clip:

https://z8a0ri**redacted**hc6sj.ui.nabu.casa/api/frigate/notifications/1739860713.095375-fm6tpu/Carport/clip.mp4

My configs:

frigate.yml:

version: 0.15-1
mqtt:
  host: 192.168.x.xx
  #host: core-mosquitto
  port: 1883
  topic_prefix: frigate
  client_id: frigate
  user: xxx
  password: xxx
  stats_interval: 60  # Sends a status message every 60 seconds

detectors:
  coral:
    type: edgetpu
    device: usb

ffmpeg:
  global_args: -hide_banner -loglevel error
  hwaccel_args:
    - -hwaccel
    - auto
  input_args:
    - -avoid_negative_ts
    - make_zero
    - -fflags
    - nobuffer
    - -flags
    - low_delay
    - -strict
    - experimental
    - -fflags
    - +genpts

cameras:
  Parkering:
    ffmpeg:
      inputs:
        - path: rtsp://xxx:[email protected]:554/h264Preview_01_main
          roles:
            - record
        - path: rtsp://[email protected]:554/h264Preview_01_sub
          roles:
            - detect
    detect:
      width: 640
      height: 480
      fps: 5
      enabled: true
      max_disappeared: 25
    record:
      enabled: true
      alerts:
        retain:
          days: 5
      detections:
        retain:
          days: 1
    snapshots:
      enabled: true  # Enables snapshots
      timestamp: true  # Adds timestamp to snapshots
      bounding_box: true  # Draws bounding boxes
      retain:
        default: 7  # Keep snapshots for 7 days
        mode: motion  # Save snapshots only for motion events
    zones:
      innkjøring:
        coordinates: 1,0.969,1,0,0.853,0.076,0.23,0.372,0,0.725,0,0.969
        inertia: 3
        loitering_time: 3
        objects:
          - person
    motion:
      mask: 0.236,0.368,1,0,0,0,0,0.727
      threshold: 38
      contour_area: 29
      improve_contrast: 'true'
    review:
      alerts:
        required_zones: innkjøring

  Carport:
    ffmpeg:
      inputs:
        - path: rtsp://[email protected]:554/h264Preview_01_main
          roles:
            - record
        - path: rtsp://[email protected]:554/h264Preview_01_sub
          roles:
            - detect
    detect:
      width: 640
      height: 480
      fps: 5
      enabled: true
      max_disappeared: 25
    record:
      enabled: true
      alerts:
        retain:
          days: 10
      detections:
        retain:
          days: 1
    snapshots:
      enabled: true  # Enables snapshots
      timestamp: true  # Adds timestamp to snapshots
      bounding_box: true  # Draws bounding boxes
      retain:
        default: 7  # Keep snapshots for 7 days
        mode: motion  # Save snapshots only for motion events
    zones:
      foran_dor:
        coordinates: 1,1,1,0,0.342,0,0.331,0.283,0.188,0.285,0.189,0,0,0,0,1
        inertia: 3
        loitering_time: 3
        objects:
          - person
    motion:
      mask: 0.358,0.072,0.342,0,0.67,0.003,0.667,0.075
    review:
      alerts:
        required_zones: foran_dor

Notification blueprint: (version: 0.14.0.3e)

alias: "Kamera overvåking: Carport -person "
description: "Person detektering i carporten "
use_blueprint:
  path: SgtBatten/Beta.yaml
  input:
    presence_filter:
      - ""
    camera:
      - camera.carport
    notify_device: 57cc749dbdxxxxxx568d7509931a
    title: "Overvåkingskamera: Carporten"
    message: Person detektert i carporten
    attachment: "{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/thumbnail.jpg"
    video: >-
      {{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{camera}}/master.m3u8
    ios_live_view: camera.carport
    zone_filter: true
    labels:
      - person
    tv_position: top-right
    tv_interrupt: true
    tv: false
    debug: true
    zones:
      - foran_dor
    base_url: https://z8a0ri4jxxxxxxxxxxxxxxsj.ui.nabu.casa/
    attachment_2: >-
      {{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/snapshot.jpg?bbox=1&crop=1

I have changed it to clip.mp4 to see if it works in the IOS browser. Waiting for the postman right now :D

@brandonjones24

This comment has been minimized.

@brandonjones24
Copy link

brandonjones24 commented Feb 18, 2025

I re-built my Frigate config from the ground up and seems to be working. I am encountering the occasional server error in my browser, maybe due to navigating to the page too quickly. A refresh always results in loading the clip.

Note the output_args I set globally. This accommodates main feeds of mine that are h265, with an override for my doorbell cam that is h264 on that camera so they all play on my iOS device.

I am monitoring for stability and will report back with updates

mqtt:
  host: 192.168.0.33
  port: 1883
  user: homeassistant
  password: redacted

ffmpeg:
  hwaccel_args: preset-intel-qsv-h264
  input_args: preset-rtsp-generic
  output_args: #recording for h265 main streams (front_door overridden below)
    record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime
      1 -c:v copy -tag:v hvc1 -c:a copy

detectors:
  coral:
    type: edgetpu
    device: pci

model:
  path: plus://redacted
  width: 640
  height: 640

objects:
  track:
    - person
    - car
    - motorcycle
    - bus
    - truck
    - bicycle
    - dog
    - cat
  filters:
    person:
      min_area: 2500
      max_area: 100000
      threshold: 0.7
    car:
      min_area: 5000
      max_area: 200000
      threshold: 0.7
    motorcycle:
      min_area: 2500
      max_area: 100000
      threshold: 0.7
    bus:
      min_area: 10000
      max_area: 200000
      threshold: 0.7
    truck:
      min_area: 10000
      max_area: 200000
      threshold: 0.7
    bicycle:
      min_area: 2500
      max_area: 100000
      threshold: 0.7
    dog:
      min_area: 1500
      max_area: 50000
      threshold: 0.7
    cat:
      min_area: 1500
      max_area: 50000
      threshold: 0.7

record:
  enabled: true
  retain:
    days: 30
    mode: all
  detections:
    pre_capture: 5
    post_capture: 5
    retain:
      days: 10
      mode: motion

snapshots:
  enabled: true
  retain:
    default: 30

go2rtc:
  rtsp:
    username: admin
    password: memorial91
  streams:
    front_yard_wide_main: rtsp://admin:[email protected]/h265Preview_01_main
    front_yard_wide_sub: rtsp://admin:[email protected]/h264Preview_01_sub
    front_yard_zoom_main: rtsp://admin:[email protected]/h265Preview_02_main
    front_yard_zoom_sub: rtsp://admin:[email protected]/h264Preview_02_sub
    driveway_main: rtsp://admin:[email protected]/h265Preview_01_main
    driveway_sub: rtsp://admin:[email protected]/h264Preview_01_sub
    backyard_right_main: rtsp://admin:[email protected]/h265Preview_01_main
    backyard_right_sub: rtsp://admin:[email protected]/h264Preview_01_sub
    backyard_left_main: rtsp://admin:[email protected]/h265Preview_01_main
    backyard_left_sub: rtsp://admin:[email protected]/h264Preview_01_sub
    side_right_main: rtsp://admin:[email protected]/h265Preview_01_main
    side_right_sub: rtsp://admin:[email protected]/h264Preview_01_sub
    side_left_main: rtsp://admin:[email protected]/h265Preview_01_main
    side_left_sub: rtsp://admin:[email protected]/h264Preview_01_sub
    front_door_main: rtsp://admin:[email protected]/h264Preview_01_main
    front_door_sub: rtsp://admin:[email protected]/h264Preview_01_sub

cameras:
  front_yard_wide:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/front_yard_wide_main
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/front_yard_wide_sub
          input_args: preset-rtsp-restream
          roles:
            - detect
    detect:
      width: 1280
      height: 720
      fps: 5

  front_yard_zoom:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/front_yard_zoom_main
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/front_yard_zoom_sub
          input_args: preset-rtsp-restream
          roles:
            - detect
    detect:
      width: 1280
      height: 720
      fps: 5

  driveway:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/driveway_main
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/driveway_sub
          input_args: preset-rtsp-restream
          roles:
            - detect
    detect:
      width: 1536
      height: 432
      fps: 5

  Backyard-Right:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/backyard_right_main
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/backyard_right_sub
          input_args: preset-rtsp-restream
          roles:
            - detect
    detect:
      width: 1280
      height: 720
      fps: 5

  Backyard-Left:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/backyard_left_main
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/backyard_left_sub
          input_args: preset-rtsp-restream
          roles:
            - detect
    detect:
      width: 1280
      height: 720
      fps: 5

  Side-Right:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/side_right_main
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/side_right_sub
          input_args: preset-rtsp-restream
          roles:
            - detect
    detect:
      width: 1280
      height: 720
      fps: 5

  Side-Left:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/side_left_main
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/side_left_sub
          input_args: preset-rtsp-restream
          roles:
            - detect
    detect:
      width: 1280
      height: 720
      fps: 5

  Front_Door:
    ffmpeg:
      output_args: #h264 recording
        record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps
          1 -strftime 1 -c:v copy -tag:v avc1 -c:a copy
      inputs:
        - path: rtsp://127.0.0.1:8554/front_door_main
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/front_door_sub
          input_args: preset-rtsp-restream
          roles:
            - detect
    detect:
      width: 480
      height: 640
      fps: 5
version: 0.15-1
Automation:
alias: Frigate Notifications (new)
description: ""
use_blueprint:
  path: SgtBatten/Beta.yaml
  input:
    presence_filter:
      - ""
    camera:
      - camera.backyard_left
      - camera.backyard_right
      - camera.driveway
      - camera.front_door
      - camera.side_left
      - camera.side_right
    tap_action: >-
      {{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{camera}}/master.m3u8
    url_1: >-
      {{base_url}}/api/camera_proxy_stream/camera.{{trigger.payload_json['after']['camera']
      | lower | replace('-','_')}}?token={{state_attr( 'camera.' ~ camera,
      'access_token')}}
    notify_device: 7bd8baa11b4541c8ce4d11b9c725bcbd
    base_url: https://ha.redacted.com
    button_1: View Stream
    review_severity:
      - alert

@SgtBatten
Copy link
Owner

seems to be working

Sorry to be painful, can you be explicit as to what is now working.

I can see you have tap action set to the iOS clip and it included the camera variable. So is this working when you tap the notification?

You have the default action button set for view clip I believe so that goes to the MP4 clip. Is this working?

@brandonjones24
Copy link

seems to be working

Sorry to be painful, can you be explicit as to what is now working.

I can see you have tap action set to the iOS clip and it included the camera variable. So is this working when you tap the notification?

You have the default action button set for view clip I believe so that goes to the MP4 clip. Is this working?

Tap action works to load the m3u8, though it takes a little longer to load than the MP4 used to. It is working with the included camera variable.

Apart from the m3u8, I am not sure what you're referring to as the default action - can you clarify?

@SgtBatten
Copy link
Owner

When you long press your notification the 3 action buttons are available. The default button 2 uses the mp4

@brandonjones24
Copy link

When you long press your notification the 3 action buttons are available. The default button 2 uses the mp4

Negative, the mp4 link doesnt work

@SgtBatten
Copy link
Owner

I wouldn't expect it to, just pointing out you would want to change it if on iOS.

@brandonjones24
Copy link

So I have done more testing and the 502 error occurs frequently when I tap the notification as it appears. My assumption here is it takes a while for the event m3u8 to be available in Frigate, so the blueprint is unable to proxy. Eventually I can refresh and view the clip.

Assuming this is the case, I don't believe there is anything that can be done to avoid this, correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests