bfansports /CloudTranscode

Distributed videos and images encoding/transcoding using Amazon SFN, FFMpeg and ImageMagic

★ 300⑂ 58👁 40⑃ 76● 14▤ 0
PHPGPL-2.0Created 2014-01-11
+0
Daily
+0
Weekly
300
stars
58
forks
40
watchers
76
prs
14
issues
0
releases

README

Updates 2020/05/09

Update to FFMpeg 4.2

 What is Cloud Transcode?

Cloud Transcode (CT) is your own distributed transcoding stack. With it you can transcode media files in a distributed way, at scale.

 Goal

The goal of this project is to create an open source, scalable and cheap distributed transcoding platform where users have complete control over performance and cost.

We started with video transcoding as it is the most costly, but the goal is to transcode any type media files (audio, documents and images). We use FFMpeg for video transcoding. CT also image transcoding using ImageMagic.

Today's commercial solutions for video transcoding are very expensive for large volumes. With this solution you can transcode large quantity of files at the pace you want, thus controling your cost.

 Benefits

With Cloud Transcode, you control: scale, speed and cost. You can run everything locally if you want, no Cloud instance required. Or you can deploy on AWS EC2, Beanstalk or Docker containers.

Your workers only need an Internet connection to use the required Amazon services: SFN (AWS Step Functions) and S3. It means that you can have a local, hybrid or full cloud setup. It's up to you.

 Activity supported

List of actions this stack allow you to do very quickly and at scale.

- Custom FFMpeg command: Run and distribute your own ffmpeg commands
- Image to Image transcoding: Run and sitribute your own ImageMagic convert commands
- Validate/Probe Asset: Run ffprobe to get the mime type of an asset
- Transcode from HTTP: Pull files from HTTP/S and transcode them on the fly at scale. Result files are put into AWS S3.
- Video to Video transcoding: JSON input: One video IN, many videos OUT. Any formats and codecs supported by your ffmpeg.
- Video to Thumbnails transcoding: JSON input: Snapshot at certain time in video or intervals snapshot every N seconds. Keep image ratio.
- Watermark integration in video: JSON input: Take image IN and position a watermark on top of the video. Custom position and transparency. Keep image ratio.

 How it works?

Cloud Transcode is a set of "activities" that are standalone scripts implementing the CpeActivity class located in the CloudProcessingEngine-SDK:
https://packagist.org/packages/sportarchive/cloud-processing-engine-sdk

Those Activities listen to the Amazon SFN (Step functions) service for incoming tasks to process (You need an Amazon AWS account, yes). One activity will process one type of Tasks.

Tasks and Workflows (aka State Machine) are defined in the AWS SFN console, and are identified by their AWS ARNs (AWS resources identifier). You can then start N activity workers that will start listening for incoming jobs and execute them.

You can scale your infrastructure in AWS based on your volume, capacity, cost, resources, etc.
You can run those SFN Activities on Docker, which is recommended. A Dockerfile is provided for you.
But you can run on anything and anywhere.

Your client applications can initiate new SFN 

Snapshot: 2026-11-27T22:26:53Z · Data license Apache-2.0 · JSON