when I say trim I don’t mean to time trim a file, like getting rid of the last 2 minutes of the mkv file, but to picture trim every frame of the mkv file to get rid of black margins to both left and right of the actual image.
Files were originally recorded on 4:3 aspect ratio (some are movies from the 1950’s) but the encoder somehow created / copied huge black margins to both left and right of the actual image. I want to get rid of these.
Some of my files are 30 minutes long but others 2 hours.
if ffmpeg is the application I need, could anyone knowledgeable enough write the actual command?
can it be done for several files automatically?
Ffmpeg is totally capable of doing this. Something like
ffmpeg -i in.mkv -vf "crop=width:height:x:y" out.mkv
might work. You would need to specify the crop area (x:y), which you can get with ffmpeg’scropdetect
. Here’s an article about it. To automate this, I would use a for loop in a shell script, for more control, or just a one liner if width, height and x:y are the same for all:for file in *.mkv; do ffmpeg -i "${file}" -vf "crop=width:height:x:y" "cropped_${file}"; done
If people want to fart around with ffmpeg filters this site is great: https://ffmpeg.lav.io/