Skip to main content

FFmpeg User Guide

General FFmpeg Usage

1. Introduction to FFmpeg

FFmpeg is a collection of open-source multimedia processing tools and libraries. It can parse, convert, encode, decode, filter, mux, and transmit video, audio, subtitles, and metadata.

Common FFmpeg command-line tools include:

ToolPurpose
ffmpegTranscoding, remuxing, capture, filtering, and streaming
ffprobeInspecting media containers, streams, frames, and metadata
ffplayA simple player for testing and debugging

The main libraries are:

LibraryPurpose
libavcodecVideo and audio encoding and decoding
libavformatMedia containers, demuxing, muxing, and network protocols
libavfilterAudio and video filter graphs
libavutilPixel formats, time bases, data structures, and common utilities
libswscaleSoftware image scaling and pixel-format conversion
libswresampleAudio resampling, channel conversion, and mixing
libavdeviceInput and output for cameras, sound devices, and displays

An FFmpeg processing pipeline can be simplified as follows:

Input file / camera / network stream


Demuxing


Decoding


Video or audio filters


Encoding


Muxing


Output file / network stream

Remuxing skips decoding, filtering, and encoding, and directly copies the compressed streams. It is fast and does not reduce media quality.