README
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
1. mkchromecast (Recommended)
- Creates PulseAudio/PipeWire sink for Chromecast devices
- Lower latency and better audio quality control
- GUI option available with
-tflag - 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)
# 1. Start audio castingmkchromecast --codec mp3 --encoder-backend ffmpeg
# 2. Open pavucontrol for audio routingpavucontrol
# 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 TVFor Music/Media (pulseaudio-dlna)
# Install oncesudo pip3 install pulseaudio-dlna
# Runpulseaudio-dlna --codec mp3 --encoder-backend ffmpeg
# Select Chromecast output in pavucontrol or system settingsInstallation Reference
mkchromecast
sudo apt install python3-pip python3-flask python3-psutil \ python3-pychromecast vorbis-tools sox lame flac opus-tools \ ffmpeg nodejs npmgit clone https://github.com/muammar/mkchromecast.gitcd mkchromecastpip3 install .Audio Control Tools
sudo apt install pavucontrol # PulseAudio volume control GUIsudo apt install avahi-utils # Device discoveryTroubleshooting Checklist
| Issue | Solutions |
|---|---|
| No sound from TV | Check if mkchromecast running, verify Chromecast network, confirm pavucontrol routing, check TV volume |
| Audio lag/delay | Use mkchromecast instead of pulseaudio-dlna, use wired ethernet, select better codec (mp3/aac) |
| Microphone not working | Check pavucontrol Input Devices tab, verify app settings, test with arecord command |
| Can’t find Chromecast | Ensure same WiFi network, check firewall, verify Chromecast powered on, use avahi-browse -a |
| mkchromecast not creating sink | Verify PulseAudio/PipeWire running, try explicit flag --pulseaudio, check dependencies installed |
Audio Routing with pavucontrol
Essential steps for separate input/output:
-
Output (Speakers):
- Playback tab → select output device per application
- Output Devices tab → set default (green checkmark)
-
Input (Microphone):
- Input Devices tab → ensure mic not muted
- Recording tab → verify applications using computer mic
-
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
# List audio devices and sinkspactl list sinks shortpactl list sources short
# Check active audio serverpactl info | grep "Server Name"
# Test audiospeaker-test -c 2arecord -f cd -d 5 test.wavaplay test.wav
# Network discoveryavahi-browse -a
# Set default devicespactl set-default-sink SINK_NAMEpactl set-default-source SOURCE_NAMERelated Research
- logitech-brio-ubuntu - Webcam setup on Ubuntu systems
- appimage-ubuntu - AppImage application deployment
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