Executing a binary (ffmpeg) from a build
See original GitHub issueIs your feature request related to a problem? Please describe.
I’m trying to use a ffmpeg binary in the build. It works by placing the binaries in the public
folder and then referencing them through __static
. However, in the build, it doesn’t work. Maybe because of permission, as in, the macOS app isn’t allowed to execute the binaries?
Describe the solution you’d like child_process.execFile( path.join(__static, “ffmpeg”)) should work in the build app.
Describe alternatives you’ve considered
Tried referencing the binaries outside of the public
folder (for example app.getPath("exe")
) but with no success so far.
Additional context This might not be related to this vue-cli plugin at all, but I still felt this might be a reasonable place to ask, because it works in dev, just not in the build 😃
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
I think I found a solution, try this:
In
vue.config.js
:In
app.vue
(or wherever you are spawning from):This assumes
ffmpeg
is in the root dir of your project, but you can have it in a subfolder if you like, just update all the path references.🥳 It works exactly like that! Thank you!