Migrating from 0.11.x to 0.12+
As 0.12+ is not backward compatible with 0.11.x, below is a quick mapping table to transform 0.11.x to 0.12+
0.11.x | 0.12+ | Note |
---|---|---|
import { createFFmpeg } from '@ffmpeg/ffmpeg' | import { FFmpeg } from '@ffmpeg/ffmpeg' | |
createFFmpeg() | new FFmpeg() | argumens of createFFmpeg() is moved to ffmpeg.load() |
await ffmpeg.load() | await ffmpeg.load() | |
await ffmpeg.run(...args) | await ffmpeg.exec([...args]) | |
ffmpeg.FS.writeFile() | await ffmpeg.writeFile() | |
ffmpeg.FS.readFile() | await ffmpeg.readFile() | |
ffmpeg.exit() | await ffmpeg.terminate() | |
ffmpeg.setLogger() | ffmpeg.on("log", () => {}) | |
ffmpeg.setProgress() | ffmpeg.on("progress", () => {}) | |
import { fetchFile } from '@ffmpeg/ffmpeg' | import { fetchFile } from '@ffmpeg/util' |