

This specifies the output file where ffmpeg will place the results. So black bars will be added to the sides to make up the difference. In the case of your input, we know that the scale filter scaled the height to 720, but the width is short of 1280. The pad filter will fill the output image with black anywhere that the input image doesn't cover. The parameters tell the pad filter to make the output 720x1280 and to place the input image in the center of the frame. You don't need to change anything to make it work. So it will figure out the exact numbers for you. It has the same math/substitution features as the scale feature. In your case, since your input video is 4x3, we know that the math will work out to scale to a height of 720 but a width that is less than 1280. You don't need to make any modifications to the scale parameters because it will automatically substitute the actual values for "iw", "sar" and "ih". It will scale the input image to fit the width and/or height of the desired output format without distorting the image. In this case, the math computes the new scaled width and height. The scale filter is powerful because it can perform value substitution and math.

The video filters that are specified are applied sequentially to each frame. Specifies that some video filters follow in the command. Replace "input.mp4" with the name of your input file. This is the standard input method for ffmpeg.


Let me break down this command for you: ffmpeg -i input.mp4
