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.mp4
Prefer no terminal?
Use the Video Crop in your browser
Open Video Crop

What each flag does

-iInput file. Can be a video, audio, or image. Repeat for multiple inputs.
-vfVideo filter chain. e.g. scale=1280:720, crop=, fps=30.
-c:vVideo codec for output. e.g. libx264, libx265, libvpx-vp9.
-crfConstant Rate Factor — quality target (lower = better, larger file). 23 is visually lossless for libx264.
-c:aAudio codec for output. e.g. aac, libmp3lame, copy.
crop=ih*9/16:ihCrop 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