Purpose

Research and documentation on routing audio output to Chromecast-enabled devices (TV, speakers) while maintaining independent microphone input on Ubuntu systems. This research explores multiple solutions for audio/video calls and media playback through TV speakers while preserving computer-based microphone functionality.

Contents

  • tv-speakers-output-with-computer-mic.md - Comprehensive guide covering three solutions (mkchromecast, pulseaudio-dlna, Chrome tab casting) with installation, usage, troubleshooting, and audio routing configuration using pavucontrol.

Key Findings

  • mkchromecast is the recommended solution - Offers lower latency (0.5-1s), better codec control, and includes GUI support, making it ideal for video calls and real-time applications.
  • Audio latency is unavoidable - Network casting introduces 0.5-3 seconds of lag depending on solution choice; unsuitable for gaming but workable for video calls and media.
  • Google Meet has audio limitations - Built-in Chromecast casting for Meet only displays video; audio routing requires separate solution via mkchromecast or similar tools.
  • PulseAudio/PipeWire compatibility - Modern Ubuntu (22.04+) uses PipeWire but maintains PulseAudio compatibility; all documented tools work seamlessly with both audio servers.
  • Duplex audio mode is essential - Simultaneous microphone input and speaker output requires configuring audio device profile to “Analog Stereo Duplex” in pavucontrol.

Key Solutions

  • Creates PulseAudio/PipeWire sink for Chromecast devices
  • Lower latency and better audio quality control
  • GUI option available with -t flag
  • Best for video calls with TV speakers

2. pulseaudio-dlna

  • Creates PulseAudio sinks for UPnP/DLNA/Chromecast devices
  • Simpler network approach
  • Higher latency (2-3s) - better for music than calls

3. Chrome Tab Casting

  • Browser-native casting without additional tools
  • Limited to specific tabs
  • Video quality may be reduced

Quick Start

For Video Calls (mkchromecast)

Terminal window
# 1. Start audio casting
mkchromecast --codec mp3 --encoder-backend ffmpeg
# 2. Open pavucontrol for audio routing
pavucontrol
# 3. In pavucontrol:
# - Playback tab: Route browser to "mkchromecast" sink
# - Recording tab: Verify browser uses computer mic
# - Configuration: Set to "Analog Stereo Duplex"
# 4. Join video call in browser
# 5. Speak into computer mic, hear participants through TV

For Music/Media (pulseaudio-dlna)

Terminal window
# Install once
sudo pip3 install pulseaudio-dlna
# Run
pulseaudio-dlna --codec mp3 --encoder-backend ffmpeg
# Select Chromecast output in pavucontrol or system settings

Installation Reference

mkchromecast

Terminal window
sudo apt install python3-pip python3-flask python3-psutil \
python3-pychromecast vorbis-tools sox lame flac opus-tools \
ffmpeg nodejs npm
git clone https://github.com/muammar/mkchromecast.git
cd mkchromecast
pip3 install .

Audio Control Tools

Terminal window
sudo apt install pavucontrol # PulseAudio volume control GUI
sudo apt install avahi-utils # Device discovery

Troubleshooting Checklist

IssueSolutions
No sound from TVCheck if mkchromecast running, verify Chromecast network, confirm pavucontrol routing, check TV volume
Audio lag/delayUse mkchromecast instead of pulseaudio-dlna, use wired ethernet, select better codec (mp3/aac)
Microphone not workingCheck pavucontrol Input Devices tab, verify app settings, test with arecord command
Can’t find ChromecastEnsure same WiFi network, check firewall, verify Chromecast powered on, use avahi-browse -a
mkchromecast not creating sinkVerify PulseAudio/PipeWire running, try explicit flag --pulseaudio, check dependencies installed

Audio Routing with pavucontrol

Essential steps for separate input/output:

  1. Output (Speakers):

    • Playback tab → select output device per application
    • Output Devices tab → set default (green checkmark)
  2. Input (Microphone):

    • Input Devices tab → ensure mic not muted
    • Recording tab → verify applications using computer mic
  3. Duplex Mode (Simultaneous input/output):

    • Configuration tab → select device
    • Set profile to “Analog Stereo Duplex”

System Information

  • Target OS: Ubuntu (16.04+)
  • Audio Servers: PulseAudio, PipeWire (22.04+)
  • Devices: Chromecast Audio, Chromecast TV, Google Home
  • Tested Scenarios: Video calls (Meet, Zoom), Music streaming, System audio
  • Status: Documentation complete, solutions verified

Commands Reference

Terminal window
# List audio devices and sinks
pactl list sinks short
pactl list sources short
# Check active audio server
pactl info | grep "Server Name"
# Test audio
speaker-test -c 2
arecord -f cd -d 5 test.wav
aplay test.wav
# Network discovery
avahi-browse -a
# Set default devices
pactl set-default-sink SINK_NAME
pactl set-default-source SOURCE_NAME

Notes

  • Audio latency is inherent to network streaming; adjust expectations for real-time applications
  • Wired connection (ethernet) on the computer reduces latency compared to WiFi
  • PipeWire provides better long-term support than pure PulseAudio on modern Ubuntu versions
  • Google Meet’s casting implementation has known limitations; third-party tools provide better control

Last updated: 2025-11-24