Reputation: 11
I have a requirement to get the length in seconds from an audio file. All I am given is the URL of the file. I have tried with the NAudio library but when I try using a URL as source I get the error-
The given path's format is not supported
Below is the code-
Mp3FileReader reader = new Mp3FileReader(RecordingURL);
Result = reader.TotalTime
Upvotes: 1
Views: 631
Reputation: 49522
Mp3FileReader
cannot open files from a URL, but MediaFoundationReader
can, so you should try that instead.
Upvotes: 1