Friday, August 1, 2014

Encoding for Streaming using FFMPEG and HandBrake CLI

While Youtube still young, they use FFMPEG to encode their uploaded videos. And for us, we can't live without it. MyKLIK is much more like where the users can watch recorded TV programmes.

The videos will be recorded in Standard Definition and we use MP4 with H264 Main and AAC for master video.

The master video will be uploaded to centralized cloud storage and our cloud encoder will do the hard job to split the video into different qualities.

Another FFMPEG contender is HandBrake CLI. Pretty good for H264 conversion, but FFMPEG can encode to Google WebM.

Some good reading :

1. ( Handbrake and H264 )
2. ( FFMPEG Basics )

Here's my FFMPEG and HandBrake CLI command used to encode the MBR video.

Save as encode.php and chmod +x the file and run it like this :

/usr/bin/php -q encode.php

It will throw the job into background and will use all available CPU Cores.

HandBrake run in background

Top -d1

No comments:

Post a Comment