Selected work
Desktop Toolv1.0.0 · TypeScript · Electron · React

yt2mp3 - Portable YouTube to MP3 Converter

Standalone Electron app bundling yt-dlp and ffmpeg to download YouTube videos as MP3 with zero system dependencies

A fully portable Electron application for downloading and converting YouTube videos to MP3 format. Bundles both yt-dlp and ffmpeg binaries (~95 MB total) to eliminate system dependencies, making it drop-in-ready across Windows, macOS, and Linux.

Role — Solo developer
  • Electron
  • React
  • Vite
  • Tailwind CSS
  • React Router
  • React Context
  • Electron Builder
  • yt-dlp-exec
  • ffmpeg-static
  • Node.js
  • CommonJS (main process)
  • React Icons

yt2mp3 is a single-executable desktop app that lets you batch-download YouTube videos and convert them to MP3 on any machine without pre-installed ffmpeg or Python. The entire toolchain—yt-dlp (v2025.09.26) and ffmpeg (v6.0)—is bundled and unpacked at runtime via Electron Builder's asar unpacking mechanism. The frontend is a React SPA using Tailwind CSS and React Router, communicating to the main process via IPC.

The architecture separates concerns cleanly: Vite builds the React renderer to `dist/`, Electron's main process spawns yt-dlp with injected ffmpeg PATH, and a preload bridge exposes safe IPC methods (download, folder selection, file operations). Download state is managed via React Context, with real-time log streaming and progress parsing from yt-dlp's stderr. The app guards against concurrent downloads, tracks active child processes for clean shutdown, and persists download history in the UI.

Building for portability meant solving the binary-distribution problem: `yt-dlp-exec` and `ffmpeg-static` packages download platform-specific binaries during `npm install`, and the electron-builder config unpacks them into `app.asar.unpacked/` so they remain executable after distribution. The test script verifies binary presence and functionality. Total built package size is around 95 MB—yt-dlp at 17.48 MB and ffmpeg at 77.36 MB—a tradeoff for true portability and zero external dependencies.

What's notable
  • Bundled binaries eliminate all system dependencies—users need only Node.js to build, no external ffmpeg, Python, or yt-dlp installation required
  • IPC-driven main process cleanly spawns yt-dlp with injected ffmpeg PATH and tracks child processes for safe app shutdown and concurrent-download guards
  • Real-time log streaming and progress parsing from yt-dlp stdout/stderr; displays download speed, ETA, file size, and recent thumbnail from YouTube metadata
  • Download history persisted in UI with clickable entries showing title, video ID, file location, size, and completion timestamp; quick access to open file or show in folder
  • Batch-queue support and responsive Tailwind UI with loading screen; separate dev (Vite HMR) and production (static bundle) paths