tetunori / cdn

cdn repository
MIT License
1 stars 0 forks source link

Error sharedArrayBuffer then Bad Memory #1

Open Malikmal opened 2 years ago

Malikmal commented 2 years ago

Hello Tetunori, I'm glad that you share about how to use FFMPEG client side using p5js. but something wrong when i tried. i've tried this with p5 editor that link you've share https://editor.p5js.org/tetunori/sketches/cWvkz1E2_

first i got and error that sharedArrayBuffer image

then i've try to add this code if(!crossOriginIsolated) SharedArrayBuffer = ArrayBuffer;

after that, i got other error "Error : bad memory"

image

do you have an idea to solve this 🤔 thank you

tetunori commented 2 years ago

Thanks for your issue, @Malikmal !

Unfortunately, ffmpeg wasm using sharedArrayBuffer does not work any more in p5.MovRec because of the SharedArrayBuffer/memory issue. Especially, for long time recording, I know the memory issue on it but don't know any work-around on the issue.

Since p5.MovRec still supports webm format, please use webm without using ffmpeg wasm. (on sample code, type 'r' key to start/stop recording!)