https://serverless-stack.com/ logo
#help
Title
# help
j

Jason

03/24/2022, 5:57 PM
I'm using ffmpeg.wasm in lambda for various video manipulation stuff. It uses ffmpeg binaries under the hood, and takes the path to the binary at runtime. I supply the ffmpeg binary as a lambda layer and point to the layer path. I'm running into an issue - "Error: ffmpeg.wasm can only run one command at a time". I suspect this may be happening because the ffmpeg binary is being shared across multiple instances, because its a layer. Is that a possibility? If I vendored the binary instead of shipping it as a layer, will it stop it being shared across instances?
r

Ross Coundon

03/24/2022, 6:03 PM
I don't think that's how lambda works. The runtime environment has the layers copied into it and only one lambda runs in each environment.
j

Jason

03/25/2022, 12:41 PM
Thanks Ross you were right. For future readers, seems to be a quirk of the library itself rather than the binary. Simply calling load and exit on ffmpeg-core before and after every
run
seems to solve this
6 Views