Tips and techniques for building ffmpeg

One of the more powerful features that ffmpeg offers is the ability to chain audio and video filters, sources, and etc. into filtergraphs. Most of the individual filters have settings (some of them very complex) that can be tweaked when the defaults will not do. Sometimes, it is hard to know just how a particular filtergraph will affect the outcome of your video.

The ffmpeg package is designed to build three CLI binaries: ffmpeg, ffprobe, and ffplay. ffplay is designed to be a “testbed” for filtergraphs. It will accept any filtergraph that ffmpeg will, and plays the results immediately on the desktop.

The Simple DirectMedia Layer library (libsdl2) is required for ffplay to work; the ffmpeg build script will not build ffplay if libsdl2 is not detected. In turn, libsdl2 will not be able to render video and audio on Clear Linux unless the following two bundles are installed before libsdl2 is built:

devpkg-libX11
devpkg-pulseaudio

So, if you want ffplay,

  1. install the bundles
  2. build libsdl2
  3. build ffmpeg (libsdl2 will be autodetected)

Besides being a testbed for ffmpeg, ffplay is an excellent media player in its own right. It is not susceptible to video tearing and pixellating, seamlessly plays variable bit-rate video files, and seems to handle many other video files that give VLC all sorts of trouble.