user7254499
user7254499

Reputation:

How to resize an image with ffmpeg

I have not used ffmpeg before, this is my first time. It is creating image thumbnails but the images are way too big so I just need to scale them down. I have an argument that is creating a thumbnail here:

processInfo.FileName = "\"" +HttpContext.Current.Server.MapPath("/ffmpeg.exe") + "\"";
processInfo.Arguments = string.Format("-ss {0} -i {1} -f image2 -vframes 1 -y {2}", 5, "\"" + HttpContext.Current.Server.MapPath(file) + "\"", "\"" + HttpContext.Current.Server.MapPath(newfilename) + "\"");

So my question is, where inside of the argument can I specify the output image size?

Upvotes: 0

Views: 3877

Answers (1)

Peter Szekeli
Peter Szekeli

Reputation: 2800

According to this guide, you only need to supply -vf option with your desired values, e.g. -vf scale=320:240

Upvotes: 1

Related Questions