4

I have a file of resolution 3840x1632, but my TV stretches the picture vertically to fill up all 2160 pixels of height. Is it possible to use ffmpeg to add blank / black height, while preserving the video and audio quality?

Tried doing this, which seemed to work (took about 2 hours, the same length of the video), but greatly reduced the file size/video quality):

ffmpeg -i input.mkv -filter:v "pad=3840:2160:0:280" -c:a copy my_output_video.mkv

Is there a switch to say "keep everything else the same"?

Thank you!

1

You'll have to manually set encoding parameters.

ffmpeg -i input.mkv -filter:v "pad=3840:2160:0:280,setsar=1" -crf 18 -preset faster -c:a copy my_output_video.mkv

The CRF option sets the tradeoff for size/quality. Lower values produce better quality but larger files. The preset will increase speed, but for same quality, the file size will be larger.

The setsar filter has been added as a precaution in case your player reads the SAR stored in the file and stretches the video based on that value.

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.