4 ms·
Yes, I could call ffmpeg from native code. But it's a bit more of a hassle to do from javascript than to just start the ffmpeg exe. And if the included ffmpeg l
by mifino 10y ago
Yes, I could call ffmpeg from native code. But it's a bit more of a hassle to do from javascript than to just start the ffmpeg exe. And if the included ffmpeg lib was to crash, I can imagine that the whole application would crash too. But I'm open to suggestions.
- voltagex_ 10y agoI'm surprised there isn't a Node binding for libav/ffmpeg yet. I have the same problem with lots of other open source video tools. I wish it was easier to use ffmpeg via library and then more people might do it.
- mifino 10y agoYes I had trouble finding it too. I guess it's because the ffmpeg API is so enormous and evolving all the time, that if there was to be node bindings for it, it would have to be maintained by the ffmpeg team. I think the CLI is the most stable API contract to the outside world, and everyone in the node world uses the CLI. I had an idea to use node-ffi, though. Which doesn't require linking or bindings or anything. Just call the native ffmpeg code directly from nodejs.
- pritambaral 10y agoThat is not what I meant. I meant using the same version of ffmpeg as the shared lib linked with Electron and linked with the binary. So, your bundle would have libavutil.so somewhere in a `lib/` folder, and in the `bin/` folder you'd have `ffmpeg` and `electron` (or equivalent) both dynamically linked against the `lib/libavutil.so`.
- mifino 10y agoI see. That should be possible, yes. If the ffmpeg from electron is built with the necessary features for the CLI and cutting to work. It would however require some quite complicated build scripts, I can imagine.