Run ffmpeg inside a lambda for serverless transformations.
Grab the x86_64 build
files from ffmpeg static builds.
Put ffmpeg
static binary into into the bin
subdirectory and delete everything else.
pip install zappa flask
# export AWS secret/key/region etc
zappa init
zappa deploy dev
# make changes as needed
zappa update dev
# watch logs
zappa tail dev
Keep in mind limitations of lambda e.g. max runtime, CPU, and RAM etc.
You may need/want to add the following to your zappa_settings.json
"binary_support": true,
"cors": true,
- production deploy
- ssl
- streaming response
- better logging based on debug level
- standardize on JSON response for all errors/version endpoints etc
You can stick almost any smallish x86_64
statically compiled binary
e.g. golang
etc into bin
and call it via http! Cheers!
I haven't implemented actual useful transformations in this
version. Sorry. Just pass arguments and keep in mind that ffmpeg
can read in http streams directly or use stdin
and stdout
.