Use ffmpeg to resize the image.

Can I resize an image using FFMPEG?

I still have this:

ffmpeg. -i 1.jpg -vf scale=360:240 > 2.jpg 

I get an error: "At least one output file must be specified"

Is it possible?

+7
image-processing ffmpeg
source share
2 answers

You can try the following:

 ffmpeg -i input.jpg -vf scale=320:240 output_320x240.png 

I got it from the source

+17
source share

If you want to maintain an aspect ration, you can do -

 ./ffmpeg -i 1.jpg -vf scale="360:-1" 2.jpg 

or if you want to resize based on the width and height of the input. For example. let's say half the width and height of the input you can do -

 ./ffmpeg -i 1.jpg -vf scale="iw/1:ih/2" 2.jpg 

Where

 iw : input width ih : input height 
+1
source share

All Articles