如何将AVI文件转换为JPG格式的图像阵列使用.NET [英] how to convert avi file to an jpg's images array using .net
问题描述
如何将AVI文件转换为使用.NET的JPG格式的图像阵列,我需要开发将采取avi文件并将其保存为JPG图片上的另一个文件夹
how to convert avi file to an jpg's images array using .net , i need to develop a task that will take the avi file and save it as jpg images on another folder
推荐答案
您可以从 ffmpeg的命令行执行此操作。请参见文档的这部分。例如,
You can do this from the command line with ffmpeg. See this part of the documentation. For example,
ffmpeg -i infile.avi -f image2 image-%03d.jpg
将节省从 infile.avi
为JPEG文件编号(图像-001的所有帧。 JPG格式,图像002.JPG,...)。然后,您可以使用其他的命令行选项来获得你想要的框架或做一些其他的后处理类似调整或隔行扫描。
will save all frames from infile.avi
as numbered jpegs (image-001.jpg, image-002.jpg,...). You can then use other command line options to get just the frames you want or do some other post processing like resizing or deinterlacing.
您可以只在.NET中创建一个程序调用与正确的命令行FFmpeg的可执行文件和生成的文件移动到正确的位置。这将是比试图直接使用一些视频库容易得多。
You could just create a program in .NET that calls the ffmpeg executable with the right command line and moves the resulting files into the correct place. It would be much easier than trying to use some video library directly.
这篇关于如何将AVI文件转换为JPG格式的图像阵列使用.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!