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]: Frigate .15beta Clip issue #308

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

[Issue]: Frigate .15beta Clip issue #308

kiloptero opened this issue Nov 1, 2024 · 41 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,

@kiloptero
Copy link
Author

kiloptero commented Dec 7, 2024 via email

SgtBatten added a commit that referenced this issue Dec 7, 2024
potential fix for #308
@jjavin
Copy link

jjavin commented Jan 7, 2025

Work OK with Frigate HASS 5.7.0.

Thank you!

@kiloptero
Copy link
Author

kiloptero commented Jan 8, 2025 via email

@jjavin
Copy link

jjavin commented Jan 8, 2025

Have you installed the HLS-STREAM 0.12.0.5d blueprint?

@kiloptero
Copy link
Author

kiloptero commented Jan 8, 2025 via email

@jjavin
Copy link

jjavin commented Jan 8, 2025

You can find it here: https://github.com/SgtBatten/HA_blueprints/blob/HLS-stream/Frigate_Camera_Notifications/Beta.yaml

You must modify your automations and select the View Clip (IOS) option.

Best regards,

@kiloptero
Copy link
Author

now i see some progress:)
sometimes send a bad gateway in the ngnix..

EntradaCasasub/master.m3u8

image

@SgtBatten
Copy link
Owner

SgtBatten commented Jan 8, 2025

Okay so frigate integration 5.7 Includes the fix needed?

@lmaced0
Copy link

lmaced0 commented Jan 8, 2025

@kiloptero I got it working by having Video option selected to Clip m3u8 AND View Clip (iOS).

Screenshot 2025-01-07 at 7 50 13 PM Screenshot 2025-01-07 at 7 50 01 PM

SgtBatten added a commit that referenced this issue Jan 11, 2025
* fix for IOS clips

potential fix for #308

* content type for mpegurl
@johnlento
Copy link

I have this same issue however all the clips show up as bad gateway for me. I am on the Frigate 0.15 beta 5 and the beta version of this blueprint. Any ideas on how to solve the bad gateway issue? It happens every notification.

@kiloptero
Copy link
Author

kiloptero commented Jan 16, 2025 via email

@SgtBatten
Copy link
Owner

I have this same issue however all the clips show up as bad gateway for me. I am on the Frigate 0.15 beta 5 and the beta version of this blueprint. Any ideas on how to solve the bad gateway issue? It happens every notification.

Please share the version of the blueprint and your config

@johnlento
Copy link

Its is 12.05.d of the blue print and I have the following settings.

Image Image

In the rare occurrence I don't get a bad gateway I get the video box but the video never plays. Step up from the broken video box.

@johnlento
Copy link

FWIW when I was on Frigate 14 non-beta I was able to convert the MP4 to HEVC with ffmpeg and the video played flawlessly. Now that I am on 15 that quit working and the m3u8 seemed awesome but I can't seem to get it to work at all.

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

10 participants