Joshua Manzer

spectre: a 700 KB audio converter

spectre is a desktop app that does one thing: paste YouTube links, get audio files. It saves MP3 320 kbps, FLAC, or WAV to ~/Desktop/library, tags each file with title and artist, and lets you queue, watch, and cancel downloads.

spectre's queue: one finished FLAC, an MP3 at 62%, and a queued WAV

There are plenty of tools that do this. What I wanted to find out was how small and how quiet such an app could be.

Small

The whole release is about 760 KB on Linux and 700 KB on Windows. There is no Electron, no bundled browser, and no Python runtime: one native executable with a GPU-drawn interface, in about 370 lines of C++. The actual downloading and transcoding are handed to yt-dlp and ffmpeg, which already do that job well.

Quiet

Most desktop apps redraw continuously whether or not anything has changed. spectre redraws only on input or when a download reports progress. Left alone, it uses no measurable CPU: zero seconds of CPU time across a 9-second idle test.

Built on kitui

The interface runs on kitui, an immediate-mode UI library for C++20 that I wrote (private for now). Immediate mode means there are no widget objects to create or keep in sync. The program’s data is the state, and each frame the UI is just function calls. spectre’s whole queue view is a loop over its jobs:

if (kit::button(c, live ? "Cancel" : "Remove", c.px(56))) { /* ... */ }
c.same_line();
kit::text(c, it.title.empty() ? it.url : it.title);
if (it.st == St::Running) kit::progress(c, it.pct);

kitui renders natively on the GPU (OpenGL 3.3 through SDL3 on Linux, Direct3D 11 on Windows), has no third-party runtime dependencies in its core, and sleeps between frames. The download thread calls kit::wake() on each progress update, and that is the only reason spectre ever redraws on its own.

Details that mattered

spectre is source-available under the PolyForm Noncommercial license. Source and releases are on GitHub.