Skip to content

How to use substreams for live view? #1942

Description

@soonerfan237

Currently my advanced-camera-card is showing the main streams for all cameras. I'm probably just missing something easy, but nothing I've tried so far has worked. If any one can point me in the right direction, I would really appreciate it!

Here's what I've tried:

  1. Used go2rtc settings in the advanced-camera-card yaml to specify the name of the substream. In this case, kitchen_camera is the name of my substream in go2rtc.
  2. Set the name of the stream for the substream in go2rtc to be the same as the camera name in my frigate config.yml
  3. Set the live > stream_name option in my frigate config.yml to be the name of the substream.
  4. I've tried restarting Home Assistant, the Frigate integration, and the Frigate docker container. I've tried viewing from different devices/browsers in case there was something going on with cache.
  5. I've confirmed that the rtsp stream for the substream is valid by viewing through VLC.

Let me know if any other information would be helpful.

advanced-camera-card yaml

type: custom:advanced-camera-card
cameras:
  - camera_entity: camera.kitchen
    live_provider: go2rtc
    go2rtc:
      modes:
        - mse
        - webrtc
        - mp4
        - mjpeg
      stream: kitchen_camera
    title: Kitchen
menu:
  buttons:
    microphone:
      enabled: false
      type: momentary
      alignment: opposing
    cameras:
      enabled: false
    substreams:
      enabled: false
    live:
      enabled: false
    clips:
      enabled: false
    snapshots:
      enabled: false
    download:
      enabled: false
    camera_ui:
      enabled: false
    timeline:
      enabled: false
    iris:
      enabled: false
    media_player:
      enabled: false
    fullscreen:
      enabled: false
    display_mode:
      enabled: false
  style: overlay
  position: bottom
  alignment: right
live:
  preload: true
  zoomable: false
  show_image_during_load: true
dimensions:
  aspect_ratio_mode: static
cameras_global:
  dimensions:
    layout:
      fit: fill

go2rtc section in Frigate's config.yml

go2rtc:
  streams:
    kitchen_camera_main:
      - rtsp://<user>:<password>@<camera_ip>:554/h264Preview_01_main 
      - ffmpeg:rtsp://<user>:<password>@<camera_ip>:554/h264Preview_01_main#audio=opus
    kitchen_camera:
      - rtsp://<user>:<password>@<camera_ip>:554/h264Preview_01_sub
      - ffmpeg:rtsp://<user>:<password>@<camera_ip>:554/h264Preview_01_sub#audio=opus
  ffmpeg:
    volume: -af "volume=30dB"
  webrtc:
    candidates:
      - http://<frigate_ip>:8555
      - stun:8555

cameras section in Frigate's config.yml

cameras:
  kitchen_camera:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/kitchen_camera_main
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/kitchen_camera
          input_args: preset-rtsp-restream
          roles:
            - detect
            - audio
      output_args:
        record: preset-record-generic-audio-aac
    live:
      stream_name: kitchen_camera
    detect:
      width: 892
      height: 512
      fps: 5
    motion:
      mask:
        - 0.762,0,0.762,0.079,0.215,0.077,0.215,0
        - 0.648,0.152,0.673,0,0.526,0,0.515,0.215
        - 0.404,0.281,0.423,0,0.34,0,0.318,0.316
    zones:
      dining_room_zone:
        coordinates: 0,282,0,0,288,0,275,170
      kitchen_zone:
        coordinates: 0,512,892,512,892,0,753,329,434,152,296,163,0,286
      living_room_zone:
        coordinates: 892,0,450,0,429,152,752,321
    record:
      enabled: true
      retain:
        days: 7
        mode: all
      alerts:
        retain:
          days: 30
      detections:
        retain:
          days: 30
    snapshots:
      enabled: true
      retain:
        default: 14
    audio:
      enabled: true
      listen:
        - bark
    birdseye:
      order: 2
    ui:
      order: 2
    objects:
      track:
        - person
        - dog
      filters:
        person:
          min_score: 0.9
        dog:
          min_score: 0.75
    review:
      alerts:
        labels:
          - person
          - bark
      detections:
        labels:
          - dog

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions