上的ProcessStartInfo ffmpeg的C#asp.net帮助 [英] ffmpeg c# asp.net help on ProcessStartInfo

查看:302
本文介绍了上的ProcessStartInfo ffmpeg的C#asp.net帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了code使用的ffmpeg转换文件在c#asp.net。虽然执行它会显示错误的文件名,目录名或卷标语法不正确,但我的路径是正确的。那么如何解决这个?

I wrote the code to convert the file in c#asp.net using ffmpeg. While executing it shows error as "The filename, directory name, or volume label syntax is incorrect" but my paths are correct. So what is the solution for this?

ProcessStartInfo info = new ProcessStartInfo("e:\ffmpeg\bin\ffmpeg.exe", "-i cars1.flv -same_quant intermediate1.mpg");

process.Start();

我尝试的另一种方法,如下所示。但是,这也不会工作。

I tried another way as shown below. But that is also won't works.

ProcessStartInfo info = new ProcessStartInfo("ffmpeg.exe", "-i cars1.flv -same_quant intermediate1.mpg");

请帮我带样品code在C#中asp.net一个视频文件格式转换为另一种使用的ffmpeg。先谢谢了。

Please help me with sample code for converting one video file format to another using ffmpeg in c# asp.net. Thanks in advance.

推荐答案

反斜杠( \\ )被认为开始的转义序列的。以prevent这一点,无论是使用双反斜线( \\\\ )或preFIX字符串以 @

The backslashes (\) in your path are considered to start escape sequences. To prevent this, either use double backslashes (\\), or prefix the string with @.

ProcessStartInfo info = new ProcessStartInfo("e:\\ffmpeg\\bin\\ffmpeg.exe", 
                         "-i cars1.flv -same_quant intermediate1.mpg");

或者

ProcessStartInfo info = new ProcessStartInfo(@"e:\ffmpeg\bin\ffmpeg.exe", 
                         "-i cars1.flv -same_quant intermediate1.mpg");

这篇关于上的ProcessStartInfo ffmpeg的C#asp.net帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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