Is it possible to resize an image using FFMPEG?
I have this so far:
ffmpeg. -i 1.jpg -vf scale=360:240 > 2.jpg
I get the error messa
To reduce image scale to the bounding box of width:320px and height:240px.
ffmpeg -i src_image_path -vf 'scale=if(gte(a\,320/240)\,min(320\,iw)\,-2):if(gte(a\,320/240)\,-2\,min(240\,ih))' dst_image_path
a: aspect ratio
iw: in width
ih: in height
If the src image size is in the bounding box do no resize on it. If image has a big aspect ration than 320/240 and width is bigger then 320, resize width to 320 and keep the aspect ration. If image has a small aspect ration than 320/240 and height is bigger then 240, resize height to 240 and keep the aspect ration.