- 博客(0)
- 资源 (3)
- 收藏
- 关注
ffmpeg.exe文件
代码如下:
string ffmpgefilePaht = AppDomain.CurrentDomain.BaseDirectory + "ffmpeg.exe";
ProcessStartInfo startInfo = new ProcessStartInfo
{
FileName = ffmpgefilePaht,
Arguments = " -y -i " + filePath + ".wav " + filePath + ".mp3",
WindowStyle = ProcessWindowStyle.Hidden,
UseShellExecute = false,
CreateNoWindow = true,
RedirectStandardInput = true,
RedirectStandardOutput = true,
RedirectStandardError = true
};
Process process = new Process { StartInfo = startInfo };
try
{
process.Start();
process.WaitForExit();
File.Delete(filePath + ".wav ");
return true;
}
catch (Exception ex)
{
return false;
}
finally
{
process.Close();
}
2015-06-18
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人