public void MakeLowQualityCompressedAudio_CreatesFile() { using (var file = TempFile.FromResource(Resources.tiny, ".wmv")) { var originalAudioPath = file.Path.Replace("wmv", "mp3"); FFmpegRunner.ExtractMp3Audio(file.Path, originalAudioPath, 1, new NullProgress()); var outputPath = originalAudioPath.Replace("mp3", "low.mp3"); FFmpegRunner.MakeLowQualityCompressedAudio(originalAudioPath, outputPath, new ConsoleProgress()); Assert.IsTrue(File.Exists(outputPath)); #if !MONO System.Diagnostics.Process.Start(outputPath); #endif } }
private string ShrinkAudio(string original, string newPathRoot) { Debug.WriteLine("ShrinkAudio " + original); var newPath = newPathRoot + ".mp3"; if (File.Exists(newPath)) { File.Delete(newPath); } var result = FFmpegRunner.MakeLowQualityCompressedAudio(original, newPath, _progress); CheckForError(result); return(newPath); }