VideoRx Learn
intermediate 4h · 71 lessons

FFmpeg Compression, End to End

Understand what every encoding knob actually costs you.

A working engineer's tour of H.264/H.265 compression with FFmpeg: rate control, presets, keyframes, filtering and the delivery ladder. Every lesson ships the exact commands, sample media and an A/B comparison so you can see the tradeoff rather than take it on faith.

What you'll be able to do

  • Choose between CRF, ABR and CBR with a reason you can defend
  • Read an ffprobe report and spot what is wrong with a file
  • Build a multi-rendition HLS ladder that actually switches cleanly
  • Cut encode times without giving away visible quality

Before you start

  • Comfortable in a terminal
  • FFmpeg 6.x installed locally

Course contents

Background: open source and workflow

  • A Beginner's GUIDE to FFmpeg
    text
  • What Does "Open Source" Mean?
    text
  • Myriad Of Open Source Licenses:
    text
  • "open source" means:
    text
  • Factors To Consider When Choosing Open Source Software:
    text
  • Key Open Source Technologies:
    text
  • what does "workflow" MEAN?
    text
  • "Workflow" means:
    text
  • Git:
    text
  • A word about security:
    text
  • LAMP Stack:
    text

Getting oriented

  • Sample Video
    text
  • FFmpeg: Where did it come From?
    text
  • FFmpeg: Where Do You Get It?
    text
  • FFmpeg: What Version Are You Using?
    Lab · 1 step
  • FFmpeg: What Codecs Are Available In Your Build?
    Lab · 2 steps
  • FFmpeg: How do you use it?
    text
  • FFprobe: Analysis Tool
    text
  • Deconstructing an FFmpeg Web-based Encoding System
    text
  • FFmpeg Real-Time Stats
    text
  • FFmpeg Syntax Ordering
    text
  • FFmpeg Syntax Ordering
    Lab · 1 step
  • Sample Videos
    text
  • FFmpeg Real-Time Stats
    text
  • FFmpeg Syntax Ordering
    text
  • FFmpeg Syntax Ordering
    Lab · 1 step

Your first encodes

  • FFmpeg Example #1: Input & Output
    Lab · 2 steps
  • FFmpeg Example #2: Override Defaults
    Lab · 1 step
  • FFmpeg Example #3: Display Input Source Details
    Lab · 2 steps
  • FFmpeg Example #5: Define Output Video And Audio Codecs
    Lab · 1 step

Controlling quality

  • CRF vs. target bitrate

    The single most misunderstood choice in the whole pipeline.

    Free preview Lab · 3 steps
  • Presets: buying quality with time

    What -preset actually changes, and where the curve goes flat.

    video
  • FFmpeg Example #4: Use A Preset To Override Speed/Quality
    Lab · 1 step
  • FFmpeg Example #7: Change The Quality Of H.264/x264 Video
    Lab · 1 step
  • FFmpeg Example #8: Define Keyframe Parameters
    Lab · 1 step
  • FFmpeg Example #12: Force Insertion Of Keyframes
    Lab · 1 step
  • FFmpeg Example #6: Change The Quality Of Any Video
    Lab · 1 step

Resizing and trimming

  • FFmpeg Example #9: Change Dimensions Of Output Video
    Lab · 1 step
  • FFmpeg Example #10: Change Dimensions Of Output Video (Filter)
    Lab · 1 step
  • FFmpeg Example #11: Set In Point Of Input Source Video
    Lab · 1 step
  • FFmpeg Example #1: Trimming Input Source
    Lab · 1 step

Working with audio

  • FFmpeg Example #14: Normalize Audio (Part 1)
    Lab · 1 step
  • FFmpeg Example #14: Normalize Audio (Part 2)
    Lab · 1 step
  • FFmpeg Example #13: Defining Audio Parameters
    Lab · 1 step
  • FFmpeg Example #15: Mapping Input Tracks
    Lab · 1 step

Encoding samples to compare

  • FFmpeg Example #2: Preparing Low-Bitrate x264 Sample (Part 1)
    Lab · 1 step
  • FFmpeg Example #3: Preparing Low-Bitrate x265 Sample
    Lab · 1 step
  • FFmpeg Example #2: Preparing Low-Bitrate x264 Sample (Part 2)
    Lab · 1 step

Spatial filters: crop, pad, overlay

  • FFmpeg Example #4: Cropping An Input Video (Part 1)
    Lab · 1 step
  • FFmpeg Example #5: Cropping An Input Video (Part 2)
    Lab · 1 step
  • FFmpeg Example #6: Cropping An Input Video (Part 3)
    Lab · 1 step
  • FFmpeg Example #7: Padding An Input Video
    Lab · 1 step
  • FFmpeg Example #8: Overlaying A Second Input On Top Of The First Input
    Lab · 1 step

Chaining filters and burning in text

  • FFmpeg Example #9: Chaining Multiple Filters Together
    Lab · 1 step
  • FFmpeg Example #10: Adding Text To Video Output (Part 1)
    Lab · 1 step
  • FFmpeg Example #11: Adding Text To Video Output (Part 2)
    Lab · 1 step
  • FFmpeg Example #12: Crop, Pad, And Drawtext Combined (Part 3)
    Lab · 1 step
  • FFmpeg Example #10: Adding Text To Video Output (Part 1)
    Lab · 1 step

Multiple outputs from one input

  • Building a three-rung HLS ladder

    Aligned keyframes, sane segment length, one master playlist.

    Lab · 1 step
  • FFmpeg Example #13: Creating Multiple Outputs From Same Input
    Lab · 1 step
  • FFmpeg Example #14: Creating Multiple Outputs From Same Input (Filters)
    Lab · 1 step
  • FFmpeg Example #15: Streaming Multiple Outputs From Same Input
    Lab · 1 step
  • FFmpeg Example #16: Splitting One Encode To Multiple Outputs
    Lab · 1 step
  • FFmpeg Example #13: Creating Multiple Outputs From Same Input
    Lab · 1 step

Capturing local and network devices

  • FFmpeg Example #17: Accessing Locally Connected Devices
    Lab · 1 step
  • FFmpeg Example #18: Accessing Locally Connected Devices (Part 2)
    Lab · 1 step
  • FFmpeg Example #19: Accessing Locally Connected Devices (Part 3)
    Lab · 1 step
  • FFmpeg Example #20: Accessing Networked Devices
    text
  • FFmpeg Example #18: Accessing Locally Connected Devices (Sidebar)
    Lab · 2 steps

Live delivery

  • FFmpeg Example #16: Using Real-Time Input/Output
    Lab · 1 step
  • FFmpeg Example #21: Deploying Live HLS Output
    Lab · 1 step