How to Use Ffmpeg with Node.js v20 on AWS Lambda?

August 13, 2025 1 answer
Asked by MOTOR_oil
I'm trying to convert the sample rate of an audio file from Kinesis Video Streams (KVS) and I want to use Ffmpeg for this process. However, I'm facing challenges in getting Ffmpeg to run on my AWS Lambda function using Node.js v20. Does anyone have guidance on how to include the Ffmpeg module inLambda? Also, are there any alternative Node.js modules for audio resampling that you could recommend? Thanks in advance!

Answers

fret5.slide
You can definitely use a Lambda layer to include Ffmpeg in your project. It's the best way to manage dependencies like Ffmpeg in Lambda environments. If you need help setting it up, I can share the script you'll need to get it working! Let me know.

MOTOR_oil: I have stored it in a layer already, but I'm getting an error that says it "couldn't find ffmpeg, tried opt/nodejs/node_modules/@ffmpeg-installer/linux-x64.โ€ Any insights on how to fix that?

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions