ffmpeg.wasm only supports running in browser, see FAQ for more details
Install ffmpeg.wasm using package managers like npm and yarn:
npm install @ffmpeg/ffmpeg @ffmpeg/util
yarn add @ffmpeg/ffmpeg @ffmpeg/util
@ffmpeg/ffmpeg spawns a web worker, you cannot import
@ffmpeg/ffmpeg from CDN like
unpkg. It is recommended to download it and host it on your server most of the time.