# Mediabunny fixes WebCodecs' hidden audio delay to achieve sample-perfect AV sync

Original title: Project Sync: The journey to sample-perfect audio/video sync with WebCodecs

> Hacker News story 50370551 · language: en · submitted 2026-11-04
> Web version: https://zeli.app/story/50370551
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 14 · by [vanilagy](<https://news.ycombinator.com/user?id=vanilagy>) · 💬 2
[original](<https://mediabunny.dev/blog/project-sync>) · [HN discussion](<https://news.ycombinator.com/item?id=50370551>)

## Summary

Mediabunny's creator discovered that WebCodecs audio encoders add an uncompensated priming delay—44 ms on macOS with AAC—that breaks AV sync after repeated transcodes. Since the WebCodecs spec and browsers ignore this, Mediabunny now empirically measures each encoder's delay using an impulse signal, shifts packet timestamps negative, and updates every muxer (ISOBMFF, Matroska, MPEG-TS, MP3) to handle negative timestamps correctly.

## Key quote

> What's not correct is pretending that this signal starts at timestamp 0.

---

## Cite

- Page: https://zeli.app/story/50370551
- Date: 2026-11-04
- Source: mediabunny.dev (https://mediabunny.dev/blog/project-sync)
- Hacker News: https://news.ycombinator.com/item?id=50370551

## Other languages

- zh: https://zeli.app/zh/story/50370551 · markdown: https://zeli.app/zh/story/50370551.md
- ja: https://zeli.app/ja/story/50370551 · markdown: https://zeli.app/ja/story/50370551.md
- ko: https://zeli.app/ko/story/50370551 · markdown: https://zeli.app/ko/story/50370551.md
- de: https://zeli.app/de/story/50370551 · markdown: https://zeli.app/de/story/50370551.md
- es: https://zeli.app/es/story/50370551 · markdown: https://zeli.app/es/story/50370551.md
- ru: https://zeli.app/ru/story/50370551 · markdown: https://zeli.app/ru/story/50370551.md
