1

I have many videos in a folder which I want to crop in same way. I want to remove 25px from the bottom part of all frames of all videos. All the videos are 1280x720p and have same format which is mp4.

How can I crop 25px from the bottom of the frames and save the output files as new separate files?

I am using ffmpeg cli on Linux but I don't mind using other tools on Windows or Linux. Is there a easy way of doing this in batch?

2

Basic command is

ffmpeg -i in.mp4 -vf crop=iw:ih-25:0:0 -c:a copy out.mp4

Note that MP4s usually require the dimensions to be even, so the command above will actually crop 26 pixels from the bottom.

On linux, using bash, the script would be

#!/bin/bash
# Usage: ./crop.sh

mkdir cropped
for file in *.mp4;
do
    ffmpeg -i "${file}" -vf crop=iw:ih-25:0:0 -c:a copy "./cropped/$file"
done

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.