All posts
FFmpeg26 Jan 2026 · 3 min read

Teaching FFmpeg by running it

JPJean Perez

An FFmpeg command reads left to right, but it doesn't execute that way. Where a flag sits in the command changes what it applies to, and that's true before you've learned what any individual flag does.

The shape every command follows

Every FFmpeg invocation has the same four regions in order: global options, one or more inputs, output options, and an output. Global options come first and apply to the whole run, things like -y to overwrite an existing file without prompting. Each input starts with -i, and any option placed before that -i describes how to read that specific input, not the program as a whole. Everything placed after the last -i and before the output path describes how to build that output: codecs, bitrates, filters. The output path itself comes last, and its extension is what tells FFmpeg which container to write.

ffmpeg -y -i input.mp4 -c:v libx264 -b:v 2800k -vf scale=1280:720 -c:a aac -b:a 128k output.mp4
  • -y (global): don't ask before overwriting output.mp4 if it exists
  • -i input.mp4 (the input): everything before this point applies only to reading it
  • -c:v libx264 (output option): encode the video stream with the H.264 encoder
  • -b:v 2800k (output option): target video bitrate
  • -vf scale=1280:720 (output option): resize before encoding
  • -c:a aac -b:a 128k (output option): audio codec and bitrate
  • output.mp4 (the output itself): the .mp4 extension selects the container

Move -ss 10 in front of -i and it becomes an input option: FFmpeg seeks inside the file before it starts reading, which is fast. Put the same flag after -i and it becomes an output option: FFmpeg reads and decodes from the beginning and throws away everything before the ten-second mark, which gets slower the further in you seek. Same flag, same value, different position, different behavior. That's the part a flag reference alone doesn't teach.

A real command usually has more than one input and more than one output stream to configure, and every one of those adds another boundary a flag can land on either side of. Two inputs means two places -ss could seek from. An input with both audio and video means -c:v and -c:a each name the stream type they apply to. That's still the same four regions, applied more than once in a single line.

Why a course breaks every command down flag by flag

A command copied from a forum post works until it doesn't, and when it doesn't, a flag with no explanation attached is just a token to delete and hope. The alternative is showing each flag next to what it does and why it sits where it sits, so a command stops being something to paste and becomes something to edit.

That's the shape a lesson takes in BeemMeUp's course: a command, and a breakdown of each flag inside it, stored as data rather than written prose for every single example.

export const whatIsFFmpeg: Lesson = {
  id: 'what-is-ffmpeg',
  title: 'What is FFMPEG?',
  module: 'Fundamentals',
  duration: 15,
  content: [
    {
      type: 'code',
      command: 'ffmpeg -version',
      explanation: 'Check your FFmpeg installation and version information',
      flagBreakdown: [
        {
          flag: '-version',
          description: 'Display version information and build configuration',
        },
      ],
    },
  ],
};

A lesson that already knows its command and its flags as structured data can render the breakdown consistently everywhere it appears, and adding a lesson means adding a value to an array. The teaching content and the interface that shows it stay separate on purpose.

Nine modules, one command at a time

The FFmpeg course is built out of nine modules, and the order isn't arbitrary: fundamentals, video processing, audio processing, ffprobe, ffplay, advanced filters, advanced techniques, optimization and performance, and common use cases.

Fundamentals establishes the anatomy above: what a command is before it's about anything specific. Video and audio processing apply that anatomy to the two stream types a file actually carries. ffprobe and ffplay turn the same anatomy around, toward reading a file back out instead of writing a new one, since inspecting a file and transforming one use the same command shape underneath. Advanced filters and advanced techniques compose multiple operations into a single pipeline. Optimization and performance is about making that pipeline efficient rather than just correct. Common use cases closes the course by applying everything before it to problems a viewer would actually search for: converting a format, extracting audio, building a thumbnail grid.

Each module adds new flags to the same fixed anatomy, never a new anatomy to learn. By the time a lesson reaches advanced filters, -i, global options, and output options aren't new concepts anymore. Only the flags inside them are.

That's the bet the whole course makes: teach the four regions of a command once, well, and every flag after that is vocabulary inside a grammar a learner already has.