[FFmpeg-user] Remove black border on both up/down and left/bottom

Mark Filipak markfilipak.imdb at gmail.com
Fri May 23 03:53:54 EEST 2025


On 22/05/2025 20.18, Richard Bartczak via ffmpeg-user wrote:
> ffmpeg -i "1492-Die Eroberung  des  Paradieses.ts" -crf 0 -vf scale=720x576,setsar=64/45,setdar=16/9 
> -c:a copy out.ts               => bad quality, but speedx >= 8

-vf scale=720x576,setsar=64/45,setdar=16/9
You are causing the video steam to be decoded. You are then scaling the pictures to 720x576 -- Why? 
You are then forcing SAR and DAR before sending the pictures to the encoder. Since you don't specify 
an encoder, the encoder is probably defaulting to MPEG2.

-crf 0
I've never used this bitstream function. Constant frame rate? Yes, it probably is CFR, but why do 
you think you need to force it? Leave that out.

** Oh, sorry. '-crf' is not constant frame rate.
Documentation says, "Set the quality/size tradeoff for constant-quality (no bitrate target) and 
constrained-quality (with maximum bitrate target) modes. Valid range is 0 to 63, higher numbers 
indicating lower quality and smaller output size. Only used if set; by default only the bitrate 
target is used."
That's too vague for me to figure out what it does.

Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, bt470bg, top 
first), *720x576 [SAR 16:15 DAR 4:3]*, 25 fps, 25 tbr, 90k tbn

Your video is 768x576 -- seems like standard PAL to me. That should play fine without doing 
anything. If you are getting black bars all around on play, I'd say your player is not scaling it to 
1440x1080. It it was scaling it properly, it should also add black bars on the sides, only, to bring 
it to 1920x1080 display.


More information about the ffmpeg-user mailing list