FFmpeg CLI - Getting Started

FFmpeg is a free, open-source tool for processing video files. Learn how to automate video editing tasks like cropping for different platforms, adding text overlays for branding, and batch processing to create weeks of content in minutes.

What You'll Learn

  • Crop to Square - Convert landscape videos to 1:1 square format for Instagram, TikTok, and LinkedIn
  • Add Text Overlays - Brand your videos with website URLs, calls-to-action, or custom text
  • Loop & Concatenate - Stitch multiple clips together or loop videos for extended runtime
  • Batch Processing - Run FFmpeg on hundreds of videos to create content at scale
  • Automation Workflows - Use FFmpeg in scripts, APIs, and no-code platforms like N8N

Commands Covered

1. Crop to Square

Convert landscape videos to perfect 1:1 squares for social media:

ffmpeg -i test-video.mp4 -vf "crop=min(iw\,ih):min(iw\,ih)" output-square.mp4

2. Add Text Overlay

Add branded text with a semi-transparent background:

ffmpeg -i test-video.mp4 -vf "drawtext=text='your-site.com':fontsize=48:fontcolor=white:x=(w-text_w)/2:y=(h-text_h)/2:box=1:boxcolor=black@0.5:boxborderw=10" output-with-text.mp4

3. Loop/Concatenate Videos

Create a file list and concatenate videos without re-encoding:

echo "file 'output-with-text.mp4'" > filelist.txt
echo "file 'output-with-text.mp4'" >> filelist.txt
ffmpeg -f concat -safe 0 -i filelist.txt -c copy output-doubled.mp4

Prerequisites

  • • FFmpeg installed on your system
  • • General understanding of running commands on a command-line interface

Ready to Automate?

Process videos at scale with FFmpeg Micro's API. No servers to manage.

Start Free Trial