● v1.6.0 · installer and portable build on GitHub ReleasesMedia tools · Local HTML + desktop (Electron)

WebP Forge

Convert images and video without them leaving your computer.

output formats, including MP4 and WebM
7
versions published on GitHub Releases
4
lines of in-house JavaScript, no libraries
≈3500

Technologies: JavaScript · HTML / CSS · Web Workers · WebCodecs · ImageDecoder · MediaRecorder · Electron · electron-builder · electron-updater · Node.js + jsdom

The problem

Moving between images, animations, and video needs pieces a web page does not ship with: GIF encoding, animated WebP assembly, and WebM and MP4 packaging. On top of that, what is possible depends on each browser's APIs, so the app had to detect them and warn when one is missing.

Goal

Bring image and video conversion, analysis, and comparison into one tool, without uploading files to any service. It had to work by opening an HTML file in Chrome or Edge and also as a Windows desktop app.

My contribution

I wrote the format core in plain JavaScript with no libraries: parsers for WebP, PNG, JPEG, GIF, and BMP, a GIF encoder, an animated WebP assembler, WebM and MP4 muxers, and a ZIP writer. On top of it I built the batch interface and packaged it with Electron, with an installer, a portable build, and automatic updates for the installed version from GitHub Releases.

LIVE ARCHITECTURE

Architecture

Every moving dot is data; amber marks alerts. Tap a component to see what it does and what it connects to.

Architecture: WebP ForgeData flowToward the output
SourcesAt the stationIngestionCoreOutputInterface
SourcesAt the stationIngestionCoreOutputInterface

Tap a piece, or press Enter on it, to see what it does and what it connects to.

See every connection as a list
  • User files to Format parsersread on the device
  • Format parsers to Queue and strategiestype, dimensions, and duration
  • Browser APIs to Queue and strategieswhich strategies apply
  • Queue and strategies to Encoders and muxersframes or video
  • Encoders and muxers to Local downloadsvalidated output
  • Queue and strategies to Batch interfaceprogress and statistics
  • Electron shell to Batch interfacesame HTML
The whole pipeline runs on the device; Electron wraps the same page.

Decisions

  1. Files stay on the device

    The conversion code makes no network requests: it reads files through browser APIs and hands back the result as a local download. The only outside resources are the Google Fonts typefaces and, in the desktop version, the update check against GitHub.

  2. Hand-written formats

    I implemented the containers instead of relying on libraries: GIF with median-cut quantization and LZW, animated WebP on RIFF, and WebM and MP4 (ISO BMFF) muxers with H.264 via WebCodecs. They are pure functions, so they can be tested in Node without a browser.

  3. A strategy chain for video

    To turn a video into MP4, the app first tries H.264 through WebCodecs, transcoding or capturing in real time, and if that does not apply or fails it falls back to MediaRecorder, which also keeps the audio. WebCodecs results are validated before they are accepted, and if a strategy fails the next one runs without stopping the batch.

  4. GIF encoding off the main thread

    GIF encoding runs in a Web Worker so that quantizing a large GIF does not block the page, and the queue caps concurrent conversions at 1, 2, 4, or 6.

  5. One HTML for web and desktop

    A build script joins the pieces into one HTML page with the code inlined, which Electron loads as is. The desktop window runs with context isolation, without Node integration, and sandboxed.

What it does

  • Flexible input

    Drag files in, pick files or whole folders, or open ZIP archives, whose contents are expanded for conversion.

  • Format analysis

    Reads the structure of WebP files (lossy or lossless, alpha, ICC, EXIF, XMP, frames, duration, even truncated files) as well as PNG, JPEG, GIF, and BMP.

  • Images, animation, and video

    Outputs WebP (still or animated), PNG, JPG, BMP, GIF, MP4, and WebM, with an automatic format per source type and JPG/WebP quality adjustable from 10 to 100.

  • MP4 with H.264

    H.264 encoding through WebCodecs with GPU acceleration when the machine supports it, and a maximum or balanced bitrate policy.

  • Batches with statistics

    A queue with adjustable concurrency and a panel showing speed, size savings, and estimated time.

  • Filters and search

    Quick filters by type and status, advanced filters by format, duration, audio, and status, and search by name.

  • Before-and-after comparison

    A preview with the original and the result side by side, each with its file size.

  • Export and desktop

    Download files one by one or the whole batch as a ZIP built by the app itself. The desktop version comes as an installer or a portable build, and the installed one updates itself from GitHub Releases.

Screenshots

Outcome

Version 1.6.0 is on GitHub Releases with an installer and a portable build for Windows, the fourth published release. The project includes four Node test scripts, one of them using jsdom, covering parsing, video muxing, the encoders, and the interface. The source is public.

Limits

There is no hosted demo: the web version is the HTML file opened in Chrome or Edge. User files never leave the device, although the page loads its fonts from Google Fonts and the desktop version checks GitHub for updates. Available formats depend on the browser: without ImageDecoder an animated WebP is converted from its first frame only, and when MP4 with audio is not possible the app produces WebM to keep the sound. The installer is not code-signed, and on startup the desktop app stores a high-performance GPU preference in the user profile, which can be reverted in Windows graphics settings.

NEXT CASEPort Manager