将音频文件流式传输给网站用户/听众的最佳方式是什么 [英] What is the best way to stream a audio file to website users/listeners

查看:33
本文介绍了将音频文件流式传输给网站用户/听众的最佳方式是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个音乐网站,它将存储在服务器中的音频文件流式传输给用户,音频文件将通过放置在网页中的 Flash 播放器播放..

I'm developing a music site which will stream audio files stored in a server to users, audio files will be played through flash player placed in a webpage..

  1. 我听说我需要使用流媒体服务器来流式传输音频文件(例如 2mb 到 3mb).我需要使用一个吗?

  1. As I heard I need to use a streaming media server for streaming audio files ( like 2mb to 3mb in size).. Do I need to use one?

我发现了一些流媒体服务器软件,例如 http://www.icecast.org - 但在他们的文档中,它被使用用于流式广播电台和实时流式传输目的,但我只需要以更快的速度和低尺寸(低带宽)以高质量流式传输音频文件..

I found some streaming media server softwares like http://www.icecast.org - but as in their documentation, It is used for streaming radio stations and live streaming purposes, but I just need to stream audio files faster and in low size (low bandwidth) with good quality..

我听说我需要先对音频文件进行编码,然后将它们发送给听众,最后需要再次对音频文件进行解码.真的吗?我怎样才能做到这一点?如果我需要使用特殊的网络服务器,我应该在哪里托管我的文件?有没有好的托管服务提供商?

I heard I need to encode the audio files first and then send them to listeners and in their end audio files need to be decoded again. Is that true? How can I do that? if I need to use a special web server, where should I host my files? Any good hosting providers?

如果我在普通的网络服务器中托管音频文件,他们将使用 HTTP 或 TCP 将我的音频文件传送给用户/收听者,但我发现 HTTP 和 TCP 不是用于多媒体目的的好方法,例如流式音频和视频文件,它们用于传输 HTML 和其他东西.我发现我应该使用 RSTP 或 UDP 来传输音频文件.我应该使用什么?

if I host audio files in a normal web server, they will use HTTP or TCP to deliver my audio files to users/ listners but I found that HTTP and TCP are not good ways to use for multi media purposes like streaming audio and video files, and they are used for delivering HTML and stuff. I found I should use RSTP or UDP for streaming audio files.. What should I use?

我知道 .MP3 文件的质量比其他格式好得多,但它也为音频文件提供了巨大的尺寸.我应该为音频文件使用哪种格式?

I know that .MP3 files has much better quality than the other formats but it also gives huge size to the audio files.. which format should I use for audio files?

大多数质量最好的音频文件都超过 7mb,所以我打算使用软件自行转换它们,这样我就可以获得质量较低的小文件.如果我要转换我的音频文件,我应该为我的文件使用什么好的 BITRATE?

Most of the best quality audio files are more than 7mb so I'm planning to convert them my self using a software so I could get low size files with some level of good quality. If I'm converting my audio files what is the good BITRATE I should use for my files?

任何已知的最好的音频文件转换软件,同时保持质量处于良好水平吗?

Any known best softwares for converting audio files while keeping quality in a good level?

注意** - 我知道在网站开始时我不需要复杂的要求,但我想知道他们在 soundcloud.com 上使用的最佳方式

Note** - I know that I will not need complex requirements at the beginning of the site but I want to know the best ways like they are using for soundcloud.com

推荐答案

这里是一位音频技术员和网页设计师的回复,他实际上经营着一个喊叫广播电台.以下是收集的知识来自超过 5000 小时的最新研究!

Here´s a reply from someone who actually runs a shoutcast radio station, is an audio-technician and web-designer. Below is knowledge gathered from over 5000 hours of up-to-date research !

6)

  • 音频软件?

您需要拥有能够:

  • 转换为其他比特率和格式
  • 将所有 mp3 的音量标准化为相同的标准化"级别.(-1 分贝)
  • 在开始和/或结束时切断沉默.
  • 均衡音频,使其听起来不错.
  • 添加效果、混合...等

最好、最常用、非常可靠且免费的是Audacity"

Best,most-used, very solid and FREE is "Audacity"

5)

  • 良好的比特率?

如果比特率过高,您的听众在较慢的连接上将遭受bufferunderuns"即:音频中的故障/短暂中断导致它们的连接跟不上(至高速)速度.

If the bitrate is to high your listeners on slower connections wil suffer from "bufferunderuns" ie: hickups / short breaks in the audio cause their connection cant keep up with the (to high) speed.

如果它太低,那么质量就不好.

If its to low then the quality is no good.

最好的选择是 128 kb/s,这听起来不错,而且不会造成大多数情况下的欠载.

Best choice is 128 kb/s it sounds good and wont cause underruns for most.

最好的格式是 Mp3,因为它是大多数播放器和直播提供商都可以处理的格式.

Best format is Mp3 since its the format that can be handled by most players and shoutcast-providers.

使用高于平均文件大小的 4 分钟曲目将约为 4 Mb.

Using above your average filesize for a 4 Min track will be around 4 Mb.

由于 Mp3 @ 128kb/s 是最受欢迎的,您将获得最优惠的价格/质量交易来自广播服务器提供商.

Since Mp3 @ 128kb/s is the most popular you will get the best price/quality-deal from a shoutcast server provider .

5b)

  • 音频标记?

你确实忘记了那个.

