-
-
Notifications
You must be signed in to change notification settings - Fork 952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish guidelines for making an Electron app #2426
Comments
I'm currently building an Electron App and including a remotion bundle to render videos inside of it. It already works pretty well when running the Electron app locally in dev mode but when bundling the Electron App I'm currently running into the following error: I also tried to provide own ffmpeg and ffprobe executables but it didn't seem to help. Any hints on how to resolve this? |
@dsumer Let's only consider the v4 case, because it is the future.. in it, FFmpeg will not be in You should be able to bundle as normal, if you specify './compositor' as external dependency and then copy the contents of the Here are examples:
|
I successfuly upgraded my app to Remotion v4 and now the integration into my Electron App seems more promising! :D Already got a packaged version up and running but as soon as I'm packaging my app's source code using asar, I get the following error message: I also tried to unpack just the compositor file from the asar package, but then it's also not working because remotion is still looking for the compositor inside the asar package and I guess there's no option to define another path to look for the Compositor package. I'm a bit confused by your answer above because at the moment I'm using webpack to generate my remotion bundle (and include it into my electron app) .. and there I couldn't define the compositor as external correctly ... with the |
@dsumer You need two bundles:
|
I guess the error you get is true, you use a chmod command for a directory? Can you show what you are trying to do? |
I got it working! 🥳 So yes, I confused the Remotion Bundle (which includes the actual Video written in Remotion) and my Bundle which renders the video using Before I didn't even have a "real" bundle for my Electron specific code .. I just compiled my TypeScript code using Therefore I switched to
So the Hopefully I'll find the time to write an in-depth blog post for it soon, it may be helpful until official guidelines are published :) |
Some other issues I stumbled into after signing / notarizing the Electron MacOS app and distributing it to other machines:
But now it really seems to work, even on external MacOS machines :) |
That's sick, thanks for documenting! |
I'm encountering the same problem and couldn't find a beginner guide help me do this. I would really appreciate if anyone can point me into the right direct, especially @dsumer and @JonnyBurger, since you guy are experts in this area. Thanks in advance. What I want to archive is the do an as simple as possible task, which is:
I already setup a project up with some initial example code and try to get it running. My public repo for this: https://github.com/TuanManhCao/electron-remotion A few things about this project, I setup this project using eletron-vite. And already setup some code to make the Say Hello button interact with main thread. My guess is that I need to figure out a way to make the project's bundler to bundle all the remotion code and put it in And then find a way to invoke renderMedia with right parameters and setup so that it will output the video as I wanted. To make thing a little clearer I explain my thought and my setup in this video. |
@TuanManhCao Super nice! |
I hit another roadblock. Essentially, when it ran the code with In my case, I think since electron-vite use vite, the So I think I might need to do something similar to Dominik, maybe use esbuild for both. Would appreciate any help you guys can provide 🙏 . I'll report back if I figure out anything. |
Updated the project to support build for distribution. My approach mostly similar to Dominik but a bit different when it comes to to modify the path to "@remotion/compositor". I decided to patch the remotion/render package to support electron. Check out the project I put in the previous comment. Will make a video explaining how it was done. If I found time. Note to build for distribution run yarn build:mac |
We are refactoring how the binaries work from v4.0.97 on step by step. This will make it easier in the end to copy the dependencies into the Electron app and we can probably publish a smooth way to do so (have not yet tried it yet though) Until it is done, I recommend staying on 4.0.83 because the internals are changing from version to version. |
Thanks for the head up Jonny! |
In recent versions of Remotion, it has gotten a bit easier.
There is also a challenge to include the browser binaries and sign them. I recommend this message on Discord to find a possible solution! https://discord.com/channels/809501355504959528/817306238811111454/1213120432329203803 This is a good step forward, but we still want to make it easier and document a flow. |
Explain how to embed Remotion - and also FFmpeg and Chrome inside a Electron app.
The text was updated successfully, but these errors were encountered: