You are browsing as a guest. Sign up (or log in) to start making projects!

2h 58m 43s logged

Devlog #1

SubBake is a desktop app I’m building that embeds subtitle files (SMI / SRT / ASS / SSA / VTT / SUP) into MKV, MP4 and WebM as real subtitle tracks. Python + PySide6, FFmpeg bundled, GPL v3. This devlog covers the first stretch: empty repo to a working conversion pipeline.

What I did

  • Repo scaffold, GPL license, and a .gitignore that keeps the 300 MB ffmpeg/ folder out of git
  • download_ffmpeg.py — downloads a static FFmpeg build for Windows / Linux / macOS, unpacks it, deletes the leftovers
  • core/ffmpeg_locator.py — finds that binary later (bundled, PyInstaller temp dir, or PATH)
  • Parsers for SMI and VTT, an SRT writer, encoding detection, and a matcher that pairs videos with their subtitle files

Problems

  • The SMI parser found 12 cues in a whole episode. I’d forgotten re.DOTALL, so any dialogue with a line break killed the match early. One flag later, hundreds of cues.
  • Opened my test subtitle in VS Code and panicked - the entire file was mojibake. Took me a minute to realize the file is CP949 and the editor was just displaying it as UTF-8. The converter had already decoded it correctly. Editor lied, pipeline didn’t.

The “throw it at the converter” test

Grabbed a real SMI off the internet (a K-ON episode) and ran it through. 385 cues, first one at 00:00 31,458, Korean perfectly intact. The side-by-side screenshot says it best: left is the mojibake original, right is the clean SRT that came out. That’s the encoding fallback doing its job.

Where SubBake stands

  • FFmpeg downloads and gets located on all three OSes
  • SMI / VTT → SRT conversion verified on real data
  • No muxer, no GUI — it still can’t bake anything

Next up

core/muxer.py: run FFmpeg as a subprocess, stream the progress output, handle cancel, and pick the right subtitle codec per container (mov_text / webvtt / copy). Devlog #2 should have actual player screenshots instead of terminal text.

0
41

Comments 0

No comments yet. Be the first!