01 / Process

How it works

Podstr is a Chrome extension that intercepts subtitles from the video player and translates them using AI models. No speech recognition — just clean text that's already in the player.

Translation pipeline

01
HLS stream interception
The extension listens to network requests in the browser. When the player loads a subtitle playlist (.m3u8), the extension captures the URL and downloads all .vtt segments via the background service worker — this bypasses CORS restrictions.
02
Segment merging
HLS players split subtitles into fragments of 5–10 seconds each. The extension downloads them all and merges into a single text, removing duplicates at segment boundaries.
03
Batched translation
The text is split into batches of 100 lines and sent to the AI model. The first batch is 50 lines so subtitles appear faster. Each batch is translated preserving line numbers and context.
04
Caching
The finished translation is saved locally and on the server. On repeat viewing, subtitles appear instantly. Best model wins: an Opus translation replaces Sonnet.
05
Rendering over video
Subtitles are rendered over the video in real time via requestAnimationFrame. The player's native subtitles are hidden. Dual subtitles (original + translation) and timing adjustment are supported.

Model comparison

The extension translates via OpenRouter — pay per token, any model. Detailed comparison →

Model Quality ~Price per episode For whom
DeepSeek V3.2 Good ~$0.007 Cheapest
Gemini 3.1 Flash Lite Good ~$0.02 Recommended
Claude Haiku 4.5 Excellent ~$0.06 Best value
Claude Sonnet 4.6 Best ~$0.19 Maximum quality

Prices are approximate, per ~40 min episode (~500 subtitle lines). Calculation: ~12K input + ~10K output tokens.



Installation takes 2 minutes