Vip*_*air 4 c# windows video ffmpeg image
I have a task of generating video from a sequence of images in my app and while searching for that i found out that FFMPEG is able to do that.Can anyone provide me any tutorial or link which can guide me in right direction.I am a newbiew in this so please help appropriately guys. Will appreciate any sort of help
我无法让上面的例子工作.但是我确实发现了另一个工作得非常好的库.尝试通过NuGet"accord.extensions.imaging.io",然后我写了下面的小函数:
private void makeAvi(string imageInputfolderName, string outVideoFileName, float fps = 12.0f, string imgSearchPattern = "*.png")
{ // reads all images in folder
VideoWriter w = new VideoWriter(outVideoFileName,
new Accord.Extensions.Size(480, 640), fps, true);
Accord.Extensions.Imaging.ImageDirectoryReader ir =
new ImageDirectoryReader(imageInputfolderName, imgSearchPattern);
while (ir.Position < ir.Length)
{
IImage i = ir.Read();
w.Write(i);
}
w.Close();
}
Run Code Online (Sandbox Code Playgroud)
它从文件夹中读取所有图像并从中制作视频.
如果你想让它更好,你可能会阅读图像尺寸而不是硬编码,但你明白了.
| 归档时间: |
|
| 查看次数: |
16161 次 |
| 最近记录: |