Skip to content

WebRTC Microphone Button Not Appearing for go2rtc Exec Stream with Backchannel #2084

Description

@woeiwen

I'm trying to digitalize my Fermax 4+N analog intercom system with cvbs video using a Raspberry Pi 4B with Home Assistant OS and the go2rtc addon. I've successfully got video and audio working in the forward direction (intercom → browser), but I can't get the microphone button to appear in the WebRTC card for two-way audio.
Hardware Setup:

Fermax 4+N intercom (CVBS video + analog audio)
EasyCap USB capture device (video + audio input)
RPi4B audio output via PulseAudio to intercom speaker
go2rtc version: 1.9.14
WebRTC Camera card version: 3.6.1

Current go2rtc Configuration:

yamlstreams:
  intercom:
    - "exec:ffmpeg -f v4l2 -input_format yuyv422 -video_size 320x240 -i /dev/video0 -f pulse -i alsa_input.usb-MACROSILICON_AV_to_USB2.0_20200909-02.analog-stereo -c:v h264_v4l2m2m -b:v 500k -g 10 -c:a libopus -ar 16000 -ac 1 -b:a 10k -f rtsp {output}"
    - "exec:ffmpeg -fflags nobuffer -f s16le -ar 16000 -ac 1 -i pipe: -c:a pcm_s16le -ar 48000 -ac 2 -af 'aresample=async=1' -f pulse alsa_output.platform-fe00b840.mailbox.stereo-fallback#backchannel=1"

webrtc:
  candidates:
    - 192.168.2.199:8555
    - stun:8555
  ice_servers:
    - urls: [stun:stun.l.google.com:19302]

api:
  origin: '*'

Lovelace Card:

yamltype: custom:webrtc-camera
url: intercom
mode: webrtc
media: video,audio,microphone
ui: true

What Works:
✅ Forward video and audio (intercom → browser) works perfectly
✅ Backchannel audio pipeline works when I stream web radio or media_player content to it
✅ The second exec line successfully outputs audio to the intercom speaker
What Doesn't Work:
❌ Microphone button doesn't appear in the WebRTC card UI
❌ Microphone button doesn't appear in the go2rtc web player (http://ip:1984/)
What I've Verified:

The go2rtc API shows the stream has "audio, recvonly, ANY" in the consumer medias
There's a pipe producer created ("protocol": "pipe", "medias": ["audio, sendonly, PCML/16000"])
The routing exists: probe consumer receiver → pipe producer sender

The Problem:
Even though the #backchannel=1 tag creates the audio pipeline infrastructure, go2rtc doesn't seem to advertise bidirectional audio capability to WebRTC clients. The stream appears as send-only (video/audio out) rather than bidirectional.
Similar Working Projects:
I found this ESPHome intercom project that successfully implements two-way audio: https://github.com/n-IA-hane/esphome-intercom
Their setup uses UDP streams for bidirectional audio, but the key difference is they have separate audio-only streams, not video+audio combined like my use case.

Questions:

  1. Is #backchannel=1 supposed to work with WebRTC exec streams in go2rtc 1.9.14?
  2. Do I need a different approach to make the stream advertise bidirectional capability?
  3. Has anyone successfully implemented WebRTC two-way audio with go2rtc using exec streams with UVC cameras or USB capture cards (not native two-way RTSP/ONVIF cameras with built-in backchannel support)?
  4. Should I be using a different stream configuration pattern?

Thank you

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions