Problem

Want to use Chromecast to output audio (e.g., from video calls, music, system audio) to TV speakers while keeping the microphone input on the computer.

Use Cases

  • Video calls: Hear participants through TV speakers while speaking into computer mic
  • Music/media: Play audio through better TV speakers
  • Presentations: Output presentation audio to TV while using computer for control

Important Note About Google Meet

Google Meet’s built-in casting does NOT send audio to TV by default. When you cast a Google Meet to Chromecast, only the video displays on TV - audio and microphone remain on the computer. This is by design and there’s a known bug affecting audio routing with Meet casting.


Solutions

mkchromecast is a program that casts audio/video from Linux to Google Cast devices. It creates a PulseAudio/PipeWire sink that you can route audio to.

Installation

Option A: From GitHub (Latest)

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

Option B: From package manager (if available)

Terminal window
sudo apt install mkchromecast

Usage

Start mkchromecast to create audio sink:

Terminal window
# Basic usage (auto-detect Chromecast)
mkchromecast
# With specific codec for better quality
mkchromecast --codec mp3 --encoder-backend ffmpeg
# Launch with GUI
mkchromecast -t
# For PulseAudio specifically
mkchromecast --pulseaudio

Route application audio:

  1. Start mkchromecast
  2. Open PulseAudio Volume Control: pavucontrol
  3. Go to “Playback” tab
  4. Find your application (Chrome, Firefox, Spotify, etc.)
  5. Change output to “mkchromecast” sink
  6. Audio now goes to TV speakers

Keep microphone on computer:

  1. In pavucontrol, go to “Input Devices” tab
  2. Your computer mic should already be the default
  3. In “Recording” tab, verify applications use computer mic

Solution 2: Use pulseaudio-dlna

pulseaudio-dlna creates PulseAudio sinks for all UPnP/DLNA/Chromecast devices on the network.

Installation

Terminal window
# Install dependencies
sudo apt install python3-pip python3-setuptools python3-docopt \
python3-requests python3-setproctitle python3-gi \
python3-protobuf python3-netifaces python3-lxml \
vorbis-tools sox lame flac opus-tools
# Install pulseaudio-dlna
sudo pip3 install pulseaudio-dlna

Usage

Start pulseaudio-dlna:

Terminal window
# Basic usage
pulseaudio-dlna
# With specific codec (recommended for Chromecast)
pulseaudio-dlna --codec mp3 --encoder-backend ffmpeg
# Auto-reconnect if connection drops
pulseaudio-dlna --auto-reconnect

Select Chromecast as output:

  1. After starting pulseaudio-dlna, Chromecast appears as audio sink
  2. Use pavucontrol to route specific applications
  3. Or set as default: System Settings → Sound → Output

Note: pulseaudio-dlna has noticeable lag (~2-3 seconds), making it unsuitable for video calls but fine for music.


Solution 3: Chrome Browser Tab Casting (Limited)

Chrome can cast individual tabs, including audio, but this is tab-specific and won’t work for all applications.

Steps

  1. Open Chrome
  2. Click (three dots) → Cast
  3. Select your Chromecast device
  4. Choose “Cast tab” and enable “Cast tab audio”
  5. Open your web app (YouTube, Spotify, etc.) in that tab

Limitations:

  • Only works for that specific Chrome tab
  • Doesn’t cast system audio or other applications
  • Microphone still uses computer (good for video calls)
  • Video quality may be reduced

Audio Routing with pavucontrol

pavucontrol (PulseAudio Volume Control) is essential for managing separate input/output devices.

Install pavucontrol

Terminal window
sudo apt install pavucontrol

Using pavucontrol

Configure Output (Speakers):

  1. Launch pavucontrol
  2. Go to “Playback” tab
  3. For each application, select output device:
    • mkchromecast → TV speakers via Chromecast
    • Built-in Audio → Computer speakers
  4. Set default: “Output Devices” tab → click green checkmark

Configure Input (Microphone):

  1. Go to “Input Devices” tab
  2. Ensure your computer mic is listed and not muted
  3. Go to “Recording” tab
  4. For each application (Chrome, Zoom, etc.), select your computer mic

Set Duplex Mode (Simultaneous Input/Output):

  1. Go to “Configuration” tab
  2. Find your internal audio device
  3. Set profile to: “Analog Stereo Duplex”
  4. This enables simultaneous mic input and speaker output

Step-by-Step: Video Calls with TV Speakers

For Google Meet (or Zoom, Discord, etc.)

  1. Start audio casting:

    Terminal window
    mkchromecast --codec mp3 --encoder-backend ffmpeg
  2. Configure audio routing:

    • Launch pavucontrol
    • Wait for mkchromecast to connect to Chromecast
  3. Join video call:

    • Open Google Meet/Zoom in browser
    • Join meeting
  4. Route call audio to TV:

    • In pavucontrol“Playback” tab
    • Find your browser/app
    • Change output to “mkchromecast”
  5. Verify microphone:

    • In pavucontrol“Recording” tab
    • Verify browser is using computer mic
    • Or check in Google Meet settings → Audio
  6. Test:

    • Speak into computer mic
    • Hear others through TV speakers

