Skip to content
Proyectos

Allcrafter1/cast-audio-receiver-lab

Ver en GitHub

Acerca de

Experimental Linux Google Cast audio receiver and modular output bridge

Diseño y multimedia

Cómo se miden estas cifras

What you can do

  • Create a stable Cast speaker and a YouTube endpoint for every configured output. Both identities use exactly the same player, session and volume.
  • Receive regular YouTube through <speaker name> (YT), including playback, seek, track changes, queue controls and replay after natural end.
  • Receive YouTube Music with play/pause, seek, skip, volume, queue progression, metadata and artwork feedback.
  • Control the active YouTube Music session from Home Assistant with Play, Pause, Stop, Seek, volume, mute and real-queue Next/Previous without taking ownership away from the connected desktop, phone or tablet.

Crecimiento de estrellas medido

in 24h
0
in 7 days
+1
in 15 days
Recopilando historial
in 1 month
Recopilando historial

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

README.md

Original

Cast Audio Receiver Lab

Cast YouTube, YouTube Music, TuneIn and ordinary Cast media to outputs that Google does not normally expose as Cast receivers. Each configured local, AirPlay, DLNA or Sonos output appears as a normal audio receiver plus a second YouTube-compatible endpoint whose name ends in (YT).

We built this because YouTube Music on Android has no useful AirPlay path, while many perfectly good amplifiers and speakers do. What began as a protocol experiment is now a working Linux receiver, output bridge and Home Assistant App with one small management interface.

[!WARNING] This is experimental interoperability software, not an official Google, Apple, Home Assistant or Music Assistant product. Cast authentication can be revoked or changed independently of this code. Use it on a trusted LAN and keep a known-working release available.

Install in Home Assistant

Add the Cast Audio Receiver repository to Home Assistant

If the button does not open your instance, add this repository manually under Settings → Apps → App store → Repositories:

https://github.com/Allcrafter1/cast-audio-receiver-lab

Install Cast Audio Receiver Lab, start it and select Open Web UI. The same interface is also available on your trusted LAN at:

http://HOME_ASSISTANT_IP:8788

Port 8788 is the default and can be changed in the App configuration. The current release supports amd64 and aarch64 (64-bit ARM). ARM64 has native build/runtime checks; physical ARM speaker acceptance remains untested.

In the Web UI, choose an output type, select or enter its target, give it the name you want to see in sender apps, and enable it. Use that normal name from YouTube Music, TuneIn and other audio senders; use the automatically created (YT) name from the regular YouTube app. Route definitions and stable Cast IDs are stored under /data and survive App restarts and updates.

What it can do

  • Create a stable Cast speaker and a YouTube endpoint for every configured output. Both identities use exactly the same player, session and volume.
  • Receive regular YouTube through <speaker name> (YT), including playback, seek, track changes, queue controls and replay after natural end.
  • Receive YouTube Music with play/pause, seek, skip, volume, queue progression, metadata and artwork feedback.
  • Control the active YouTube Music session from Home Assistant with Play, Pause, Stop, Seek, volume, mute and real-queue Next/Previous without taking ownership away from the connected desktop, phone or tablet.
  • Home Assistant control policy: retain the standard Google Cast integration. Displaying/browsing the active YouTube Music playlist in Home Assistant is deliberately outside the current scope; no separate HA integration is planned for that purpose.
  • Receive public live radio from the TuneIn Android sender with station resolution, metadata and normal playback/volume controls.
  • Receive direct HTTP(S) media, radio and local/TTS URLs through the Cast Default Media Receiver path used by Home Assistant.
  • Play locally with mpv, forward to AirPlay with Music Assistant's airplay-cli, or send to compatible DLNA and Sonos renderers.
  • Discover supported network targets, keep routes across restarts and manage them from one LAN/ingress interface.
  • Report redacted health and support information without including credentials, target addresses or signed media URLs.

Sonos through AirPlay is reported in daily use by contributor zero00zero (Era 100 and “Play”). The direct Sonos output has automated tests and real FFmpeg conversion coverage, but no physical-device acceptance. See network outputs and volume policy. Spotify Cast, Bluetooth and Google Home speaker groups are not goals of this release. Spotify already has Spotify Connect; Google Home does not adopt this experimental device identity into native groups.

Home Assistant can create two Google Cast entities for one output. This is expected: the normal name is the audio receiver and the (YT) entity is the regular-YouTube route. Both control the same output; disable the (YT) entity in Home Assistant if you do not need it. Existing output IDs and the audio receiver are retained, so this is not a playback/session migration.

Why this is technically unusual

A Cast receiver is more than an HTTP media player. It must advertise the right speaker capabilities over mDNS, establish the Cast V2 channel, pass device authentication, launch the application requested by the sender, translate its control model and continuously report real output state back to the phone.

The project combines a maintained fork of Vibecast with a Python product layer and real output transports. The important part is not merely obtaining an audio URL: the phone must continue to see a coherent Cast session while mpv, AirPlay or DLNA is actually doing the playback.

