Open jdking123 opened 10 months ago
This might be relevant:
https://ffmpegwasm.netlify.app/docs/faq/#why-ffmpegwasm-doesnt-support-nodejs
This might be relevant:
https://ffmpegwasm.netlify.app/docs/faq/#why-ffmpegwasm-doesnt-support-nodejs
According to this Q&A
Why ffmpeg.wasm doesn't support nodejs?
ffmpeg.wasm did support nodejs before 0.12.0, but decided to discontinue nodejs support due to:
It takes extra effort to maintain nodejs support
If you are not in browser, there are a lot of better choices than using WebAssembly for a better performance, ex:
nodejs: https://www.npmjs.com/package/fluent-ffmpeg
react-native: https://github.com/arthenica/ffmpeg-kit
While I totally agree about the effort (of course it's a huge and amazing project 🥇 ), I do not think that the other solutions are comparable in practice. By example fluent-ffmpeg
requires ffmpeg
to be installed on the device, this cannot be done in all use cases. I would prefer to have the wasm compiled running without having the native ffmpeg installed: in some circumstances that will be the only way. If we take into consideration the ffmpeg-kit
for React Native, this will requires lame
(or shine
) anyways to run.
I hope that support to Node.JS will be provided for >0.12.x, or at least instructions to manually adapt the current version, eventually with limited capabilities.
This might be relevant: https://ffmpegwasm.netlify.app/docs/faq/#why-ffmpegwasm-doesnt-support-nodejs
According to this Q&A
Why ffmpeg.wasm doesn't support nodejs? ffmpeg.wasm did support nodejs before 0.12.0, but decided to discontinue nodejs support due to: It takes extra effort to maintain nodejs support If you are not in browser, there are a lot of better choices than using WebAssembly for a better performance, ex: nodejs: https://www.npmjs.com/package/fluent-ffmpeg react-native: https://github.com/arthenica/ffmpeg-kit
While I totally agree about the effort (of course it's a huge and amazing project 🥇 ), I do not think that the other solutions are comparable in practice. By example
fluent-ffmpeg
requiresffmpeg
to be installed on the device, this cannot be done in all use cases. I would prefer to have the wasm compiled running without having the native ffmpeg installed: in some circumstances that will be the only way. If we take into consideration theffmpeg-kit
for React Native, this will requireslame
(orshine
) anyways to run.I hope that support to Node.JS will be provided for >0.12.x, or at least instructions to manually adapt the current version, eventually with limited capabilities.
I do agree with the statement above. And while I still use ffmpeg.wasm for a prototype, I will have to swap it out in the future which will be a hassle. I love that I can run ffmpeg in the client without sending large video files to my backend for processing. Hopefully with OpenAI's Whisper getting better and better, we can see a return to supporting ffmpeg.wasm for node.
I agree that there are many alternatives better suited to run on node, but having node support would make sense for testing.
For anyone looking, this is a fork of this project with a slightly different API, it maintains Node.js support. I've been using it in production for over a year now:
Thank you bro🤩
⨯ node_modules\@ffmpeg\ffmpeg\dist\esm\empty.mjs (4:14) @ new FFmpeg ⨯ Error: ffmpeg.wasm does not support nodejs at ResultVideo (./src/components/resultvideo.js:20:69) null