Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#447·mediabunny

Mediabunny should write an edit list

Author: JonnyBurgerCreated Jul 27, 2026Updated Jul 30, 2026
  1. Create a MP4+AAC with Mediabunny
  2. Write 1 second of video and 1 second of audio
  3. Use the output as input
  4. .computeDuration()
  5. Observe that the duration is 1.066667s.

Gist: https://gist.github.com/JonnyBurger/f5766bca2a7544eb8640617302347cb4

This is due to AAC priming. I see in most MP4 files that there is an edts atom - probably exactly because of that.

Compare to FFmpeg:

ffmpeg -f lavfi -i "anullsrc=channel_layout=stereo:sample_rate=48000" -t 1 -c:a aac -b:a 128k -y ffmpeg-silence.mp4

Inputting that into Mediabunny works as expected - 1sec duration. The first timestamp is -0.021333s.

I think Mediabunny should adopt this as well and write an edit list.

  • Could it be that this leads to audio playback being out of sync? Given that we don't negative timestamp the first packet? (Didn't test)
  • QuickTime bug: Seeking to the end of a video encoded with Mediabunny makes the video turn black.

For internal reference: https://github.com/remotion-dev/remotion/issues/7099

Source: Vanilagy/mediabunny

View original on GitHubView discussion on GitHub