What Is FFmpeg

FFmpeg is an open-source framework for multimedia processing. The official website defines it as:

A complete, cross-platform solution to record, convert and stream audio and video.

Its defining feature is that decoding, encoding, transcoding, multiplexing (mux), demultiplexing (demux), streaming, filtering, and playback are all handled by a single suite of tools. It runs on all major platforms including Linux, macOS, Windows, BSD, and Solaris.


What FFmpeg Can Do

1. Decode, Encode, and Transcode

FFmpeg can decode and encode “nearly everything humans and machines have created” (official About).

ffmpeg -i input.mp4 -c:v libx264 -c:a aac output.mkv

2. Format Conversion (Container Conversion)

You can change the container (file format) without re-encoding the video or audio. This is called stream copy.

ffmpeg -i input.mkv -c copy output.mp4

Stream copy performs no decoding or encoding, so it is described as “extremely fast with no quality loss” in the official documentation.

3. Filtering

The -vf (video filter) and -af (audio filter) options enable a wide variety of processing.

Filters can be connected as a filter graph, enabling complex processing that combines multiple filters (official: ffmpeg-filters).

4. Streaming and Recording

Supports various protocols including RTMP, HLS, DASH, UDP, and TCP for sending and receiving live streams (official: ffmpeg-protocols).

5. Checking Supported Formats and Codecs

You can list the formats and codecs supported by your installed build.

ffmpeg -formats
ffmpeg -codecs

The Difference Between Codecs and Containers (Important Background Knowledge)

These are concepts that are easy to confuse when using FFmpeg.

ConceptDescriptionExamples
ContainerA “wrapper” that holds video, audio, subtitle, and other data. Distinguished by file extension..mp4, .mkv, .avi, .mov
CodecThe method of compressing and decompressing data.H.264, H.265, AAC, MP3, VP9

An MP4 container typically holds H.264 (video) + AAC (audio), but containers and codecs are independent concepts. Technically, it is possible to store H.265 in an MP4 container as well.


FFmpeg Component Structure

According to the official About, FFmpeg consists of the following components.

Command-Line Tools

ToolRole
ffmpegConversion, encoding, filtering, and streaming
ffprobeAnalysis and display of stream and format information
ffplaySimple media player using SDL (mainly for testing)

For a detailed breakdown of how to use each of these three tools, see “The Difference and Role of ffmpeg / ffprobe / ffplay”.

Libraries for Developers (libav*)

LibraryRole
libavcodecCollection of encoders and decoders
libavformatContainer mux/demux processing
libavdeviceDevice I/O (cameras, microphones, etc.)
libavfilterFilter graph processing
libavutilCommon utilities (math, strings, etc.)
libswscaleVideo scaling and pixel format conversion
libswresampleAudio resampling and format conversion

These libraries can also be used in application development. Many software products including VLC, HandBrake, and OBS use FFmpeg’s libraries.


What FFmpeg Cannot Do

Bypassing DRM-Protected Content

FFmpeg alone cannot decode or extract content protected by DRM (Digital Rights Management). Commercially sold Blu-rays and streaming service content are protected under copyright law, and FFmpeg is not designed for such use.

GUI Operation

FFmpeg is a command-line tool. If you need a GUI, use a frontend application such as HandBrake (which uses FFmpeg as a backend).

Real-Time Preview Editing

Non-linear editing (timeline editing in applications like Adobe Premiere or DaVinci) is outside the scope of FFmpeg.


License

FFmpeg is licensed under LGPL v2.1 or later (or optionally GPL v2 or later) (official: FFmpeg Legal).

When distributing binaries, always verify the license and attribution requirements.


One Command to Try First

Once installed, check the version.

ffmpeg -version

Then try converting a file you have on hand.

ffmpeg -i input.mp4 output.avi

This alone converts MP4 → AVI (codecs are automatically selected by FFmpeg).

For installation instructions, see “FFmpeg Installation Guide for Windows / macOS / Linux”. For how to write commands, see “FFmpeg Command Basic Syntax”.


Tested with: ffmpeg 6.1.1 / Ubuntu 24.04 (GitHub Actions runner) Primary sources: ffmpeg.org/about.html / ffmpeg.org/ffmpeg.html