![]() ![]() The pad filter is necessary to bring the output video to 1280×720, in case its aspect ratio or size differs from the target size. If it is smaller, it will not be upscaled. Here, the scale filter scales to 1280×720 if the input video is larger than that. For example, to fit a video into 1280×720, without upscaling (see this post for more info): ffmpeg -i input.mp4 -filter:v "scale='min(1280,iw)':min'(720,ih)':force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2" output.mp4 ![]() ![]() With newer ffmpeg versions, you can use the scale filter's force_original_aspect_ratio option. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |