[英]How to resize an image with ffmpeg
I have not used ffmpeg before, this is my first time. 我以前没有使用过ffmpeg,这是我第一次。 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? 所以我的问题是,我可以在参数的哪个位置指定输出图像的大小?
根据本指南 ,您只需要提供-vf
选项并提供所需的值,例如-vf scale=320:240
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.