Replies: 1 comment 2 replies
-
@heshuimu Wow! This is really special! I also wanted to get into this at some point, but never knew how to tackle it! I'd love to merge and integrate this officially into Remotion. Since we also support audio composition, I would still use FFMPEG for that, and try to bring back the concurrency option! This would be the first foray into custom renderers, and a good start to later support more complex stuff like custom Blink builds that can run in headless mode on all operating systems. This would enable many opportunities in the long run! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
https://github.com/heshuimu/RemotionWebKitRenderer
This is a hack project I put together. I found that using Remotion's own built-in rendering with Chromium instances, the rendering speed was not up to frame rate, and due to memory usage, I can only enable --concurrency 2.
With this tool displaying a WKWebView on screen, using 1 view alone significantly reduced rendering time. For example, on my MacBook Pro (Late 2019, Intel i9, Radeon 5500M), rendering using provided Chromium takes 83 seconds plus 4 seconds of encoding time. My tool took 20 seconds, doing both rendering and encoding at the same time.
https://www.youtube.com/watch?v=luR654eyqJo
One bonus is that my tool skips writing rendered image to disk by encoding the capture directly with AVFoundation features, which should perform better for longer videos and have better capture quality before encoding (Remotion writes the capture as JPEG).
The ugly part is that the view has to be on screen or JavaScript won't run, so there has to be a window on screen displaying the content.
Beta Was this translation helpful? Give feedback.
All reactions