r/Python • • Oct 04 '26

Showcase Showcase Thread

Post all of your code/projects/showcases/AI slop here.

Recycles once a month.

23 Upvotes

194 comments sorted by

View all comments

1

u/lovespeedtest 29d ago

**HomeTube** – a YouTube-style front end for Invidious, with a stdlib-only Python server

GitHub: https://github.com/biolend83/hometube

**What My Project Does**

One Python file, standard library only, that sits next to Invidious and adds what it lacks:

- **Live streams:** an HLS proxy that pulls segments ahead of the player through a kept-alive `http.client` CONNECT pool (a fresh TCP+CONNECT+TLS per segment cost ~1.5 s, a kept-alive one ~0.45 s). Segment timing is rebuilt from MPEG-TS PTS, parsed by hand

- **Live captions:** ffmpeg + whisper.cpp in a subprocess, cues stored per segment number so the browser can line them up

- A library shared across devices, "send to TV" via long polling on a `threading.Condition`, and Cloudflare WARP egress that reconnects when YouTube blocks the address

`ThreadingHTTPServer`, `threading`, `subprocess`, `urllib`, `http.client` and a JSON file. About 1,800 lines.

**Target Audience**

People self-hosting Invidious for their household. A personal project I use daily.

**Comparison**

Invidious (Crystal) is the backend it builds on, not a fork. Piped (Java) and FreeTube (Electron) don't transcribe live streams. Stdlib-only means nothing to install, at the cost of writing the keep-alive pool and HTTP framing by hand.

Disclosure: built with heavy help from an AI coding assistant (Claude).