У меня есть несколько видео в формате MP4, и я пытаюсь извлечь из них аудио.public static void Converter(string toConvert)
{
toConvert = VideoFile + ".mp4";
var join = VideoFile.Split("-").ToList();
VideoFile = string.Format("{0} - {1}", join[0], join[1]);
var outputFile = VideoFile + ".mp3";
var mp3Out = "";
var ffmpegProcess = new Process
{
StartInfo =
{
UseShellExecute = false,
RedirectStandardInput = true,
RedirectStandardOutput = true,
RedirectStandardError = true,
CreateNoWindow = true,
FileName = Directory,
Arguments = " -i " + toConvert + " -vn -f mp3 -ab 320k output " + outputFile
}
};
ffmpegProcess.Start();
ffmpegProcess.StandardOutput.ReadToEnd();
mp3Out = ffmpegProcess.StandardError.ReadToEnd();
ffmpegProcess.WaitForExit();
if (!ffmpegProcess.HasExited)
{
ffmpegProcess.Kill();
}
Console.WriteLine(mp3Out);
}
< /code>
Однако я получаю это сообщение об ошибке: < /p>
System.componentModel.win32except>
Подробнее здесь: https://stackoverflow.com/questions/483 ... ng-c-sharp
Конвертировать видео MP4 Audio в mp3 с помощью c# ⇐ C#
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение