G33K-TRICKS: How to change the resolution of videos or images : Quick and easy steps

Saturday, April 16, 2016

How to change the resolution of videos or images : Quick and easy steps


Change the Image and Video Resolution using FFMPEG Tool



Changing the video resolution can also be termed as Scaling the Video / Resizing the Video.
How to change the video resolution
Image Resizing

One of the easiest way for manipulating the videos is to use FFMPEG tool.
FFMPEG is a free software that can produce libraries and programs for handling multimedia input. It can decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.


You can download ffmpeg tool from here based on your OS

FFMPEG uses the libswscale library to scale the input video.
[The scale filter forces the output display aspect ratio to be the same of the input, by changing the output sample aspect ratio.
If the input image format is different from the format requested by the next filter, the scale filter will convert the input to the requested format.]

For all the options available with FFMPEG scaling you can see
http://ffmpeg.org/ffmpeg-filters.html#toc-Options-1


Examples:

ffmpeg -i input_file.avi -vf scale=320:240 output_file.avi


With the above command the aspect ratio will also change. If you want to keep the aspect ratio same after changing the video resolution you have to specify only one component, either width or height. And have to set the other component to -1.

Example:
ffmpeg -i input_file.jpg -vf scale=320:-1 output_file_320.png

The above commands will work with Image files as well.
You can change the image resolution using the ffmpeg tool too.

You may also like visit few other pages:
http://g33ktricks.blogspot.com/2016/03/how-to-disable-microsoft-onedrive.html
http://g33ktricks.blogspot.com/2016/03/hack-web-sites-using-hexjector.html
http://g33ktricks.blogspot.com/2016/03/how-to-view-cams-for-free-all-over-world.html