How to Crop and Resize Video with FFmpeg
FFmpeg is used to crop and resize videos. To resize to 720p, use scale=1280:720. To preserve aspect ratio, use -2 for one dimension. The crop filter cuts a rectangular area with syntax crop=width:height:x:y. For a centered 1080x1080 square, use crop=1080:1080:(iw-1080)/2:(ih-1080)/2. Always use -2 for auto-calculated dimensions to avoid H.264 encoding issues.