dermotduffy / frigate-hass-card

A Lovelace card for Frigate in Home Assistant
MIT License
558 stars 59 forks source link

LIVE VIEW IS HD EVEN IF IT WAS EXPLICITLY USED THE SUB STREAM #1131

Closed HHUBSS closed 1 year ago

HHUBSS commented 1 year ago

Hello, I have updated the frigate server to the latest and the frigate integration and frigate card. I use go2rtc as my live provider but my problem is the viewing stream is defaulting to HD. I can't select the sub-stream unlike when I use the live provider as webrtc, I can select the sub-stream as a viewing stream.

Here's what I get when I select the sub-stream

1

Unlike webrtc, I can select the sub-stream as a viewing stream

2

My setup: I'm running frigate (0.12.0-DA3E197) as a docker container in unraid.

Below is my config:

mqtt:
  host: 192.168.0.2
  port: 1883
  user: [removed]
  password: [removed]

detect:
  width: 640
  height: 480
  fps: 5

record:
  enabled: true
  expire_interval: 60
  retain:
    days: 60
    mode: motion
  events:
    pre_capture: 5
    post_capture: 5

snapshots:
  enabled: true
  bounding_box: true
  retain:
    default: 60
    objects:
      person: 60
      cat: 60
      dog: 60
      bird: 60
      car: 60
      motorcycle: 60

ffmpeg:
  hwaccel_args: preset-vaapi

detectors:
  coral:
    type: edgetpu
    device: usb

go2rtc:
  streams:
    living:
      - rtsp://[removed]:[removed]@192.168.50.100:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1
    living_sub:
      - rtsp://[removed]:[removed]@192.168.50.100:554/Streaming/Channels/102?transportmode=unicast&profile=Profile_1
    rooftop:
      - rtsp://[removed]:[removed]@192.168.50.101:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1
    rooftop_sub:
      - rtsp://[removed]:[removed]@192.168.50.101:554/Streaming/Channels/102?transportmode=unicast&profile=Profile_1
    front:
      - rtsp://[removed]:[removed]@192.168.50.102:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1
    front_sub:
      - rtsp://[removed]:[removed]@192.168.50.102:554/Streaming/Channels/102?transportmode=unicast&profile=Profile_1
    parking:
      - rtsp://[removed]:[removed]@192.168.50.103:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1
    parking_sub:
      - rtsp://[removed]:[removed]@192.168.50.103:554/Streaming/Channels/102?transportmode=unicast&profile=Profile_1

ui:
  live_mode: webrtc

live:
  height: 640
  quality: 1

rtmp:
  enabled: false

cameras:
  living:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/living_sub
          input_args: preset-rtsp-restream
          roles:
            - detect
        - path: rtsp://127.0.0.1:8554/living
          input_args: preset-rtsp-restream
          roles:
            - record
    live:
      stream_name: living_sub
    objects:
      track:
        - person
        - cat
    motion:
      mask: 0,56,216,55,215,21,0,21
    zones:
      living_zone:
        coordinates: 462,480,468,182,480,21,394,0,258,0,244,58,115,61,0,60,0,135,0,480
        objects:
          - person
          - cat

  rooftop:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/rooftop_sub
          input_args: preset-rtsp-restream
          roles:
            - detect
        - path: rtsp://127.0.0.1:8554/rooftop
          input_args: preset-rtsp-restream
          roles:
            - record
    live:
      stream_name: rooftop_sub
    record:
      events:
        required_zones:
          - rooftop_area
    snapshots:
      required_zones:
        - rooftop_area
    objects:
      track:
        - person
        - cat
        - bird
        - dog
    motion:
      mask: 272,253,0,250,0,145,0,0,442,0,640,0,640,480,515,480,471,275,369,264,372,205,276,192
    zones:
      rooftop_area:
        coordinates: 518,480,477,268,370,254,366,181,274,188,253,236,220,237,0,247,0,480
        objects:
          - person
          - cat
          - dog

  front:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/front_sub
          input_args: preset-rtsp-restream
          roles:
            - detect
        - path: rtsp://127.0.0.1:8554/front
          input_args: preset-rtsp-restream
          roles:
            - record
    live:
      stream_name: front_sub
    record:
      events:
        required_zones:
          - front_house
          - planters
          - garage
    snapshots:
      required_zones:
        - front_house
        - planters
        - garage
    objects:
      track:
        - person
        - cat
        - dog
        - car
        - motorcycle
    motion:
      mask: 0,217,0,0,199,0,350,0,447,0,640,0,640,67,640,182,419,204,0,458,0,480
    zones:
      front_house:
        coordinates: 239,480,291,439,360,384,413,331,445,294,479,252,414,246,274,345,83,480
        objects:
          - person
          - car
          - motorcycle
          - dog
      planters:
        coordinates: 552,480,473,459,494,262,405,369,289,480
        objects:
          - person
          - cat
          - dog
      garage:
        coordinates: 489,242,529,194,590,219,576,380,548,480,475,459
        objects:
          - person
          - cat
          - dog  

  parking:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/parking_sub
          input_args: preset-rtsp-restream
          roles:
            - detect
        - path: rtsp://127.0.0.1:8554/parking
          input_args: preset-rtsp-restream
          roles:
            - record
    live:
      stream_name: parking_sub
    record:
      events:
        required_zones:
          - garage
    snapshots:
      required_zones:
        - garage
    objects:
      track:
        - person
        - cat
        - dog
    motion:
      mask:
        - 477,0,481,91,228,81,215,0
        - 0,24,217,24,219,48,0,46
    zones:
      garage:
        coordinates: 478,480,480,89,249,86,221,98,213,34,0,167,0,480,62,480
        objects:
          - person
          - cat
          - dog
dermotduffy commented 1 year ago

There is a stream name field for the go2rtc provider. If I understand your problem correctly, you should just be able to set that to living_sub or whatever go2rtc stream you want.

go2rtc

HHUBSS commented 1 year ago

Thank you. I thought it was in the frigate config that I need to set it to. It is now working. 6