All Opensource Projects
Native CLI v0.1.0 • Web Preview

Multiple Subtitles. One Video.

Add multiple selectable subtitle tracks to your videos without re-encoding. Use the native CLI for powerful local processing or the browser application for a simpler workflow.

Zero Re-encoding
100% On-Device
MP4 & MKV Outputs
embedsubs -- interactive muxer
v0.1.0 Ready

# Step 1 of 4 — 1. Select Video

$? Absolute video path:

D:/Videos/Cinematic_Short_4K.mp4

Detected: H.264 High @ 4K 60fps • AAC 5.1 (Original streams preserved)
Click steps above to preview interactive flow
Preserving Master Video Quality

Soft Subtitles vs. Hardburned Text

Most generic tools burn subtitle text permanently into video pixels through slow, lossy re-encoding. EmbedSubs uses stream copying to package soft subtitle tracks directly into the media container.

Interactive Soft Subtitle Simulation

Experience how a soft subtitle track behaves in a modern video player:

Stream Copy: 4K HEVC (No pixel alteration)Audio: EAC-3 5.1 (Bitstream copy)

Pristine Master Video Stream

Soft subtitles are separate streams. You can switch languages or disable them entirely.

Soft Subtitles (EmbedSubs Approach)

Separate multiplexed streams inside container

  • Zero generational quality loss: Video and audio streams are copied bit-for-bit without decompression or re-compression.
  • Multiple languages simultaneously: Viewers switch between English, Spanish, Sinhala, or any configured track in their player menu.
  • Instant processing: Muxing a 10 GB movie finishes in seconds because no video rendering pipeline is triggered.
  • Toggleable & Accessible: Viewers can disable subtitles or customize typography size and background in compatible players.

Hardburned Subtitles (Legacy Approach)

Pixels permanently drawn into video image

  • Degrades video quality: Re-encoding produces compression artifacts, color banding, and blurs sharp camera details.
  • Locked to one language: Only one subtitle language can ever exist; cannot be turned off or changed.
  • Excessive render time: Requires minutes or hours of intensive CPU/GPU re-encoding, draining battery and generating heat.
  • Permanently obscures footage: Video content behind the text is permanently overwritten and unrecoverable.
Built for Video Engineers & Creators

Engineered for Precision & Safety

Every feature in EmbedSubs was architected to eliminate common video muxing pitfalls: silent stream drops, unwanted re-encoding, and corrupt output files.

Zero Quality Loss

Stream Copy Preservation

Passes video and audio packets directly to the destination container without transcoding. 100% of your master bitrate, colorspace, and audio fidelity remain uncompromised.

Verified in v0.1.0
Global Accessibility

Multi-Track & Multi-Language

Mux as many subtitle tracks as you need into a single MP4 or MKV container. Viewers can switch seamlessly between languages in standard media players.

Verified in v0.1.0
SRT, VTT, ASS, SSA

Universal Input Formats

Native support for SubRip (.srt), WebVTT (.vtt), Advanced SubStation Alpha (.ass), and SubStation Alpha (.ssa) external subtitle streams verified via FFprobe inspection.

Verified in v0.1.0
Smart Normalization

ISO 639-3 Language Engine

Filename heuristics infer languages automatically (e.g. .en.srt, .spa.vtt, .sin.srt) and validate them against the ISO 639-3 database with manual override support.

Verified in v0.1.0
Player Compatibility

Default & Forced Controls

Set an explicit default subtitle track or choose no-default mode. EmbedSubs inspects temporary MP4 box atoms and clears the enabled track header bit that FFmpeg otherwise forces.

Verified in v0.1.0
DaVinci Resolve / Editor Safe

NLE Timecode Reconstruction

Detects single-sample tmcd timecode tracks from NLE exports that FFmpeg cannot directly copy, safely reconstructing them using write_tmcd with verified frame rates and sample counts.

Verified in v0.1.0
Data Integrity

Atomic Exclusive Output

Muxing executes in a private temporary directory. Output is structurally validated with FFprobe before creating an exclusive hard link, guaranteeing no partial or corrupt files ever reach your destination.

Verified in v0.1.0
Privacy First

100% Local & Private

Operates strictly on your own hardware without transmitting a single byte over the network. Perfect for confidential footage, large 4K/8K media, and air-gapped workstations.

Verified in v0.1.0
Right Tool for the Job

Native CLI vs. Browser Web App

Both interfaces process your media locally on your own machine without uploading video to a remote server. Choose the edition that fits your workflow and media complexity.

Native CLI

For Heavy & Complex Media

Harnesses the full power of native FFmpeg and FFprobe installed on your workstation. Ideal for multi-gigabyte 4K ProRes/HEVC files, advanced ASS styling, chapter mapping, and professional NLE timecode preservation.

Unlimited file sizes bounded only by your hard drive
Native performance with atomic hard link output safety
Requires Node.js & FFmpeg setup in your terminal
Explore CLI Documentation

Browser Web App

Zero Installation Workflow

