FFmpeg: The Unsung Workhorse of Online Video

One of the most popular video encoding, compressing and sharing software products is probably one that you aren’t aware of. FFmpeg has been under active development since 2000, and, 14 years later, it doesn’t seem to be losing momentum. In fact, many common applications and video-streaming services use it. And you can, too, as long as you find a good hosting provider that supports it.

FFmpeg is a free set of programs, libraries and codecs that are used for handling multimedia data. The name, FFmpeg, is a combination of “MPEG” (the popular MPEG video format) and “FF,” which stands for “fast forward.”

What makes it so powerful is its ability to handle both new and old video formats. The FFmpeg About page states it quite simply:

“FFmpeg is … able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.”

What Exactly Is FFmpeg?

The FFmpeg suite consists of a series of tools and libraries designed to manipulate and share video.

A list of the FFmpeg tools:

  • ffmpeg – A command-line tool to convert multimedia files between formats.
  • ffserver – A multimedia streaming server for live broadcasts.
  • ffplay – A simple media player based on SDL and the FFmpeg libraries.
  • ffprobe – A simple multimedia stream analyzer.

A list of the FFmpeg developer libraries:

  • libavutil – A library containing functions for simplifying programming, including random number generators, data structures, mathematics routines, core multimedia utilities and much more.
  • libavcodec – A library containing decoders and encoders for audio/video codec’s.
  • libavformat – A library containing demuxers and muxers for multimedia container formats.
  • libavdevice – A library containing input and output devices for grabbing from and rendering to many common multimedia input/output software frameworks, including Video4Linux, Video4Linux2, VfW and ALSA.
  • libavfilter – A library containing media filters.
  • libswscale – A library performing highly optimized image scaling and color space/pixel format conversion operations.
  • libswresample – A library performing highly optimized audio resampling, rematrixing and sample format conversion operations.

With this powerful collection of utilities, you can set up a server to easily process, stream and share video over the World Wide Web. But you wouldn’t be the first person or company to use it.

FFmpeg is used in popular programs like VLC (a highly portable multimedia player for various audio and video formats), HandBrake (a free, open-source multithreaded transcoding app), Plex (a media player system), Blender (free, open-source 3D graphics software) and Google Chrome. It’s also used on sites like YouTube.

Want to Be the Next Viral Video Website? You Can!

Setting up an FFmpeg server yourself is pretty straightforward, provided you do a little research. But honestly, an easier way is to find a web hosting provider that offers the FFmpeg libraries and tools as part of their service.

Below are some high-level requirements and processes for setting up a hosted FFmpeg environment:

  • FFmpeg – Must be installed on the server for conversion. Ideally, you should have a dedicated server for single-tenant resource consumption.
  • Database – You must have a MySQL database because FFmpeg requires a database for scripts.
  • Video sharing scripts – There are free scripts that most providers have; you can also purchase some scripts. Popular scripts include PHP motion or vShare.
  • FTP access – You really should have the ability to upload files to a web host using FTP.
  • Security – As part of the last step in the installation process, you should delete the install files.

The most important thing when setting up or signing up for an FFmpeg solution is to ensure that you have a server that can handle the activity. For starters, it is important to have a server — preferably dedicated, with a good amount of RAM and CPU power — that is able to quickly decode/encode and compress any video files.

Next, you should be sure that you have ample storage on the server or on an attached storage device. Video files in their original format can be quite large; once they are encoded and compressed, the file sizes should be more manageable. You may want to consider deleting or archiving the original video files to preserve space.

Many hosting providers offer FFmpeg-enabled server environments. This means that they have servers pre-configured with proper FFmpeg settings that will allow you to simply start encoding and sharing streaming video. Video sharing is very resource-intensive, so if you have that “noisy neighbor” who is sucking up all of your shared server resources, you might not be providing the best streaming and viewing experience to your end-users.

Lastly, you should look at your hosting provider’s bandwidth allocations for your account. Hosting video, especially video that is accessed frequently by end-users, can push out tremendous amounts of outgoing bandwidth.

[image: Anikei/iStock/ThinkStockPhotos]