Convert to wave file gives COMException
Hello! I have rest API using ASP.NET Core app .net 7 and I'm trying to convert a WebM file into a wav file in runtime,
I'm using NAudio and this code :
using (var reader = new MediaFoundationReader(WebMFilePath))
{
WaveFileWriter.CreateWaveFile(WaveFilePath, reader);
}
This works perfectly locally. But when I deploy and run it gives me this exception:
"error": { "message": "The data specified for the media type is invalid, inconsistent, or not supported by this object. (0xC00D36B4)", "exception": "COMException" }
I have no clue on what to do with it or how to move forward.
Any help is appreciated
I'm using NAudio and this code :
using (var reader = new MediaFoundationReader(WebMFilePath))
{
WaveFileWriter.CreateWaveFile(WaveFilePath, reader);
}
This works perfectly locally. But when I deploy and run it gives me this exception:
"error": { "message": "The data specified for the media type is invalid, inconsistent, or not supported by this object. (0xC00D36B4)", "exception": "COMException" }
I have no clue on what to do with it or how to move forward.
Any help is appreciated