ffmpegwasm/ffmpeg.wasm

Safari on ios crashes when trying to operate with big files

MartinCepulionis opened this issue · 1 comments

I'm trying to extract audio from video file to minimize the size of sent file over network. Everything works fine on laptop (chrome, safari) but it's either stuck or crashes on mobile safari. AFAIK it crashes not while executing the command, but while trying to load the initial bigger (500MB+) file await ffmpeg.writeFile(inputFileName, await fetchFile(file));

This is how I load ffmpeg:

const baseURL = "https://unpkg.com/@ffmpeg/core-mt@0.12.6/dist/esm";
  await ffmpeg.load({
    coreURL: await toBlobURL(`${baseURL}/ffmpeg-core.js`, "text/javascript"),
    wasmURL: await toBlobURL(`${baseURL}/ffmpeg-core.wasm`, "application/wasm"),
    workerURL: await toBlobURL(
      `${baseURL}/ffmpeg-core.worker.js`,
      "text/javascript"
    ),
  });

How can I work around this limitation?

Tried using WORKERFS for input file but it still crashes