使用 C# 存储和访问 mp3 文件
我正在开发一个网络应用程序,人们可以在其中传输各种声音。
我的目标是提供大量声音,我的问题是:存储 MP3 进行流式传输的最佳、最有效的方法是什么?
现在,我将它们全部存储在一个文件夹中,并以 Id 作为文件名。然后,我在数据库中有一个相应的行,用于存储所有声音数据,例如类别;声音类型之类的东西。因此,当有人想要流式传输文件时,我的应用程序会向数据库询问 Id,然后返回流的 URL。
这可以以更有效的方式完成吗?如果是这样,怎么办?
此致。
I'm doing a web application where people will be able to stream sounds of all sorts.
I'm aiming for a lot of sounds, and my question is this: what is the best, most efficient way of storing the MP3s for streaming?
Right now, I have them all stored in one folder with an Id as file name. I then have a corresponding row in the database that stores all the sound data, like category; type of sound and stuff like that. So when someone wants to stream a file, my application asks the database for the Id and then returns a URL for the stream.
Can this be done in a more efficient way? If so, how?
Best regards.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来你走的路是正确的。很多事情取决于您的客户端是什么(即浏览器或 WinForm)。
一些建议:
如果您有任何具体问题,将更容易回答。无论如何希望这对你有帮助。
Looks like you are going the right way. Lots of thing depends upon what your client is (i.e. browser or WinForm).
Some suggestions:
If you have any specific questions, it will be easier to answer. Anyways hope this helps you.