remotion icon indicating copy to clipboard operation
remotion copied to clipboard

Use a custom video tag for smoother playback

Open realies opened this issue 9 months ago • 3 comments

Is it possible to use a playback engine like libav.js in Remotion's frontend? I really like how well it performs - recently played with a webcodecs bridge to libav.js and it felt very smooth, especially when seeking frequently on the timeline. It seems some codecs do better than others in Remotion, and lowering the default GOP for the source files improves seeking at the expense of file size. It was surprising how much better libav.js was with the default keyframe interval (~2s) - seek time of a Blob-buffered file was faster than a single frame (5-33ms) vs hundreds or thousands of milliseconds (assume depending on how close to a keyframe the playhead lands on).

Wondering if reading or demuxing, or decoding has the biggest impact on seek time in the current player media pipeline.

realies avatar Mar 26 '25 17:03 realies

We are indeed planning to improve the Player and rendering performance by replacing the built-in video tag.

The project is split up into @remotion/media-parser https://www.remotion.dev/docs/media-parser and @remotion/webcodecs https://www.remotion.dev/docs/webcodecs

This should hopefully solve our own problems and create some nice-to-use APIs on the way!

JonnyBurger avatar Mar 27 '25 06:03 JonnyBurger

Hey @JonnyBurger

How is the progress on the improvement of the player? I am excited to try

mileslow avatar Apr 09 '25 19:04 mileslow

@mileslow check out the announcement https://www.youtube.com/watch?v=r3dUGdfVnkM

Crsk avatar May 22 '25 13:05 Crsk

Here we go!

https://www.remotion.dev/docs/media/video https://www.remotion.dev/docs/media/audio

JonnyBurger avatar Oct 26 '25 08:10 JonnyBurger