Closed Johndirr closed 5 years ago
How would I be able to force the application to use FFmpeg instead of NAudio?
// Use FFmpeg for file reading/decoding AudioStreamFactory.AddFactory(new FFmpegAudioStreamFactory());
This seems to not to work at all.
One FFmpegAudioStreamFactory gets added but later on when loading the audiotrack with
AudioTrack audioTrack = new AudioTrack(new FileInfo(fileName));
are we not moving over the added factory instead of using it? AudioStreamFactory.cs:
private static IAudioStream TryOpenSourceStream(FileInfo fileInfo) {
if (factories.Count == 0)
{
throw new NotSupportedException("Cannot open file " + fileInfo.FullName);
}
var factoryEnumerator = factories.GetEnumerator();
factoryEnumerator.MoveNext()
...
Cannot reproduce. When I start Aurio.Test.FingerprintingHaitsmaKalker2002
and click Scan files
I can select video files (e.g. mp4 or mkv) and they are processed as expected.
I don't know why but when I ran the same application today it worked. Sorry for the confusion.
When no wav or mp3 files are used in the sample application "Aurio.Test.FingerprintingHaitsmaKalker2002" there will be an exception: "System.NotSupportedException: 'Cannot open file with NAudio'" in NAudioStreamFactory.cs
Looks like FFmpegAudioStreamFactory is not used at all.