Troubleshooting

Issue: No sound from TV

Check:

  1. Is mkchromecast running? Check terminal output
  2. Is Chromecast connected to same network?
  3. Is TV volume up and not muted?
  4. In pavucontrol, is application routed to “mkchromecast”?
  5. Is Chromecast already in use by another app?

Fix:

Terminal window
# Restart mkchromecast
pkill mkchromecast
mkchromecast --codec mp3 --encoder-backend ffmpeg
# Check PulseAudio sinks
pactl list sinks short

Issue: Audio lag/delay

Cause: Network latency, encoding overhead

Solutions:

  1. Use wired Ethernet instead of WiFi (for computer)
  2. Use better codec: --codec mp3 or --codec aac
  3. Use mkchromecast instead of pulseaudio-dlna (lower latency)
  4. For video calls, consider using computer speakers (lag is too noticeable)

Note: Some lag (0.5-2 seconds) is unavoidable with casting. This makes it unsuitable for real-time applications like gaming or some video calls.


Issue: Microphone not working

Check:

  1. In pavucontrol“Input Devices” tab → Mic not muted
  2. In application settings, correct mic selected
  3. Grant mic permissions in browser (Chrome: Site Settings)

Fix:

Terminal window
# List input devices
pactl list sources short
# Test microphone
arecord -f cd -d 5 test.wav
aplay test.wav

Issue: Can’t find Chromecast device

Check:

  1. Chromecast and computer on same WiFi network
  2. Firewall not blocking mDNS/discovery
  3. Chromecast is powered on and connected to TV

Fix:

Terminal window
# Install avahi for device discovery
sudo apt install avahi-daemon avahi-utils
# Check if Chromecast is discoverable
avahi-browse -a

Issue: mkchromecast not creating sink

Solutions:

  1. Make sure PulseAudio is running (or PipeWire with pulse compatibility)

    Terminal window
    # Check audio server
    pactl info
    # If using PipeWire
    systemctl --user status pipewire pipewire-pulse
  2. Try launching with PulseAudio flag explicitly:

    Terminal window
    mkchromecast --pulseaudio
  3. Check dependencies are installed (see Installation section)


PipeWire Support

Modern Ubuntu (22.04+) uses PipeWire instead of PulseAudio. Good news: PipeWire maintains PulseAudio compatibility.

Check if using PipeWire:

Terminal window
pactl info | grep "Server Name"
# Output: PulseAudio (on PipeWire) → using PipeWire
# Output: pulseaudio → using PulseAudio

Compatibility:

  • mkchromecast works with PipeWire (via pulseaudio compatibility layer)
  • pulseaudio-dlna works with PipeWire
  • pavucontrol works with PipeWire
  • All commands use pactl (works with both)

Comparison: mkchromecast vs pulseaudio-dlna

Featuremkchromecastpulseaudio-dlna
LatencyLower (~0.5-1s)Higher (~2-3s)
QualityBetter (configurable codecs)Good
SetupSimpleSimple
GUIYes (-t flag)No
Active DevelopmentModerateLimited
Best ForVideo calls, real-timeMusic, podcasts

Recommendation: Use mkchromecast for lower latency and better control.


Alternative: Use HDMI Cable

For zero latency, consider connecting computer to TV via HDMI:

  • Pros: No lag, perfect sync, simple
  • Cons: Requires HDMI cable, less flexible, computer must be near TV
Terminal window
# After connecting HDMI, select HDMI output in pavucontrol
pavucontrol
# Output Devices tab → Select HDMI

Commands Reference

Terminal window
# Install mkchromecast
sudo apt install python3-pip ffmpeg
git clone https://github.com/muammar/mkchromecast.git && cd mkchromecast
pip3 install .
# Run mkchromecast
mkchromecast --codec mp3 --encoder-backend ffmpeg
# Install and run pulseaudio-dlna
sudo pip3 install pulseaudio-dlna
pulseaudio-dlna --codec mp3 --encoder-backend ffmpeg
# Audio control
pavucontrol # Open GUI mixer
pactl list sinks short # List output devices
pactl list sources short # List input devices
pactl set-default-sink SINK_NAME # Set default output
pactl set-default-source SOURCE_NAME # Set default input
# Test audio
speaker-test -c 2 # Test speakers
arecord -f cd -d 5 test.wav # Record from mic
aplay test.wav # Play recording
# Network troubleshooting
avahi-browse -a # Discover devices on network
pactl info # Check audio server info

Status

  • Date Created: 2025-11-16
  • System: Ubuntu
  • Tested Solutions: Documentation phase
  • Recommended Solution: mkchromecast with pavucontrol