ffmpeg.wasm icon indicating copy to clipboard operation
ffmpeg.wasm copied to clipboard

Error "ffmpeg-core.worker.js 404 (Not Found)" when set corePath param

Open seblemeur opened this issue 6 years ago • 6 comments

Describe the bug Hi, I got an error when I set corePath on createFFmpeg method, example :

    const ffmpeg = createFFmpeg({
      corePath: "./node_modules/@ffmpeg/core/ffmpeg-core.js",
      log: true,
    });

Error :

GET http://localhost:3000/node_modules/@ffmpeg/core/ffmpeg-core.worker.js 404 (Not Found)

Screenshots Capture d’écran 2020-06-04 à 14 42 58

Desktop (please complete the following information):

  • OS: macOS
  • Browser: chrome
  • Version: 83.0.4103.61

More informations

It's a nextJS project, but I got the same error on your repo with react example.

seblemeur avatar Jun 04 '20 12:06 seblemeur

hi, I am also a next.js user, I have created /public dir and copy @ffmpeg/core files to public/ffmpeg-core and set corePath as /ffmpeg-core, then it works. This is not this project problem, it is next.js provider static files difference

shynome avatar Jun 14 '20 16:06 shynome

Thanks for @shynome 's reply, I think that is the root cause of this error.

jeromewu avatar Jun 15 '20 06:06 jeromewu

I also had this error on Next.js and fixed it with @shynome's solution.

To copy over the ffmpeg-core files from node_modules to public, I ran rsync -av ./node_modules/@ffmpeg/core/dist/ ./public/ffmpeg-core/ and then created ffmpeg with:

const ffmpeg = createFFmpeg({
  log: true,
  corePath: "/ffmpeg-core/ffmpeg-core.js",
});

christiangenco avatar Apr 17 '22 00:04 christiangenco

still gives this error in console: Uncaught (in promise) ReferenceError: SharedArrayBuffer is not defined at 3edb0a00-8cea-44ed-864c-1c40394bec54:22:175 at Object.load (@ffmpeg.ffmpeg.v0.11.6.js:702:20) at async load (App.js:33:5)

AAfetisov avatar Feb 08 '23 05:02 AAfetisov

@roumor have a look here: https://developer.chrome.com/blog/enabling-shared-array-buffer/

bricembouani avatar Mar 29 '23 09:03 bricembouani

I don't see what is the solution here, what was the solution?

lancejpollard avatar Jan 08 '24 06:01 lancejpollard