YouTube / YouTube Music / TuneIn / Home Assistant / another DMR sender
                       │
                       ▼
       maintained Vibecast frontend (Rust)
        discovery · TLS/auth · Cast sessions
        YouTube/Lounge · TuneIn · Default Media Receiver
                       │
             player protocol v2 (loopback)
                       │
                       ▼
          one Python adapter per speaker
             ├─ mpv → local audio
             ├─ FFmpeg → PCM → airplay-cli
             ├─ HTTP relay/remux → DLNA
             └─ direct URL or shared HTTP relay → Sonos (experimental)

Read How it works for the story behind discovery, authentication, YouTube sessions, the output bridge, DIAL and the limits of the current approach. Current architecture is the short maintainer map.

Current compatibility

Path Current evidence
YouTube Music → local audio Extensively tested during development and through the published HA App.
Regular YouTube → audio output 0.8.0-dev1 adds a YouTube-only video identity sharing the existing speaker's runtime. Android YouTube selection and actual mpv decoding are verified on the test laptop; Music retains the speaker. See dual identities and validation.
YouTube Music → AirPlay Tested with the legacy AirReceiver reference target, including persistent sessions and controls. HomePod/native AirPlay 2 and Yamaha hardware still need acceptance tests.
Home Assistant direct media / radio Tested through the Default Media Receiver path. This does not imply support for every Cast app or DRM service.
TuneIn public live radio Implemented and tested with public stations, metadata, switching and controls. Premium/DRM, every station and every ad flow are not claimed.
DLNA Tested on an older Samsung TV, including its connection-approval flow; renderer compatibility still varies.
Sonos AirPlay use reported by contributor; direct Sonos has automated/FFmpeg coverage, hardware acceptance pending.
amd64 / ARM64 containers Both are built and smoke-tested natively. Physical ARM output acceptance remains open.

See the working plan for the distinction between implemented, automated-tested, deployed and user-confirmed work.

The 0.8.0-dev1 release retains each original speaker UUID and adds a stable video alias named <output name> (YT), advertised only through YouTube's app subtype. Both identities share one player, session owner and volume state, regardless of the output backend. Music and other clients respecting discovery/availability use the speaker; generic scanners can still expose both identities. Existing explicit browser launches on the original endpoint remain accepted.

The capability lab retains the earlier 25-profile and paired experiments across PR #18's four announcement layers. Its silent LOAD results are separate from the product's real-output validation. The tested dual profile changes mDNS and Cast capability masks only for the alias; Eureka and outgoing API display flags retain their audio defaults.

Authentication and first start

The repository and container image contain no embedded Cast credentials. On a clean first start, the pinned release manifest downloads a separately versioned experimental authentication bundle, verifies its exact size and SHA-256 digest, and stores it privately in persistent App state. A local replacement bundle can be configured instead, and existing state is never silently overwritten.

That separation makes the material replaceable and withdrawable; it does not make the mechanism official or durable. A sender update, revocation or expiry can stop it working. See bundle distribution and the authentication section in How it works.

Container and native installs

The published multiarch (amd64 / arm64) image is:

ghcr.io/allcrafter1/cast-audio-receiver:0.8.0-dev2

It needs host networking for Cast/mDNS and target discovery, plus persistent /data storage. Native source installs additionally need the maintained Rust frontend and runtime tools. Follow Installation and deployment rather than starting the individual processes by hand.

Development and maintenance

python -m pip install -e '.[youtube,dlna,sonos]'
PYTHONPATH=src:. python -m unittest discover -s tests -v

Useful maintainer documents:

The release container runs Python 3.15. Its amd64 and ARM64 runtime locks use separately reviewed wheel hashes and a matching source inventory. These records are updated as one unit; a requirements-only bot bump is intentionally not enough. Protocol and transport updates also need targeted regression tests.

Origin, licence and contributions

This project would not exist without Vibecast, Shanocast's protocol research, Music Assistant's airplay-cli, FFmpeg, mpv, yt-dlp, Chromium's published Cast protocol sources and the researchers who documented Cast device authentication. The exact relationship and licences are recorded in THIRD_PARTY_NOTICES.md. Attribution does not imply endorsement.

Original project code is MPL-2.0: modifications to an MPL-covered file stay under MPL, while those files can be combined with Apache-2.0 and other code in a larger work. Third-party components retain their own copyrights and licences. In particular, the maintained Vibecast fork remains MIT, Chromium's schema remains BSD-3-Clause and the separate airplay-cli executable remains GPLv3. See the exact file/component boundaries and the dated provenance audit. Releases through 0.6.0-dev21 remain available under their original GPL-3.0-or-later terms.

The project does not use Google's official Cast SDK or a receiver registered in the Cast developer console.

Much of the implementation was developed collaboratively with GPT/Astra and other AI coding assistance. I have almost no programming experience but requirements, architecture and behavior were worked out together and then tested repeatedly on real devices. Experienced review and contributions are very welcome.

Explorar proyectos relacionados

Cargando…