{
  "id": 1851302,
  "title": "Three things that broke when I moved video compression into the browser",
  "url": "https://urgent.news/2026/08/19/three-things-that-broke-when-i-moved-video-compression-into-the",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-19T02:41:10.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/mengyuxuan/three-things-that-broke-when-i-moved-video-compression-into-the-browser-41l8"
  },
  "original_language": "en",
  "account": "Three key issues emerged when moving video compression into the browser. First, timestamps were absent in AVI files, causing issues with copying the media. The fix involved adding the +genpts flag to ffmpeg, which generated presentation timestamps. Second, output sizes varied significantly between H.264 AVI and Xvid AVI files. The H.264 AVI compression with WebCodecs took just 7.5 seconds, resulting in a 12.3 MB file, while the Xvid AVI with ffmpeg.wasm took 53.4 seconds, yielding a 12.5 MB file. Finally, the audio copy path was not always available due to encoder priming delay. This delay caused audio tracks to double in size compared to the source, rendering the passthrough path unusable. To address this, a floor was implemented to return the original source file if the copy would increase the file size.",
  "summary": "I run a video compressor that works entirely in the browser . No upload, no server, nothing leaves the machine. Two of the three bugs below only showed up when I stopped reading code and started timing things, so I want to write them down while the numbers are still in front of me. The pipeline has three paths. If the file already meets the target, copy the encoded samples and encode nothing. If…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}