Tools: ffmpeg for Content Creators: Essential Commands Cheat Sheet - Complete Guide

Tools: ffmpeg for Content Creators: Essential Commands Cheat Sheet - Complete Guide

What You'll Need

Table of Contents

Why FFmpeg Matters for Content Creators

Video Conversion & Compression

Basic MP4 Conversion

4K to 1080p Downscaling

Highly Compressed Version for Mobile

WebM for Web Delivery

Audio Extraction & Processing

Extract Audio as MP3

Extract Audio as WAV (Lossless)

Compress Audio Only

Add Audio Track to Video (Without Audio)

Normalize Audio Loudness

Batch Processing Multiple Files

Bash Script for Batch Conversion (Linux/Mac)

Windows Batch Script

Parallel Processing on a VPS

Creating Animated GIFs & Thumbnails

Convert Video to Animated GIF

Extract a Single Frame as Thumbnail

Extract Multiple Frames

High-Quality Thumbnail

Advanced Streaming & Watermarking

Add a Text Watermark

Add an Image Watermark

Create DASH Streaming Files

Segment Video into Chunks

Getting Started 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. 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. YouTube creators often need multiple resolutions. Here's how to downscale 4K to 1080p while maintaining quality: The -vf scale=1920:1080 filter resizes while maintaining aspect ratio. For social media where file size matters: The -s 1280x720 flag sets resolution explicitly. WebM files are smaller than MP4 and great for embedding in websites: 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-DEVTO. You have a video but only need the audio—common for podcasts or music content: The -q:a 0 flag extracts the highest quality audio. For professional audio work or archival: Reduce file size without re-encoding video. This is useful when you're working with existing MP4s: The -c:v copy flag skips video re-encoding entirely—instant processing. You've got a silent video and a separate audio file: This maps the video from file 0 and audio from file 1. If your audio is too quiet or too loud: The loudnorm filter adjusts to broadcast standard loudness. Here's where FFmpeg becomes truly powerful. Let's say you have 50 videos that need conversion. Save this as convert_all.sh, then run chmod +x convert_all.sh && ./convert_all.sh. Save as convert_all.bat and double-click. If you're running this on a Hetzner VPS with multiple CPU cores, use GNU Parallel: 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. Perfect for social media previews: Get a frame at exactly 15 seconds in: The -ss 00:00:15 flag seeks to 15 seconds. Adjust timing to capture your best moment. Create a grid of thumbnails from your video: This extracts one frame every 10 seconds. Perfect for creating preview grids. YouTube-optimized thumbnail (1280x720): Overlay text on your video (useful for branding): On Mac, use /Library/Fonts/Arial.ttf. On Linux, try /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf. Overlay a logo or watermark image: This places the logo 10px from the bottom-right corner. For adaptive bitrate streaming (HLS/DASH): This creates three quality tiers from a single source—essential for professional streaming. Break a long video into smaller files (useful for uploading or processing): This creates 5-minute chunks: segment_000.mp4, segment_001.mp4, etc. 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. The real power emerges when you integrate FFmpeg into your workflows. If you're Templates let you quickly answer FAQs or store snippets for re-use. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse

Code Block

Copy

