FFmpeg recipe
FFmpeg: Crop a Video to 9:16 (Vertical for Reels / Shorts)
crop=ih*9/16:ih takes the full height and crops to a 9:16 width centered horizontally. The result is ready for TikTok, Reels, and Shorts.
Command
ffmpeg -i input.mp4 -vf "crop=ih*9/16:ih" -c:v libx264 -crf 23 -c:a copy -y output_vertical.mp4Prefer no terminal?
Use the Video Crop in your browser
What each flag does
| -i | Input file. Can be a video, audio, or image. Repeat for multiple inputs. |
|---|---|
| -vf | Video filter chain. e.g. scale=1280:720, crop=, fps=30. |
| -c:v | Video codec for output. e.g. libx264, libx265, libvpx-vp9. |
| -crf | Constant Rate Factor — quality target (lower = better, larger file). 23 is visually lossless for libx264. |
| -c:a | Audio codec for output. e.g. aac, libmp3lame, copy. |
| crop=ih*9/16:ih | Crop output: width = input_height × 9/16, height = input_height. Result is 9:16 aspect. |
Notes & gotchas
- Add :((iw-ih*9/16)/2):0 to crop=W:H:X:Y to manually offset the crop horizontally.
- Resize to 1080×1920 after cropping for Reels-native resolution: -vf "crop=ih*9/16:ih,scale=1080:1920".
Related recipes
Resize to 1080p · Any video
Resize any video to 1080p (1920×1080) with FFmpeg scale filter. Preserves aspect ratio with -1 trick.
Change frame rate · Any video
Change the frame rate of any video with FFmpeg fps filter. Simple drop / duplicate for safe FPS conversion.
Speed up 2x · Any video
Speed up a video 2× (or any factor) with FFmpeg. Uses setpts for video and atempo for audio without pitch shift.
Reverse a video · Any video
Reverse video and audio with FFmpeg using reverse + areverse filters. Useful for boomerangs and easter eggs.