您需要确保您的音频文件被标记",即:显示在作为艺术家 - 标题"信息的玩家不是从文件名中获取的......而是从(iD1/iD3)标签"中获取

You need to make sure to have your audio-files "Tagged" ie: what is displayed in the players as "Artist - Title" information is not taken from the filename..but instead from the (iD1/iD3) "Tag"

最好的、最常用的、非常可靠的免费软件是:mp3tag"它也可以批量处理"(一次 1000 mp3)

Best, most used, very solid and FREE software is: "mp3tag" it can do "Bulk" also (a 1000 mp3´s at once)

http://www.mp3tag.de/en/

4)

  • 编解码器?

您以上述Mp3 @ 128 kb/s"格式将文件上传到服务器因为它是所有玩家都可以玩的最常用的格式.

You upload your files to a server in the format described above "Mp3 @ 128 kb/s" since its the most used format all players can play it.

确保以与服务器输出相同的格式(上图)上传这将在您的服务器上保持(重要的)低处理器负载(它不需要转换).

Make sure you upload in the same format (above) as the output of the server this will keep a (important) low processor-load on your server (it wont need to convert).

Shoutcast-server(或其他流服务器)将获取您单独的 mp3 并转换它们到一个实时流中,它将为多个侦听器(100 个)创建多个流.它还会为您提供统计数据(听众数量、来自哪里、现在正在播放、以前播放过)

A Shoutcast-server (or other streamserver) will take take your separate mp3´s and convert them into one single realtime stream, it will create multiple streams to multiple listeners (100´s). It will also provide you with statistics (nr of listeners,from where,now playing,played before)

听众可以通过两种方式播放:

A listener can play it 2 ways:

a-来自嵌入您网站的嵌入式播放器.b-或者通过单击您网站上的链接,这将在任何(独立)播放器中打开您的流您的访客已安装(Winamp、WindowsMediaPlayer、Realplayer、Quicktime、iTunes...等)独立的将提供最佳质量,因为它将具有更多/更好的音频控制(均衡器...等)

a-From a embedded player embedded on your website. b-Or by clicking a link on your websit which will open your stream in any (standalone) player your visitor has installed ( Winamp, WindowsMediaPlayer, Realplayer, Quicktime, iTunes...etc) A standalone will give best quality because it will have more/better audiocontrols (equalizer...etc)

最佳做法是同时提供嵌入式播放器和简单的可点击链接.查看至少 20 个广播电台网站(专业和业余爱好者)看看他们是怎么做的.

Best practice is to offer BOTH a embedded player and a simple clickable link. check out at least 20 radio-station-websites (both professional and amateurs) to see how they do it.

目前最好的免费嵌入式播放器是jPlayer"因为它的双模式(HTML5/Flash)所以所有浏览器和所有移动设备都会播放它.并且它得到了论坛、教程...等的很好的支持

Best , and free embedded-player right now is "jPlayer" because its dual-mode (HTML5 / Flash) so ALL BROWSERS and ALL MOBILES will play it. and its very well supported with a forum,tutorials...etc

http://www.jplayer.org

2)

  • 托管服务提供商?

Google 的Shoutcast 流媒体"或Shoutcast 服务器"比较其中 20 个的最佳价格/质量...使用 Google 再次研究它们.

Google for "Shoutcast streaming" or "Shoutcast server" compare 20 of them for best price / quality...research them again using Google.

他们将拥有特殊的直播软件(基于网络),例如Centova"你可以从任何浏览器控制它,你可以直播到它......或者创建播放列表,在你睡觉时从服务器无人看管(autodj")您可以创建多个播放列表,以便它们在特定时间/天/随机...等播放.

They will have special shoutcast software (webbased) such as "Centova" you control it from any browser, you can stream live to it...or create playlists that play unattended from the server while you sleep ("autodj") You can create multiple playlists such that they will play at certain times/days/random...etc.

您只能根据 autodj 播放列表创建整个电台这样您就不必担心自己的上传连接中断你可以关闭自己的电脑.

You could create your whole station based on autodj playlists only like that you will not have to worry about your own upload-connection interrupting and you can shutoff your own pc.

对于 autodj,您需要至少 5 Gb 存储空间(mp3)的喊话服务这将为您提供大约 3 到 4 天的音乐而不会重复......以巧妙的方式使用播放列表并考虑到听众在某些时间平均会听 30 分钟到 2 小时,..您可以确保他们不会一直听到相同的曲目.

For autodj you want a shoutcast service with at least 5 Gb storage (mp3´s) that will give you around 3 to 4 days music without repeats...using the playlists in a clever way and taking into account that listeners will on average listen between 30 mins and 2 hours at certain times,..you can make sure that they will not hear the same tracks all the time.

如果您坚持从自己的计算机(直接或通过流服务器提供商)进行实时"(实时)广播(流媒体),那么最常用的软件是Sam broadcaster"

If you insist to do "live" (realtime) broadcast (streaming) from your OWN computer (directly or via a stream-server-provider then most used software is "Sam broadcaster"

就是这样......从一个好的 Shoutcast 服务器提供商开始,然后建立你的网站并创建一个可点击的流媒体链接,然后你做嵌入式播放器.

That is it...start with a good Shoutcast server provider, then built your website and create a clickable link to the stream, after that you do the embedded player.

这篇关于将音频文件流式传输给网站用户/听众的最佳方式是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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