It is possible to convert all audio to mp3?
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = @"""C:\ffmpeg\bin\ffmpeg.exe""";
proc.StartInfo.Arguments = "-i C:\\Matheus\\Matheus_Project\\Matheus_Project\\App_Data\\" + User.Identity.Name + "\\" + fileNameAndType + " -acodec libmp3lame -ab 128k C:\\Matheus\\Matheus_Project\\Matheus_Project\\App_Data\\" + User.Identity.Name + "\\" + fileName + ".mp3"; /* use /y to overwrite if there it exists already or will fail */
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.CreateNoWindow = false;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.RedirectStandardError = true;
proc.Start();
var output = proc.StandardOutput.ReadToEnd();
string output_error = proc.StandardError.ReadToEnd();
proc.WaitForExit();
proc.Close();
Example:
audio/x-m4a to mp3
audio/mp4 to mp3
audio/basic to mp3
audio/L24 to mp3
audio/mid to mp3
audio/x-aiff to mp3
audio/x-mpegurl to mp3
audio/vnd.rn-realaudio to mp3
audio/ogg to mp3
audio/vorbis to mp3
audio/vnd.wav to mp3
Any idea ?