Setting up the skills and environment before you start processing video: comfort in the bash/zsh terminal, basic shell scripting, and an understanding of the concepts of codec, container, bitrate, fps, resolution, and audio channels. It ends with installing the stable FFmpeg, an introduction to the ffmpeg, ffprobe, and ffplay components, and creating practice video and audio for the whole series.

Welcome to the Learn FFmpeg series! This series will take you to master FFmpeg — the open-source framework for recording, converting, transcoding, filtering, and streaming audio/video — starting from the first transcode command to a media production pipeline that is fast and reliable.
But before typing your first ffmpeg command, there are some basic skills and tools you must prepare. Why are prerequisites important? Because FFmpeg is a pure Command Line Interface (CLI) tool: all of its power is accessed through the terminal, and its output is most valuable when wired into scripts and pipelines — not when clicked manually.
Imagine wanting to become a professional chef: a great recipe alone is not enough without mastering the knife, cutting techniques, and ingredient knowledge. Episode 0 prepares your "knife": comfort in the terminal, an understanding of shell scripting basics, knowledge of digital multimedia concepts, and then making sure FFmpeg is installed and verified.
FFmpeg has no GUI button. A simple analogy: a GUI is like a TV remote control — simple, but limited to the buttons available. A CLI is like an aircraft control panel — scary at first, but it gives you full control. All DevOps work — transcoding video, automating thumbnails, building streaming pipelines — starts from a command in the terminal.
You are free to use bash or zsh — both are valid shells for this entire series. These four commands are enough as a starting point:
| Command | Purpose |
|---|---|
pwd | Show the current working directory |
ls | List the directory contents |
cd | Change to another directory |
ffmpeg -h | Read FFmpeg help |
One concept you must understand from the start: stdout. Many commands write their results to stdout — the terminal screen. This output can be redirected to a file with > (redirect) or forwarded with | (pipeline). You'll keep using this pattern, for example ffmpeg -encoders | grep nvenc to filter the encoder list — so understand it early on.
FFmpeg is most powerful when called repeatedly from scripts. You don't have to be a shell expert, but these four concepts must be familiar:
| Concept | Example | Why It Matters |
|---|---|---|
| Variable | input="video.mp4" | Stores values you reuse |
| Loop | for f in *.mp4 | Processes many files at once |
| Exit code | $? | Tells you whether a command succeeded |
| Condition | if ffmpeg ...; then | Makes decisions based on results |
The simple script below — which you'll fully understand in the batch processing episode — shows the most common pattern: a loop that processes all MP4 files at once.
for f in *.mp4; do
ffmpeg -i "$f" -c copy "${f%.mp4}.mkv"
done$f is a variable that holds the file name on each iteration of the loop. You'll keep using this pattern throughout the series to process media in bulk.
FFmpeg works at the stream level, so without the following basic concepts, its options will feel like a black box:
| Concept | Explanation |
|---|---|
| Codec | Compression/decompression algorithm for audio-video data, e.g., H.264, VP9, AAC |
| Container | The "wrapper" that holds video, audio, subtitle, and metadata streams together, e.g., MP4, MKV, WebM |
| Bitrate | The number of bits used per second; determines quality and file size |
| FPS | Frame rate, how many image frames are rendered per second |
| Resolution | Video pixel dimensions, e.g., 1920x1080 for Full HD |
| Audio channels | The number of audio tracks, e.g., mono, stereo, 5.1 |
The codec vs container distinction is the most important one at the beginning. A codec is like the language used to speak; a container is like the envelope the message is sent in. An MP4 file (container) can hold H.264 or AV1 video (codec) — and MKV can hold either too. Telling them apart will make your commands make much more sense.
Open your terminal and type:
ffmpeg -versionffmpeg version 7.1.1-3ubuntu1 Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 13 (Ubuntu 13.3.0-6ubuntu2~24.04)
configuration: --prefix=/usr --enable-gpl --enable-libx264 --enable-libx265 ...
libavutil 79. 15.100 / 79. 15.100
libavcodec 61. 19.100 / 61. 19.100
libavformat 61. 7.100 / 61. 7.100
...Two things you must read from this output:
configuration section tells you which codecs are enabled, e.g., --enable-libx264. Without it, the -c:v libx264 command will refuse to work.If ffmpeg -version shows command not found, install it via your system's package manager:
sudo apt update
sudo apt install ffmpegWorth noting: a package manager installs the version curated by your distro — convenient, but sometimes a few releases behind. If you need the latest version with a complete build, download the official build from the project's download page at https://ffmpeg.org and follow its installation instructions — the best choice for development that depends on the newest features.
FFmpeg is actually not one program, but three complementary binaries:
| Component | Function |
|---|---|
ffmpeg | The main conversion and transcode engine |
ffprobe | Media inspector: metadata, streams, duration, bitrate |
ffplay | Media player for quick verification |
Verify all three at once:
ffmpeg -version
ffprobe -version
ffplay -versionWe'll break down the architecture and role of each component thoroughly in episode 2.
Throughout the series we need media to test. The most practical and license-free way: let FFmpeg create it itself through a virtual input source named lavfi. Run these two commands:
ffmpeg -f lavfi -i testsrc=size=640x360:rate=30 -t 10 sample.mp4
ffmpeg -f lavfi -i sine=frequency=440 -t 5 sample.wavtestsrc produces moving colorful patterns, and sine produces a 440 Hz sinusoidal tone — both perfect for testing encoding, filters, and conversion without worrying about licenses. You'll keep using these two files up to the final episodes. You may also add your own freely-licensed video to test more realistic content.
Most of this series runs purely on CPU. But for the hardware acceleration episode, a GPU helps: NVIDIA's NVENC encoder can be much faster than the CPU for H.264/HEVC tasks. Check support on your machine:
ffmpeg -encoders | grep nvencIf h264_nvenc and hevc_nvenc appear, congratulations — hardware acceleration is ready for the episode covering acceleration. If they don't appear, no problem: the entire series still runs normally with CPU codecs.
Tip
Store all practice files in one dedicated directory, e.g., ~/media-lab. This small habit will save a lot of time in later episodes when your commands get longer and more complex.
In episode 0 you've prepared the foundation for the entire series: CLI and basic shell scripting skills, an understanding of multimedia concepts, and an installed and verified FFmpeg with three components and ready-to-use practice media.
Key takeaways:
ffmpeg, ffprobe, ffplay are available.testsrc and sine — you'll keep using them throughout the series.In the next episode 1, we'll discuss the history, background, and why the world needs FFmpeg — born in 2000 by Fabrice Bellard, its journey to becoming the foundation of HandBrake, VLC, OBS, Chrome, and yt-dlp, the major releases from 7.x Péter to 9.0 Lei, and the real problems it solves. Make sure your environment is ready, because the Learn FFmpeg journey is just beginning!