FFmpeg Resize Video: Scale, Crop & Pad (CLI + API)

📰 Dev.to · RenderIO

Learn to resize videos using FFmpeg with scale, crop, and pad functions via CLI and API

intermediate Published 14 Apr 2026
Action Steps
  1. Run the command 'ffmpeg -i input.mp4 -vf scale=1280:720 output.mp4' to resize a video
  2. Use the 'crop' function to remove unwanted parts of the video by running 'ffmpeg -i input.mp4 -vf crop=640:480:100:100 output.mp4'
  3. Apply padding to a video using 'ffmpeg -i input.mp4 -vf pad=1280:720:-1:-1 output.mp4'
  4. Configure the 'scale' filter to maintain the aspect ratio by adding ':force_original_aspect_ratio=decrease'
  5. Test different resize options using the FFmpeg CLI to achieve desired video dimensions
Who Needs to Know This

Developers and video editors can benefit from this tutorial to efficiently resize videos for various applications

Key Insight

💡 FFmpeg provides a powerful and flexible way to resize videos via CLI and API

Share This
Resize videos with ease using FFmpeg!
Read full article → ← Back to Reads