Learning FFmpeg

Thursday, March 16, 2023

What is FFmpeg?

FFmpeg is free and open-source software (FOSS) that offers “[a] complete, cross-platform solution to record, convert and stream audio and video”.

The “FFmpeg Suite”

I think it is best to know about what I call the “FFmpeg Suite”, which consists of

  • Executables:
  • 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 codecs;
    • 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.

The History of FFmpeg versus Libav

BOTTOM LINE UP FRONT: Libav is dead.

The accepted answer to the question “Why would I choose Libav over FFmpeg, or is there even a difference?" on SuperUser.com (part of StackExchange) provides a brief summary with links to more details of the history and the history of confusion about the projects.

Guides and Tutorials

While the documentation for the FFmpeg suite is expansive, I don’t think it’s the best place to start reading. There are numerous posts online that answer specific questions about execution of specific tasks, but I wanted guides and tutorials that give a wider view of the syntax and capabilities of FFmpeg. A useful criterion to determine usefulness of a tutorial is whether it explains the differences between codecs, encoders, and containers.

I have found two examples that seem very useful.

NOTE: The first tutorial makes a distinction between codec and encoder but notes that

Sometimes “codec” == actual encoding/decoding software

That is the stance of the latter tutorial.

What kind of screw is this?

The Interface Series and _9MOTHER9HORSE9EYES9