How to show video in middle and add padding around?
Original video dimension 720x402
ffplay -vf "scale=640:240,pad=1280:480:(ow-iw)/2:(oh-ih)/2:color=red" Example2.mp4
640x240 is (to be scaled) video width x height
1280x480 is padding
1280 = (1280-640)=640 padding we are adding in width, (ow-iw)/2 is a position, its mean, its in center.
same for 480,
480=(480-240)=240 padding we are adding in height, (oh-ih)/2 is a position, its mean, its in center
color=red is a background color, it can be in RRGGBB format e.g 0xff0000