Coder Social home page Coder Social logo

ffmpeg-aws-lambda-layer's Introduction

FFmpeg/FFprobe for AWS Lambda

A Lambda layer containing a static version of FFmpeg/FFprobe utilities from the FFmpeg Linux package, compatible with Amazon Linux 2.x and Amazon Linux 1.x instances (including the nodejs10.x runtime, and the updated 2018.03 Amazon Linux 1 runtimes).

Usage

Absolutely the easiest way of using this is to pull it directly from the AWS Serverless Application repository into a CloudFormation/SAM application, or deploy directly from the Serverless Application Repository into your account, and then link as a layer.

The ffmpeg and ffprobe binaries will be in /opt/bin/ after linking the layer to a Lambda function.

For more information, check out the ffmpeg-lambda-layer application in the Serverless App Repository.

For manual deployments and custom builds, read below...

Prerequisites

  • Unix Make environment
  • AWS command line utilities (just for deployment)

Deploying to AWS as a layer

This package includes FFmpeg 4.1.3, packaged by John Van Sickle. Please consider supporting him for maintaining statically built FFmpeg packages. For more information, check out https://johnvansickle.com/ffmpeg/

The output will be in the result dir.

Run the following command to deploy the compiled result as a layer in your AWS account.

make deploy DEPLOYMENT_BUCKET=<YOUR BUCKET NAME>

configuring the deployment

By default, this uses ffmpeg-lambda-layer as the stack name. Provide a STACK_NAME variable when calling make deploy to use an alternative name.

example usage

An example project is in the example directory. It sets up two buckets, and listens to file uploads on the first bucket to convert and generate thumbnails from uploaded video files. You can deploy it from the root Makefile using:

make deploy-example DEPLOYMENT_BUCKET=<YOUR BUCKET NAME>

For more information on using FFmpeg and FFprobe, check out https://ffmpeg.org/documentation.html

Author

Gojko Adzic https://gojko.net

License

LGPL version

ffmpeg-aws-lambda-layer's People

Contributors

gojko avatar rasathus avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.