Skip to content

Android app (APK) — phone as the caster #8

Description

@gluckdev

Summary

An Android app so the phone is the remote and the media server — discover DLNA/Chromecast/AirPlay on Wi-Fi and cast files, web video (YouTube/Rutube/VK/any site), and radio with cover art, including multi-room. This is the ideal form factor (it's how BubbleUPnP / Web Video Cast / AllCast work), and Android — unlike a browser — can do the raw networking needed.

Why Android fits

Android apps have raw sockets (SSDP discovery + /24 scan), plus mature native pieces:

  • DLNA: jUPnP / Cling (device discovery + AVTransport control).
  • Chromecast: Google Cast SDK — first-class on Android.
  • ffmpeg: ffmpeg-kit (transcode to dongle-safe baseline H.264, the same approach as the desktop app).
  • yt-dlp: youtubedl-android (yt-dlp bundled via Chaquopy).
  • The phone runs a small HTTP server and streams to the TVs (same model as the desktop HTTPServerThread/streamers).

Approaches

Primary — native Kotlin (recommended): Kotlin + jUPnP + Cast SDK + ffmpeg-kit + youtubedl-android. Fully standalone on the phone, best UX; ground-up rewrite (no Python reuse) but mirrors the proven cast apps. Port the logic (re-encode rules, play-once, DLNA OP/headers, radio cover-art compositing) from cast_to_tv.py.

Alt 1 — Python-on-Android: Kivy/BeeWare + Chaquopy reuses the existing engine, but packaging ffmpeg/yt-dlp and the native cast SDKs is rough (pychromecast/pyatv on Android are unreliable). Max code reuse, lower polish.

Alt 2 — thin client: a WebView/native shell over the web local-agent (#); fastest MVP but needs the backend running somewhere.

Scope (native path)

  • DLNA discover + AVTransport cast (jUPnP); Chromecast via Cast SDK; AirPlay best-effort.
  • Sources: local files, web URLs via youtubedl-android, radio with live cover art; transcode via ffmpeg-kit to baseline H.264; phone-hosted HTTP server.
  • Multi-room fan-out; pause/seek/stop; protocol-tagged device list.
  • APK build + release.

Acceptance

  • Cast a local file and a YouTube/VK link from the phone to a DLNA dongle and a Chromecast.
  • Radio with cover art plays; multi-room starts on 2+ devices.

Shares design with the desktop engine; the headless CastingController (#) is reusable if the Python-on-Android path is chosen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions