如何在Azure WebApp上将mp3解码为WAV [英] How to decode mp3 to wav on Azure WebApp

查看:150
本文介绍了如何在Azure WebApp上将mp3解码为WAV的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我的asp.net mvc5应用程序在Azure上运行时,使用NAudio将mp3解码为wav(或字节数组或pcm流)时,我遇到了问题.在本地IIS上,它可以正常工作.但是在Azure上,调用Mp3FileReader时出现"System.Runtime.InteropServices.COMException". 我认为这可能是缺少编解码器的原因.我怎么解决这个问题?有没有办法做参考或什么? 预先感谢!

I have a problem with decoding mp3 to wav (or byte array, or pcm stream) using NAudio when my asp.net mvc5 application running on Azure. On the local IIS it works properly. But on the Azure I'm getting "System.Runtime.InteropServices.COMException" when calling Mp3FileReader. I think it may be cause of missing codecs. How can I solve this problem? Is there a way to make a reference or something? Thanks in advance!

推荐答案

我在沙盒点上第二个小敏.在App Service中,COM访问被阻止.

I second Xiaomin on the sandbox point. COM access is blocked in App Service.

话虽这么说,ffmpeg正常工作.流程从您的C#调用它.

That being said, ffmpeg works just fine. Process invoke it from your C#.

ffmpeg:: https://ffmpeg.org/download.html
ffmpeg的C#包装器的讨论在这里: 用于C#/.NET的纯FFmpeg包装器

ffmpeg: https://ffmpeg.org/download.html
A discussion on C# wrappers for ffmpeg here: Solid FFmpeg wrapper for C#/.NET

这篇关于如何在Azure WebApp上将mp3解码为WAV的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