Thursday, 25 April 2024

ffmpeg.wasm + svelte + opus troubleshooting

There's a bug: Uncaught ReferenceError: document is not defined

the fix

Could be to downgrade vite to 5.1.6...
Here's how to see what version it is ("npm list vite"):

Imminently vite was fixed, so upgrading involves:

going into package.json to set: "vite": "^5.2.8"

$ rm -rf node_modules/
$ npm i

 The latter inside the container.

raw data

Is very noisy, a couple of enduring tips, now baked into the code so you shouldn't have to worry unless building your own this kind of this:

-strict -2 -c:a opus: only this 'experimental' opus codec works,

and avoiding the fetchFile from @ffmpeg/util.

No comments:

Post a Comment