Add border to video, maintaing aspect ratio, and insert subtitles in the border I have an MKV wrapped 1920x800 video and a sidecar .srt subtitle file. I want to convert the video to 1920 x 1080 and add black border on top and bottom while keeping the original aspect ratio. I also want to insert the subtitles on the black border.

I have an idea on how to insert the subtitles, but I'm not sure how to add the border. I'd appreciate any suggestions on how to do this all in one pass so that I lose at little quality as possible.
You can use FFmpeg, a free command line tool to do this:

ffmpeg -i input.mkv -vf pad=1920:1080:0:140,subtitles=filename.srt -crf 20 -c:a copy out.mkv


The subtitles filter accepts ASS styling parameters, such as font size and margins.