A Quick Guide To FFmpeg

Jason Hee
CodeX
Published in
4 min readJun 27, 2022

--

Photo by peter_s on Unsplash

FFmpeg is a powerful collection of libraries and tools that allows you to work with media files. You can use it to convert video files between different formats, re-encode a video file with a different codec, extract image frames from a video file, and much more.

Installation

FFmpeg is available on multiple platforms, including Windows, macOS, and various Linux distributions.

For macOS, one easy way to install FFmpeg is via homebrew:

brew install ffmpeg

What is a media file?

Before we go into how to use FFmpeg, let’s look at what a media file is:

A high-level overview of the components of a media file

A media file consists of two components: the media container and its streams.

A media container is a wrapper around different streams. You are probably familiar with the file extensions of video files like .mp4 and .avi . These file extensions are named after the format of the container. The container determines how your media player or web browser will interact with the media file.

The container contains one or more streams. Think of a video stream as a video track in…

--

--