Add padding with ffmpeg to videos increases file size, why?
I need to add padding to mp4 video files (since tv changes aspect ratio on playback) and I simply can do this with -pad option of ffmpeg.
The output is ok for me, but I see that most of the video files increase about 25%-30% in file size.
ffmpeg -i in.mp4 -preset slow -vf “pad=1920:1080:(1920-iwmin(1920/iw,1080/ih))/2:(1080-ihmin(1920/iw,1080/ih))/2″ -c:v h264 -c:a copy out_fhd.mp4″
Is there a way to preserve the input quality and have the same file size? As the black bars contain no information I had the expectation that there is a lossless mode to take the already H264 encoded stream and just add blocks with black pixels.
Read more here: Source link