ffmpeg -i input.mov -c:v libx264 -preset fast -crf 23 -c:a aac -b:a 192k output.mp4 ffmpeg -i input.mov -c:v libx264 -preset fast -crf 23 -c:a aac -b:a 192k output.mp4 ffmpeg -i input.mov -c:v libx264 -preset fast -crf 23 -c:a aac -b:a 192k output.mp4 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 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 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 ffmpeg -i input.mp4 -c:v libx264 -preset fast -crf 28 -s 1280x720 -c:a aac -b:a 128k output_mobile.mp4 ffmpeg -i input.mp4 -c:v libx264 -preset fast -crf 28 -s 1280x720 -c:a aac -b:a 128k output_mobile.mp4 ffmpeg -i input.mp4 -c:v libx264 -preset fast -crf 28 -s 1280x720 -c:a aac -b:a 128k output_mobile.mp4 ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 1000k -c:a libopus -b:a 128k output.webm ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 1000k -c:a libopus -b:a 128k output.webm ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 1000k -c:a libopus -b:a 128k output.webm ffmpeg -i input.mp4 -q:a 0 -map a output.mp3 ffmpeg -i input.mp4 -q:a 0 -map a output.mp3 ffmpeg -i input.mp4 -q:a 0 -map a output.mp3 ffmpeg -i input.mp4 -c:a pcm_s16le output.wav ffmpeg -i input.mp4 -c:a pcm_s16le output.wav ffmpeg -i input.mp4 -c:a pcm_s16le output.wav ffmpeg -i input.mp4 -c:v copy -c:a libmp3lame -b:a 128k output.mp4 ffmpeg -i input.mp4 -c:v copy -c:a libmp3lame -b:a 128k output.mp4 ffmpeg -i input.mp4 -c:v copy -c:a libmp3lame -b:a 128k output.mp4 ffmpeg -i video_silent.mp4 -i audio.mp3 -c:v copy -c:a aac -map 0:v:0 -map 1:a:0 output.mp4 ffmpeg -i video_silent.mp4 -i audio.mp3 -c:v copy -c:a aac -map 0:v:0 -map 1:a:0 output.mp4 ffmpeg -i video_silent.mp4 -i audio.mp3 -c:v copy -c:a aac -map 0:v:0 -map 1:a:0 output.mp4 ffmpeg -i input.mp4 -af loudnorm=I=-16:TP=-1.5:LRA=11 -c:v copy output.mp4 ffmpeg -i input.mp4 -af loudnorm=I=-16:TP=-1.5:LRA=11 -c:v copy output.mp4 ffmpeg -i input.mp4 -af loudnorm=I=-16:TP=-1.5:LRA=11 -c:v copy output.mp4 #!/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 #!/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 #!/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 @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 @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 @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 find . -name "*.mov" | parallel ffmpeg -i {} -c:v libx264 -preset fast -crf 23 -c:a aac -b:a 192k {.}.mp4 find . -name "*.mov" | parallel ffmpeg -i {} -c:v libx264 -preset fast -crf 23 -c:a aac -b:a 192k {.}.mp4 find . -name "*.mov" | parallel ffmpeg -i {} -c:v libx264 -preset fast -crf 23 -c:a aac -b:a 192k {.}.mp4 ffmpeg -i input.mp4 -vf "fps=10,scale=320:-1:flags=lanczos" -c:v gif output.gif ffmpeg -i input.mp4 -vf "fps=10,scale=320:-1:flags=lanczos" -c:v gif output.gif ffmpeg -i input.mp4 -vf "fps=10,scale=320:-1:flags=lanczos" -c:v gif output.gif ffmpeg -ss 00:00:15 -i input.mp4 -vf scale=1280:720 -q:v 2 thumbnail.jpg ffmpeg -ss 00:00:15 -i input.mp4 -vf scale=1280:720 -q:v 2 thumbnail.jpg ffmpeg -ss 00:00:15 -i input.mp4 -vf scale=1280:720 -q:v 2 thumbnail.jpg ffmpeg -i input.mp4 -vf "fps=1/10,scale=320:240" -q:v 2 frame_%04d.jpg ffmpeg -i input.mp4 -vf "fps=1/10,scale=320:240" -q:v 2 frame_%04d.jpg ffmpeg -i input.mp4 -vf "fps=1/10,scale=320:240" -q:v 2 frame_%04d.jpg ffmpeg -ss 00:00:30 -i input.mp4 -vf scale=1280:720 -q:v 1 -frames:v 1 thumbnail_hq.jpg ffmpeg -ss 00:00:30 -i input.mp4 -vf scale=1280:720 -q:v 1 -frames:v 1 thumbnail_hq.jpg ffmpeg -ss 00:00:30 -i input.mp4 -vf scale=1280:720 -q:v 1 -frames:v 1 thumbnail_hq.jpg 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 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 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 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 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 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 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 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 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 ffmpeg -i input.mp4 -c copy -segment_time 00:05:00 -f segment segment_%03d.mp4 ffmpeg -i input.mp4 -c copy -segment_time 00:05:00 -f segment segment_%03d.mp4 ffmpeg -i input.mp4 -c copy -segment_time 00:05:00 -f segment segment_%03d.mp4 - 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 - 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 - -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 bitrate - output.mp4 — destination - fps=10 — 10 frames per second (lower = smaller file) - scale=320:-1 — scale to 320px wide, maintain aspect ratio - flags=lanczos — high-quality scaling algorithm - Mac: brew install ffmpeg - Linux (Ubuntu/Debian): sudo apt-get install ffmpeg - Windows: Download from ffmpeg.org or use choco install ffmpeg if you have Chocolatey