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

Two-way audio breaks when used with the WebRTC card with mic, but works reliably in normal WebRTC mode #787

Open
brujoand opened this issue Dec 31, 2024 · 2 comments
Labels
question Further information is requested

Comments

@brujoand
Copy link

Setup:

I'm running Frigate 0.15.0 Beta 4 which bundles go2rtc 1.9.2.
The relevant configuration for go2rtc:

go2rtc:
  streams:
    ringeklokke:
      - "ffmpeg:http://10.20.1.17/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password={FRIGATE_RINGEKLOKKE_PWD}#video=copy#audio=copy#audio=opus"
      - ffmpeg:ringeklokke#audio=opus
    ringeklokke_mic:
      - rtsp://admin:{FRIGATE_RINGEKLOKKE_PWD}@10.20.1.17:554/h264Preview_01_sub
      - ffmpeg:ringeklokke_mic#audio=opus
  webrtc:
    candidates:
      - 10.31.0.5:8555

The WebRTC integration has been installed and the ip of frigate is set as the go2rtc server. I have also configured the WebRTC card to view the doorbell camera with microphone enabled:

cards:
 - type: 'custom:webrtc-camera'
   streams:
     - url: ringeklokke_mic
       mode: webrtc/tcp
       media: video,audio,microphone

What works:

When watching the WebRTC stream of 'ringeklokke_mic' through the go2rtc links the stream loads and plays fine. No stutters, and audio is clear.

Problem:

When I try to watch the stream through the webrtc-camera card the stream loads both video and audio + microphone. I can speak and hear myself speaking, although the volume is much lower than with the Reolink app. But every ~5 seconds the stream is interrupted and an error is shown with "No stream with supported MIME format found". After a few seconds the stream re-loads, and everything repeats.

Second problem:

After a while the problem stops. But now the stream is held consistently even after closing the dashboard window. This means that no other devices can use the camera and the doorbell no longer responds to presses as it is in "play sound" mode.

My guess is that these two problems are related and that the issue is actually with how the stream is managed, but I don't know enough about the implementation here.

@brujoand
Copy link
Author

The way I view my other camera streams in HA is through the frigate card, embedding the WebRTC card. :inception:

The funny thing is those streams work perfectly, so I tried wrapping the doorbell in the frigate card in the same way, aaaand it's rock solid suddenly:

cards:
  - type: 'custom:frigate-card'
    cameras_global:
      live_provider: webrtc-card
    cameras:
      - title: Ringeklokke
        webrtc_card:
          url: ringeklokke_mic
          muted: false
          modes: webrtc/tcp
          media: video,audio,microphone         

So I guess the Frigate card is setting some configuration that helps here.

@AlexxIT AlexxIT added the question Further information is requested label Jan 2, 2025
@AlexxIT
Copy link
Owner

AlexxIT commented Jan 2, 2025

Can you show screen with error "No stream with supported MIME format found"?
I don't understand exactly where it appears.

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

No branches or pull requests

2 participants