ffmpeg for Content Creators: Essential Commands Cheat Sheet
What You’ll Need
- A computer with FFmpeg installed (Windows, Mac, or Linux)
- Hetzner VPS or Contabo VPS if you’re encoding videos at scale
- DigitalOcean as an alternative cloud option
- Basic command-line comfort
- Sample media files (video or audio) to practice with
Table of Contents
- Why FFmpeg Matters for Content Creators
- Video Conversion & Compression
- Audio Extraction & Processing
- Batch Processing Multiple Files
- Creating Animated GIFs & Thumbnails
- Advanced Streaming & Watermarking
- Getting Started
Why FFmpeg Matters for Content Creators
I’ve been automating content workflows for years, and FFmpeg is the backbone of almost every video pipeline I build. It’s free, it’s powerful, and it runs on literally any server. If you’re producing YouTube videos, Shorts, TikToks, or streaming content, you need to understand at least the basics.
The problem? FFmpeg has a reputation for being intimidating. The command syntax looks like ancient incantations. But once you learn the structure, you’ll realize it’s just a series of logical parameters: input → filters → codec → output.
When I automate video processing at scale, I often use n8n Cloud to orchestrate FFmpeg jobs across multiple files. If you’re looking to build a fully automated content production system, understanding FFmpeg pairs perfectly with workflow automation tools.
Let me give you the commands you’ll actually use every single day.
Video Conversion & Compression
Basic MP4 Conversion
This is the most common task. You’ve got a video file in some weird format, and you need it as MP4 for YouTube or web delivery.
ffmpeg -i input.mov -c:v libx264 -preset fast -crf 23 -c:a aac -b:a 192k output.mp4
Breaking this down:
-i input.mov— your input file-c:v libx264— use H.264 video codec (compatible everywhere)-preset fast— encoding speed (fast, medium, slow; slower = better quality/bigger file)-crf 23— quality (0-51; lower is better, 18-28 is typical)-c:a aac— audio codec-b:a 192k— audio bitrateoutput.mp4— destination
4K to 1080p Downscaling
YouTube creators often need multiple resolutions. Here’s how to downscale 4K to 1080p while maintaining quality:
ffmpeg -i input_4k.mp4 -vf scale=1920:1080 -c:v libx264 -preset medium -crf 21 -c:a aac -b:a 192k output_1080p.mp4
The -vf scale=1920:1080 filter resizes while maintaining aspect ratio.
Highly Compressed Version for Mobile
For social media where file size matters:
ffmpeg -i input.mp4 -c:v libx264 -preset fast -crf 28 -s 1280x720 -c:a aac -b:a 128k output_mobile.mp4
The -s 1280x720 flag sets resolution explicitly.
WebM for Web Delivery
WebM files are smaller than MP4 and great for embedding in websites:
ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 1000k -c:a libopus -b:a 128k output.webm
VP9 takes longer to encode but creates tiny, high-quality files.
💡 Fast-Track Your Project: Don’t want to configure this yourself? I build custom n8n pipelines and bots. Message me with code SYS3-HUGO.
Audio Extraction & Processing
Extract Audio as MP3
You have a video but only need the audio—common for podcasts or music content:
ffmpeg -i input.mp4 -q:a 0 -map a output.mp3
The -q:a 0 flag extracts the highest quality audio.
Extract Audio as WAV (Lossless)
For professional audio work or archival:
ffmpeg -i input.mp4 -c:a pcm_s16le output.wav
Compress Audio Only
Reduce file size without re-encoding video. This is useful when you’re working with existing MP4s:
ffmpeg -i input.mp4 -c:v copy -c:a libmp3lame -b:a 128k output.mp4
The -c:v copy flag skips video re-encoding entirely—instant processing.
Add Audio Track to Video (Without Audio)
You’ve got a silent video and a separate audio file:
ffmpeg -i video_silent.mp4 -i audio.mp3 -c:v copy -c:a aac -map 0:v:0 -map 1:a:0 output.mp4
This maps the video from file 0 and audio from file 1.
Normalize Audio Loudness
If your audio is too quiet or too loud:
ffmpeg -i input.mp4 -af loudnorm=I=-16:TP=-1.5:LRA=11 -c:v copy output.mp4
The loudnorm filter adjusts to broadcast standard loudness.
Batch Processing Multiple Files
Here’s where FFmpeg becomes truly powerful. Let’s say you have 50 videos that need conversion.
Bash Script for Batch Conversion (Linux/Mac)
#!/bin/bash
for file in *.mov; do
output="${file%.mov}.mp4"
ffmpeg -i "$file" -c:v libx264 -preset fast -crf 23 -c:a aac -b:a 192k "$output"
done
Save this as convert_all.sh, then run chmod +x convert_all.sh && ./convert_all.sh.
Windows Batch Script
@echo off
for %%f in (*.mov) do (
ffmpeg -i "%%f" -c:v libx264 -preset fast -crf 23 -c:a aac -b:a 192k "%%~nf.mp4"
)
pause
Save as convert_all.bat and double-click.
Parallel Processing on a VPS
If you’re running this on a Hetzner VPS with multiple CPU cores, use GNU Parallel:
find . -name "*.mov" | parallel ffmpeg -i {} -c:v libx264 -preset fast -crf 23 -c:a aac -b:a 192k {.}.mp4
This processes multiple files simultaneously, cutting your total time dramatically.
For automated batch processing at enterprise scale, I’d recommend integrating FFmpeg with n8n Cloud to trigger conversions based on file uploads or events. This is especially useful if you’re running a system to monitor your VPS with n8n health check workflows since you can automatically alert when encoding finishes.
Creating Animated GIFs & Thumbnails
Convert Video to Animated GIF
Perfect for social media previews:
ffmpeg -i input.mp4 -vf "fps=10,scale=320:-1:flags=lanczos" -c:v gif output.gif
fps=10— 10 frames per second (lower = smaller file)scale=320:-1— scale to 320px wide, maintain aspect ratioflags=lanczos— high-quality scaling algorithm
Extract a Single Frame as Thumbnail
Get a frame at exactly 15 seconds in:
ffmpeg -ss 00:00:15 -i input.mp4 -vf scale=1280:720 -q:v 2 thumbnail.jpg
The -ss 00:00:15 flag seeks to 15 seconds. Adjust timing to capture your best moment.
Extract Multiple Frames
Create a grid of thumbnails from your video:
ffmpeg -i input.mp4 -vf "fps=1/10,scale=320:240" -q:v 2 frame_%04d.jpg
This extracts one frame every 10 seconds. Perfect for creating preview grids.
High-Quality Thumbnail
YouTube-optimized thumbnail (1280x720):
ffmpeg -ss 00:00:30 -i input.mp4 -vf scale=1280:720 -q:v 1 -frames:v 1 thumbnail_hq.jpg
Advanced Streaming & Watermarking
Add a Text Watermark
Overlay text on your video (useful for branding):
ffmpeg -i input.mp4 -vf "drawtext=text='YourName':fontfile=/path/to/font.ttf:fontsize=24:fontcolor=white:x=10:y=10" -c:v libx264 -preset fast output.mp4
On Mac, use /Library/Fonts/Arial.ttf. On Linux, try /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf.
Add an Image Watermark
Overlay a logo or watermark image:
ffmpeg -i input.mp4 -i logo.png -filter_complex "[0:v][1:v] overlay=W-w-10:H-h-10:enable='between(t,0,duration)'" -c:v libx264 -preset fast output.mp4
This places the logo 10px from the bottom-right corner.
Create DASH Streaming Files
For adaptive bitrate streaming (HLS/DASH):
ffmpeg -i input.mp4 -c:v libx264 -s 1920x1080 -b:v 5000k -c:a aac -b:a 192k stream_1080p.mp4 -c:v libx264 -s 1280x720 -b:v 2500k -c:a aac -b:a 128k stream_720p.mp4 -c:v libx264 -s 854x480 -b:v 1000k -c:a aac -b:a 96k stream_480p.mp4
This creates three quality tiers from a single source—essential for professional streaming.
Segment Video into Chunks
Break a long video into smaller files (useful for uploading or processing):
ffmpeg -i input.mp4 -c copy -segment_time 00:05:00 -f segment segment_%03d.mp4
This creates 5-minute chunks: segment_000.mp4, segment_001.mp4, etc.
Getting Started
Installation:
- Mac:
brew install ffmpeg - Linux (Ubuntu/Debian):
sudo apt-get install ffmpeg - Windows: Download from ffmpeg.org
or use
choco install ffmpegif you have Chocolatey
Hosting your FFmpeg jobs:
If you’re encoding at scale, rent a Hetzner VPS (CPU-optimized instance) or Contabo VPS with multiple cores. A single good server can encode 10+ videos simultaneously.
Automating FFmpeg:
The real power emerges when you integrate FFmpeg into your workflows. If you’re
Want to automate this yourself?
Start with n8n Cloud (free tier available) or self-host on a Hetzner VPS for full control.
📬 Get Weekly Automation Tips
One email per week with tutorials, tools, and workflows. No spam, unsubscribe anytime.