Skip to content
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

ffmpeg.wasm does not support nodejs #773

Open
Unitoshka opened this issue Aug 13, 2024 · 3 comments
Open

ffmpeg.wasm does not support nodejs #773

Unitoshka opened this issue Aug 13, 2024 · 3 comments

Comments

@Unitoshka
Copy link

I installed ffmpeg.wasm in a project with solidjs and imported it in one of the files and it wrote this to me, I use bun as the runtime

@jz1
Copy link

jz1 commented Aug 14, 2024

https://ffmpegwasm.netlify.app/docs/faq

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
Of course, it is still highly welcome to contribute a nodejs version of ffmpeg.wasm.

@Unitoshka
Copy link
Author

бля какой ноде жс я же говорю юзаю бан

@izogfif
Copy link

izogfif commented Aug 30, 2024

@jz1 If ffmpeg.wasm isn't compatible with NodeJS, then why is there a lot of code related to NodeJS in ffmpeg-core.js?

if(ENVIRONMENT_IS_NODE){var fs=require("fs");var nodePath=require("path");

If this should only work in worker, then you should add -sENVIRONMENT=worker to emcripten build options in build/ffmpeg-wasm.sh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants