将非 PCM WAV 文件流式传输到 SilverLight 应用程序
我希望允许用户将存储在服务器上的录制的 WAV 文件播放回 Silverlight 应用程序作为客户端来播放它们。 我看到有一种方法可以在 Silverlight 上播放 WAV 文件(此处),但是当我尝试实现它时,播放文件时出错,因为它不是 PCM 格式而是编码的。
我尝试播放的文件是用特殊的编码器编码的,所以我认为唯一的方法是在服务器上解码 WAV 文件并将其流回客户端。限制是解码过程应该实时发生,因为转换所有存在的 WAV 文件是不合理的。
有可能做到吗?我可以使用哪个流媒体? (Windows Media Service 可以在这里提供帮助吗?)有人有这样的场景的经验吗?
感谢您的帮助。
I would like to allow users to play recorded WAV files that stored on a server back to a Silverlight application as a client to play them.
I saw that there is a way to play a WAV file on Silverlight (here), but when i tried to impliment it, i got an error playing the file because it is not in PCM format but encoded.
The files that i'm trying to play are encoded with a special encoder, so i thought that the only way is to decode the WAV file on the server and stream it back to the client. The limitation is that the decode process should occur in real time because it is not reasonable to convert all the WAV files that exists.
Is it possible to do it? Which streamer can i use? (Windows Media Service can help here?) Does somebody has any experience with such a scenario?
Appreciate your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
此示例 http://alvas.net/alvas.audio,tips.aspx#tip24< /a> “..通过网页将保存的 Wav 文件转换为 MP3..” 转换为 PCM 更加容易。您只需将 AudioCompressionManager.MpegLayer3FormatTag 替换为 AudioCompressionManager.PcmFormatTag
This example http://alvas.net/alvas.audio,tips.aspx#tip24 "..way via a web page to convert a saved Wav file to MP3.." Converting to PCM even easier. You just need replace AudioCompressionManager.MpegLayer3FormatTag to AudioCompressionManager.PcmFormatTag
您最好以 MP3 形式进行流式传输,因为 PCM WAV 的效率非常低。您应该查看 Sox,它很可能能够即时执行您所需的转换。
you would be best off streaming as MP3 since PCM WAV is very inefficient. You should check out Sox, which may well be able to perform the conversion you require on the fly.