# given a course video that is 16:9 # that contains a video that is 24:9 # where the inner video is letterboxed # but the bottom bar is slightly thicker # crop the center of the inner video out # assuming a 25:9 aspect ratio to account # for the odd-sized bars so that you end up # with a 16:9 non-letterboxed video target_width="(in_w*16)/25" # in_w is an ffmpeg var representing the input width target_height="(in_h*16)/25" # in_h is an ffmpeg var representing the input height ffmpeg -y -i green-bar-input.mp4 -aspect 16:9 \ -vf "crop=${target_width}:${target_height}:(in_w/2) - (${target_width}/2):(in_h/2) - (${target_height}/2), scale=-1:ih" \ output-cropped.mp4