Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/278.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何从上传的MP4视频中提取图像-FFMPEG_C#_Asp.net_Video_Ffmpeg - Fatal编程技术网

C# 如何从上传的MP4视频中提取图像-FFMPEG

C# 如何从上传的MP4视频中提取图像-FFMPEG,c#,asp.net,video,ffmpeg,C#,Asp.net,Video,Ffmpeg,我正在为我的公司建立一个培训网站,我们需要从上传的每个mp4视频中提取一个图像。我搜索了很多,决定试试FFMPEG 这是我到目前为止所拥有的。我没有收到错误,但指定文件夹中没有图像 任何帮助都将不胜感激 字符串inputfile=Server.MapPath(“/Report/TrainingLibrary/Material/Videos/RMSIMAILSignature.mp4”); //不带文本的字符串; 字符串路径; 字符串拇指名称; 字符串拇指参数; //弦指; thumbpath=

我正在为我的公司建立一个培训网站,我们需要从上传的每个mp4视频中提取一个图像。我搜索了很多,决定试试FFMPEG

这是我到目前为止所拥有的。我没有收到错误,但指定文件夹中没有图像

任何帮助都将不胜感激


字符串inputfile=Server.MapPath(“/Report/TrainingLibrary/Material/Videos/RMSIMAILSignature.mp4”);
//不带文本的字符串;
字符串路径;
字符串拇指名称;
字符串拇指参数;
//弦指;
thumbpath=AppDomain.CurrentDomain.BaseDirectory+“报告\\培训库\\材料\\视频\\”;
thumbname=thumbpath+“图像”+“%d”+“.jpg”;
thumbargs=“-i”+inputfile+”-vframes 1-ss 00:00:07-s 150x150”+thumbname;
进程thumbproc=新进程();
thumbproc=新进程();
thumbproc.StartInfo.FileName=“C:\\FFMPEG\\Bin\\FFMPEG.exe”;
thumbproc.StartInfo.Arguments=thumbargs;
thumbproc.StartInfo.UseShellExecute=false;
thumbproc.StartInfo.CreateNoWindow=false;
thumbproc.StartInfo.RedirectStandardOutput=false;
尝试
{
thumbproc.Start();
}
捕获(例外情况除外)
{
响应。写入(例如消息);
}
thumbproc.WaitForExit();

thumbproc.Close()

您看到了吗:如果您通过命令行手动运行
ffmpeg
,它会工作吗?如果是,那么问题在于您的脚本。