FFmpeg Beginner Guide

posted 2 min read

Introduction

FFmpeg is one of the most powerful open-source tools for handling multimedia files. Whether you need to convert, compress, record, or stream audio and video, FFmpeg is the go-to command-line utility trusted by developers, content creators, and even large companies.

It supports almost every audio and video format, making it an essential tool in video editing, streaming, and automation pipelines.


Brief History

  • Released: December 20, 2000

  • Creator: Fabrice Bellard

  • Maintained by: FFmpeg team & many open-source contributors

The name FFmpeg comes from:

  • FF → "Fast Forward"

  • MPEG → a popular video compression standard (Moving Picture Experts Group)

Since its release, FFmpeg has become a backbone for many popular software and platforms including VLC Media Player, YouTube, and OBS Studio.


Why Use FFmpeg?

  1. Convert videos between formats (MP4, MKV, AVI, MOV, etc.)

  2. Extract or convert audio (MP3, WAV, AAC, etc.)

  3. Compress media without losing much quality

  4. Capture screenshots from videos

  5. Stream audio/video over networks

  6. Automate video/audio processing in scripts


Installation

On Linux (Fedora/Ubuntu):

sudo dnf install ffmpeg   # Fedora
sudo apt install ffmpeg   # Ubuntu/Debian

On macOS (with Homebrew):

brew install ffmpeg

On Windows:

  1. Download builds from ffmpeg.org

  2. Add ffmpeg/bin to your PATH


Basic Commands to get started

1. Video-based Commands

  • Convert a video to another format
ffmpeg -i input.mp4 output.mkv

It converts an MP4 file into MKV format.


  • Extract audio from a video
ffmpeg -i video.mp4 -q:a 0 -map a audio.mp3

Takes the audio from a video and saves it as MP3.


  • Compress a video
ffmpeg -i input.mp4 -vcodec libx265 -crf 28 output.mp4

Uses the H.265 codec with CRF (quality factor) for compression.


  • Capture a frame (screenshot) from a video
ffmpeg -i video.mp4 -ss 00:00:05 -vframes 1 screenshot.png

Takes a screenshot at the 5-second mark.


  • Record screen (Linux example)
ffmpeg -video_size 1920x1080 -framerate 30 -f x11grab -i :0.0 output.mp4

Records the desktop screen.


2. Image-based Commands

  • Convert PNG to JPG
ffmpeg -i input.png output.jpg

In the same way we can convert to other types too.


  • Convert multiple images into a video
ffmpeg -framerate 24 -i img%03d.png output.mp4

If you have files like img001.png, img002.png..., this creates a video at 24 fps.


  • Extract all frames from a video as images
ffmpeg -i video.mp4 frame_%04d.png

It saves every frame as an image: frame_0001.png, frame_0002.png...


  • Resize an image
ffmpeg -i input.png -vf scale=800:600 resized.png

It resizes an image to 800×600 pixels.


  • Convert image format batch (all PNG → JPG)
for f in *.png; do ffmpeg -i "$f" "${f%.png}.jpg"; done

Converts all .png files in a folder into .jpg. (Linux/Mac shell loop)


Conclusion

FFmpeg may seem intimidating at first because it’s command-line based, but once you learn a few commands, you can convert, compress, and manipulate media effortlessly.

It’s free, fast, and reliable, so no wonder it powers some of the biggest platforms in the world.

1 Comment

1 vote

More Posts

SCR4K: The Flagship of Modern Screen Recordings

eyedolise - Oct 17

FFStudio — A Visual Node-Based Frontend for FFmpeg

azfino - Oct 17

Using Bash to Monitor Server Health (CPU, RAM, Disk) – A Beginner-Friendly Guide

Gift Balogun - May 25

DevLog 20250506 C# Video Processing Foundation Library

Methodox - May 16

Unlock Stunning 4K Screen Capture with Ease: Introducing Game Capture 4K

eyedolise - Oct 13
chevron_left