Very Good FFmpeg
How it worksPricingCompareFAQDocs
Guide #6

Resize video with FFmpeg

Resizing is common for web playback, previews, and platform exports. The important parts are aspect ratio, even dimensions, and the final codec.

Copy + paste this:

Resize while preserving aspect ratio.

ffmpeg -i input -vf scale=-2:720 -c:v libx264 -crf 23 -c:a copy 720p.mp4

When this is the right tool

Start by checking whether this operation matches the job you actually need.

Use this when

3 Good fit
  • You need 1080p, 720p, or mobile-size versions.

  • You want smaller files and do not need full source resolution.

  • A platform requires a specific output size.

Be careful when

2 Watch out
  • You are upscaling low-quality input and expecting real detail.

  • You crop without checking important content near the edges.

Examples

Use these as starting points, then tune quality, size, and timing on real input files.

Scale to 720p

Resize while preserving aspect ratio.

ffmpeg -i input -vf scale=-2:720 -c:v libx264 -crf 23 -c:a copy 720p.mp4

Command breakdown

input input
Reads this input file.
-vf scale=-2:720
Applies a video filter chain.
-c:v libx264
Sets the video codec.
-crf 23
Controls visual quality. Lower values make larger, higher-quality files.
-c:a copy
Copies streams without re-encoding.
output 720p.mp4
Writes this output file.

Fit into 1080p canvas

Preserve content and pad to exact 1920x1080.

ffmpeg -i input -vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2" -c:v libx264 -crf 23 -c:a aac fitted.mp4

Command breakdown

input input
Reads this input file.
-vf scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2
Applies a video filter chain.
-c:v libx264
Sets the video codec.
-crf 23
Controls visual quality. Lower values make larger, higher-quality files.
-c:a aac
Sets the audio codec.
output fitted.mp4
Writes this output file.

Helpful tips

These details prevent most bad outputs and confusing FFmpeg results.

Use -2 for even dimensions

Many codecs need dimensions divisible by 2. `scale=-2:720` keeps aspect ratio and chooses a valid width.

Crop changes content

Cropping fills a target aspect ratio but removes pixels from the edges.

Padding preserves content

Padding fits a target canvas without cutting the image, but adds bars.

Related guides

Useful next steps when this operation is part of a larger workflow.

Compress video with FFmpeg

Learn practical FFmpeg video compression using CRF, presets, bitrate caps, and web-safe MP4 settings.

Create video thumbnails with FFmpeg

Learn how to create thumbnails, choose useful timestamps, and generate contact sheets with FFmpeg.

Convert video format with FFmpeg

Learn how to convert MOV, MKV, WebM, and AVI files to MP4 with FFmpeg, when to copy streams, and when to re-encode.

Need to run this at scale?

Run the same FFmpeg commands through a hosted API.

Keep the FFmpeg command surface. Very Good FFmpeg handles machines, logs, long jobs, outputs, and webhooks.

Try free →Read API docs
Very Good FFmpegChecking status...
Product
  • How it works
  • Pricing
  • Comparison
  • FAQ
Developers
  • Documentation
  • API Reference
  • MCP Server
  • TypeScript SDK
  • Python SDK
Company
  • Contact
  • Sign in
  • Sign up
Legal
  • Terms
  • Privacy
Compare
  • vs Rendi
  • vs RenderIO
  • vs ffmpeg-api.com
  • vs FFmpeg Micro
  • vs AWS MediaConvert
  • vs Google Transcoder API
  • vs Self-Hosted FFmpeg
  • vs Cloudinary
Integrations
  • Zapier
  • Make
  • n8n
Use Cases
  • Video SaaS Platforms
  • Content Creators & UGC Platforms
  • AI Video Startups
  • Agencies & Freelancers
  • Podcasts & Audio Pipelines
Guides
  • Convert video format with FFmpeg
  • Compress video with FFmpeg
  • Extract audio with FFmpeg
  • Trim video with FFmpeg
  • Create video thumbnails with FFmpeg
  • Resize video with FFmpeg
  • Add subtitles with FFmpeg
Best APIs
  • Best Video Transcoding API (2026)
  • Best Video Compression API (2026)
  • Best Audio Extraction API (2026)
  • Best API for Trimming Video (2026)
  • Best Video Thumbnail API (2026)
  • Best Video Resizing API (2026)
  • Best API for Adding Subtitles to Video (2026)
  • Best FFmpeg API (2026)
© 2026 Very Good FFmpeg