• 3 Posts
  • 49 Comments
Joined 3 years ago
cake
Cake day: June 18th, 2023

help-circle














  • beerclue@lemmy.worldtoLinux@lemmy.ml•aaa
    link
    fedilink
    arrow-up
    17
    ·
    1 year ago

    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’s cropdetect. 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