ffmpegwasm / ffmpeg.wasm

FFmpeg for browser, powered by WebAssembly
https://ffmpegwasm.netlify.app
MIT License
14.25k stars 839 forks source link

How do I import from esm.sh? Seems like it would be easier than unpkg.com examples which give a 404 #770

Open ralyodio opened 2 months ago

ralyodio commented 2 months ago
    const baseURL = 'https://esm.sh/v135/@ffmpeg/core-mt@0.12.6/es2022/';

        await ffmpeg.load({
            coreURL: await toBlobURL(`${baseURL}/core-mt.mjs`, 'text/javascript'),
            wasmURL: await toBlobURL(`${baseURL}/ffmpeg-core.wasm`, 'application/wasm'),
            workerURL: await toBlobURL(`${baseURL}/ffmpeg-core.worker.js`, 'text/javascript')
        });

This file: ffmpeg-core.worker.js is missing not sure where it lives. I can't find it anywhere. I only see a worker.ts but no build output that I can find.

izogfif commented 3 weeks ago

You can build ffmpeg.wasm manually and then find the results in folder ffmpeg.wasm/packages/core/dist/esm.