0
我如何提供用户名和密码给ffmpeg使其能够将数据写入FTP服务器中的某个文件夹? 该文件夹受密码保护,如果可能我不想删除该密码。所以,我可以简单地将密码传递给ffmpeg吗?或者还有其他解决方案吗? FFMPEG过程如何提供登录用户名和密码到ffmpeg?
例如从视频文件
string thumbpath, thumbname, videofile;
videofile = "Video Source path";
thumbpath = "thumbnail path";
thumbname = thumbpath + "20120910160600.mjpeg";
string thumbargs = "-i \"" + videofile + "\" -vframes 1 -s 60*30 -ss 00:00:00 -f image2 \"" + thumbname + "\"";
Process process = new Process();
process.StartInfo.FileName = Server.MapPath("~\\ffmpeg\\bin\\ffmpeg.exe");
process.StartInfo.Arguments = thumbargs;
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardInput = false;
process.StartInfo.RedirectStandardError = true;
process.StartInfo.CreateNoWindow = false;
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
新学, 请指引我创建缩略图....
ftp服务器是否与Web应用程序在同一台计算机上运行? 如果是这样,您将不得不在“thumbpath”上设置文件夹权限,以便ASP.NET进程对该文件夹具有写入权限。或者,您必须使用模拟才能以对该文件夹具有写入权限的用户身份运行ffmpeg进程。 – PHeiberg
你可以告诉我更多关于冒充吗?我发现我需要在web.config中添加一些东西。但是,我是否需要在ffmpeg中添加一些内容以使ffmpeg进程能够使用该模拟设置?或者只是修改web.config就够了。 – Lynx
看到我发布的答案 – PHeiberg