u/redbone3005

A tool to stream local video files to Chromecast with on-the-fly transcoding (castlocal)

I wrote a small web tool called castlocal to play local video files from a PC on a Chromecast without setting up a media server.

What it does:

  • Playback: Scans local directories (~/Downloads and ~/Videos by default). You open the web interface from your PC or phone, choose a video, choose the Chromecast, and hit play.
  • Transcoding: Direct plays MP4 (H264 + AAC). Transcodes MKV, HEVC, AVI, and unsupported audio like DTS on the fly using ffmpeg. Seeking recalculates the conversion from the selected timestamp so sync isn't lost.
  • Subtitles: Automatically loads local .srt or .vtt files with matching names. It also lets you upload a file manually, search OpenSubtitles from the UI, or nudge the timing by ±0.5s.
  • Controls: Play, pause, seek, and volume work natively through the Google Home notification on Android/iOS.
  • Linux integration: Includes a desktop toggle script (starts/stops the server on double-click) and a systemd --user service.

Stack & Requirements:

  • Python 3.11+ (uses uv)
  • ffmpeg with libx264
  • Built with Flask and pychromecast. Tested on a 1st-gen Chromecast.

Repo: https://github.com/frangcisneros/chromecast-cast

u/redbone3005 — 1 month ago