如何在C#中将视频拆分为帧? [英] how to split videos into frames in c#?

查看:518
本文介绍了如何在C#中将视频拆分为帧?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用此代码使用c#将视频拆分为帧.此错误将在win32异常处理后出现指定的填充路径不是&并拒绝访问..
请纠正..还有一件事是提供任何代码将视频转换为图像,我知道它在google bt中我无法获得正确的东西可理解和可用的代码..

i used this code for split videos into frame using c#.this error will come win32 exception handled A specified fill path is not & and access is denied..
Kindly rectify that.. And one more thing provide any code to convert videos into images i know its in google bt i cannot get the right thing understandable and usable code..

string inputpath = "C:\\Users\\Public\\Videos\\Sample Videos\\Wildlife.wmv";
            string outputpath = "D:\\Anand";
            string fileargs = "-i" + " " + inputpath + " " + outputpath + "image.jpg";
            System.Diagnostics.Process p = new System.Diagnostics.Process();
            p.StartInfo.FileName = "D:\\Anand\\Image processing Project\\ImageProcessing-source-code\\ImageProcessing\\NewFolder1";
            p.StartInfo.Arguments = fileargs;
            p.StartInfo.UseShellExecute = false;
            p.StartInfo.CreateNoWindow = true;
            p.StartInfo.RedirectStandardOutput = true;
            p.Start();

推荐答案

我见过的最好的工具是FFMpeg(或Libav).您可以通过一个单独的过程启动应用程序并获取框架,这是一件微不足道的事情,或者将.NET包装器用于开源库.请查看我过去的答案:如何在C#中将图像转换为视频 [
The best tool I ever saw is FFMpeg (or Libav). You can launch the application is a separate process and get frames, which is quite a trivial thing, or use the .NET wrapper for the open-source library. Please see my past answer: how to convert image to video in C#[^].

—SA


这篇关于如何在C#中将视频拆分为帧?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