Skip to content

Commit 1ae0ba2

Browse files
committed
Update FAQ in README.md
1 parent 8a4f56f commit 1ae0ba2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,19 @@ Also you can check this series of posts to learn more fundamental concepts:
159159
- https://jeromewu.github.io/build-ffmpeg-webassembly-version-part-2-compile-with-emscripten/
160160
- https://jeromewu.github.io/build-ffmpeg-webassembly-version-part-3-v0.1/
161161
- https://jeromewu.github.io/build-ffmpeg-webassembly-version-part-4-v0.2/
162+
163+
### Why it doesn't work in my local environment?
164+
165+
When calling `ffmpeg.load()`, by default it looks for `http://localhost:3000/node_modules/@ffmpeg/core/dist/` to download essential files (ffmpeg-core.js, ffmpeg-core.wasm, ffmpeg-core.worker.js). It is necessary to make sure you have those files served there.
166+
167+
If you have those files serving in other location, you can rewrite the default behavior when calling `createFFmpeg()`:
168+
169+
```javascript
170+
const { createFFmpeg } = FFmpeg;
171+
const ffmpeg = createFFmpeg({
172+
corePath: "http://localhost:3000/public/ffmpeg-core.js",
173+
// Use public address if you don't want to host your own.
174+
// corePath: 'https://unpkg.com/@ffmpeg/[email protected]/dist/ffmpeg-core.js'
175+
log: true,
176+
});
177+
```

0 commit comments

Comments
 (0)