FFmpeg has an extremely effective level filtration system, which usually can be used to completed the various tasks. A lot of them are listed here. You more can be found in the FFmpeg official documentation. In all the following examples, the particular starting image (input. jpg) is going to be this (535x346 pixels):
In order to basically resize your current video to your specific size (e.g 320x240), you should use the scale filter in its most basic form:
Usually, if you resize any video/image to fixed height and width, then the output image may be starched or appears starched.
For getting the perfection in the resized image we need to specify only one component, either width or height, and set the other component to -1. For example, see below command line:
ffmpeg -i input.jpg -vf scale=320:-1 output_320.png <!-- aspect ratio according width -->
Likewise if you want to resize your video/image in aspect ratio of height, you can use following command.
ffmpeg -i input.jpg -vf scale=-1:-240 output_240.png <!-- aspect ratio according height -->
Here are few useful commands which can be used instead of number, to specify height and width of the getting output image.
A simple example: If you want image width just double from its actual width, you can use the below command for the same: