Using libav*

Version 3 (modified by rogerdpack, 7 years ago) (diff)

link to the doc/* files

FFmpeg itself is composed of several subcomponents that can be used individually, and outside of FFmpeg, for instance in your own program. These are

  • libavformat which contains muxer information and capabilities.
  • libavcodec which contains all the (built-in) video encoding and decoding codecs that FFmpeg contains.
  • libswscale contains the (raw pixel) format conversions, and also high speed/assembly optimized versions of certain scaling routines.
  • libavfilter contains the filters FFmpeg contains, like adjusting audio sample rate, etc.* libavutil ??
  • libavdevice contains interfaces for working with "local devices" for instance webcams in windows, line-in audio in linux, etc.
  • libpostproc ??
  • libswresample audio conversion routines (?)
  • libavresample audio conversion routines (?)

Getting started

There is not much "web based" official documentation for using these libraries.

Check doc/examples, also doxygen documentation is fairly complete and should work as reference (example: the libavformat doxygen).


The web has a few tutorials, some of which are out of date. The doc/examples files usually use the latest ABI, however, should be more trustworthy.

Using libavformat and libavcodec by Martin Böhme, a good overview of the FFmpeg APIs, though quite out dated.

An FFmpeg and SDL Tutorial by Stephen Dranger, explains how to write a video player based on FFmpeg (updated source code for that tutorial, by Michael Penkov, is also now available).


  • libswresample

This file is also given as documentation.

  • libswscale

This file is also given as documentation.