Runs client-side in your modern web browser. No terminal commands, no package managers, and no external FFmpeg binaries to install. Perfect for quick tasks on laptops and guest machines.

No software installation required — works instantly
Private: media never leaves your browser sandbox
Limited by browser tab memory (~2 GB – 4 GB maximums)
Launch Browser App
Capability / MetricNative CLI (v0.1.0)Browser Web Tool
Processing EnvironmentNative terminal process (Node.js + system FFmpeg)In-browser WebAssembly worker thread
File Size CapacityUnconstrained (Handles 10 GB – 100 GB+ master files)Subject to browser memory sandboxes (~2 GB – 4 GB limit)
Data Privacy & Uploads100% On-Device local filesystem (Zero uploads)100% On-Device in-browser memory (Zero server uploads)
Setup & PrerequisitesRequires Node.js >= 22.13 and FFmpeg on PATHZero installation (Open link in Chrome, Safari, Firefox)
Subtitle FormatsFull support: SRT, WebVTT, ASS, SSA inputsStandard web-compatible subtitle formats
Stream & Timecode HandlingPreserves chapters, metadata & reconstructs NLE tmcd timecodeFocused on core video, audio, and subtitle track multiplexing
Output ContainersMP4 (with mov_text header patching) and MKVMP4 & MKV according to deployed browser engine
Ideal Use CaseLong-form films, 4K/8K footage, archival master videosQuick web videos, social media clips, zero-setup machines
Behind the Scenes

Modular, Resilient Architecture

Written in strict TypeScript with ESM modules. EmbedSubs replaces monolithic, opaque scripts with a predictable, verifiable muxing pipeline.

plan.ts & timecode.ts• Core Subsystem

Stream Mapping Engine

Calculates exact stream mapping instructions (-map 0:v, -map 0:a, -map 1:s). Excludes incompatible streams and identifies single-sample NLE tmcd timecode tracks for safe reconstruction via write_tmcd.

Technologies: Zero re-encode planner • NLE Timecode logic
Architecture Contract Strict TypeScript

# Security Guarantee:

shell: false (No shell injection)

exclusive: true (No file overwrite)

structural_verify: true

Behind The Code

The Engineering Story

EmbedSubs was created to solve a genuine engineering problem: adding multiple subtitle languages to an existing video archive while guaranteeing that original audio and video streams are preserved bit-for-bit without generational degradation.

1

Stream Preservation vs. Re-encoding Temptation

The Challenge

Most GUI tools and beginner scripts take the easy route: they feed the video through an FFmpeg encoder (like libx264/libx265) to bake subtitles into pixels. For a 15 GB 4K video, this takes 45 minutes, degrades sharpness, strips HDR metadata, and locks the file to one language.

The Engineering Solution

EmbedSubs implements a strict stream-copy rule: -c:v copy and -c:a copy. By operating at the container level rather than the pixel level, video frames remain untouched, processing completes in seconds, and multi-language soft subtitle tracks can be switched at will.

2

The MP4 Default Subtitle Quirk

The Challenge

FFmpeg's internal MOV/MP4 muxer defaults to setting the 'enabled' flag bit on the first subtitle track header (tkhd atom) even if the user explicitly specifies no default subtitle track. In QuickTime-family players, this caused subtitles to play automatically against the user's intent.

The Engineering Solution

Rather than accepting broken metadata, EmbedSubs includes mp4.ts—a bounded ISO base media box traversal utility. It safely walks the generated MP4 atom tree (moov > trak > tkhd) and clears the enabled flag bit in the temporary file before structural verification.

3

DaVinci Resolve 'tmcd' Timecode Tracks

The Challenge

Master MP4 exports from professional video editors (like DaVinci Resolve) frequently contain a single-sample tmcd timecode track that FFmpeg reports as an unknown codec, causing direct stream copying to abort with a fatal error.

The Engineering Solution

EmbedSubs inspects the tmcd stream, confirms it is an unambiguous single-sample track matching the video timecode, and rebuilds the timecode track using FFmpeg's write_tmcd option. Post-mux FFprobe verification checks the sample count, frame rate, and timecode value to guarantee broadcast synchronization.

4

Zero-Corruption Atomic File Safety

The Challenge

A script that writes directly to destination.mp4 risks exposing truncated files if killed midway, or overwriting valuable master media if a destination already exists.

The Engineering Solution

EmbedSubs isolates execution inside an ephemeral .embedsubs-* directory beside the destination. Only after FFprobe verifies that stream codecs, subtitle tracks, and chapter markers are 100% intact does it save via an exclusive filesystem hard link (with zero overwrite permitted).

Developer & Maintainer

Designed & Built by Praboth Charith

Software engineer & UI/UX designer focusing on developer tooling, system utilities, and performant web architecture. EmbedSubs is part of an ongoing suite of open-source tools designed to solve real engineering bottlenecks.

Native CLI 0.1.0 • Web Preview

Ready to Embed Subtitles Without Re-encoding?

Run EmbedSubs directly in your workstation terminal with native FFmpeg, or try the browser application for zero-install workflows.

0%