You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.
Because we're bundling ffmpeg binaries with our app, we also need to set the explicit path to those binaries as part of bootstrapping the app.
While we find a repository with example code, that project used browserify instead of webpack to pull project code together. Since we're using webpack, we're subject to issues about how the value of __dirname is handled, as discussed at some length in webpack/webpack#1599 and also explained in the webpack docs
In short, even when handling the config, __dirname will have a different value when the code is executed in the webpacked bundle than it does in the ffmpeg-static code.
We need to understand where (at which filesystem path) in the bundled Electron app the ffmpeg binaries are located, and then come up with a new way to get the path. We could probably adapt the construction method from ffmpeg-static but execute the code with a better idea of __dirname -- possibly with process.getCwd() or possibly with __dirname under more clearly controlled circumstances.
The text was updated successfully, but these errors were encountered:
As a side note, someone I talked to suggested moving the ffmpeg operations out of the "client" (aka "browser") code and situating it in main.js (the Electron bootstrap file) instead. That would get us out of any Webpack-induced confusion, and might be architecturally sound for other reasons.
This webpage shows some example code about how to do that.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Because we're bundling ffmpeg binaries with our app, we also need to set the explicit path to those binaries as part of bootstrapping the app.
While we find a repository with example code, that project used
browserify
instead ofwebpack
to pull project code together. Since we're usingwebpack
, we're subject to issues about how the value of__dirname
is handled, as discussed at some length in webpack/webpack#1599 and also explained in the webpack docsIn short, even when handling the config,
__dirname
will have a different value when the code is executed in the webpacked bundle than it does in theffmpeg-static
code.We need to understand where (at which filesystem path) in the bundled Electron app the
ffmpeg
binaries are located, and then come up with a new way to get the path. We could probably adapt the construction method fromffmpeg-static
but execute the code with a better idea of__dirname
-- possibly withprocess.getCwd()
or possibly with__dirname
under more clearly controlled circumstances.The text was updated successfully, but these errors were encountered: