Skip to content

Commit 1817ffb

Browse files
authored
Add details to use other version of core.
1 parent 75ce778 commit 1817ffb

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Try it: [https://ffmpegwasm.github.io](https://ffmpegwasm.github.io#demo)
3030

3131
## Installation
3232

33+
**Node**
34+
3335
```
3436
$ npm install @ffmpeg/ffmpeg @ffmpeg/core
3537
```
@@ -40,6 +42,8 @@ $ npm install @ffmpeg/ffmpeg @ffmpeg/core
4042
$ node --experimental-wasm-threads --experimental-wasm-bulk-memory transcode.js
4143
```
4244

45+
**Browser**
46+
4347
Or, using a script tag in the browser (only works in Chrome):
4448

4549
```html
@@ -71,6 +75,36 @@ const ffmpeg = createFFmpeg({ log: true });
7175
})();
7276
```
7377

78+
### Use other version of ffmpeg.wasm-core / @ffmpeg/core
79+
80+
For each version of ffmpeg.wasm, there is a default version of @ffmpeg/core (you can find it in **devDependencies** section of [package.json](https://github.com/ffmpegwasm/ffmpeg.wasm/blob/master/package.json)), but sometimes you may need to use newer version of @ffmpeg/core to use the latest/experimental features.
81+
82+
**Node**
83+
84+
Just install the specific version you need:
85+
86+
```bash
87+
$ npm install @ffmpeg/core@latest
88+
```
89+
90+
Or use your own version with customized path
91+
92+
```javascript
93+
const ffmpeg = createFFmpeg({
94+
corePath: '../../../src/ffmpeg-core.js',
95+
});
96+
```
97+
98+
**Browser**
99+
100+
```javascript
101+
const ffmpeg = createFFmpeg({
102+
corePath: 'https://unpkg.com/@ffmpeg/[email protected]/dist/ffmpeg-core.js',
103+
});
104+
```
105+
106+
For the list available versions and their changelog, please check: https://github.com/ffmpegwasm/ffmpeg.wasm-core/releases
107+
74108
## Multi-threading
75109

76110
Multi-threading need to be configured per external libraries, only following libraries supports it now:

0 commit comments

Comments
 (0)