网络(非?)流媒体音频解决方案?

发布于 2024-07-11 18:27:03 字数 491 浏览 2 评论 0原文

我想将多个音频嵌入到我的网站中。 我希望加载文件但在用户点击按钮之前不播放文件。 我还希望能够像 YouTube 一样跳转到尚未加载的地方。 如果我可以播放 ogg、aac、mp4 等,那就太好了,但我不希望这是可能的,所以我不介意用 ffmpeg(或其他任何东西)转换另一个版本

。我可以用什么来拥有这个像 YouTube 一样的音频播放器?

-编辑-抱歉大家,我不在,没有及时选择最佳答案。 我发现 网络(非?)流媒体音频解决方案? 是 sorin 的最佳选择紧随网络(非?)流媒体音频解决方案?

I want to embed multiple audio to my site. I want the file to load but not play until the user hits the button. I also want the ablity to jump to places not yet loaded like youtube does. It would be great if i can play ogg, aac, mp4, etc but i dont expect that would be possible so I wouldnt mind having another version converted by ffmpeg (or anything else)

What can i use to have this youtube like audio player?

-edit- sorry guys i was away and didnt select the best answer in time. I find web (non?)streaming audio solutions? is the best with sorin following closely behind web (non?)streaming audio solutions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

梦与时光遇 2024-07-18 18:27:03

我不明白你为什么不想流媒体? 因为这正是我在这里推荐的。 请注意,流媒体并不一定意味着像 Windows Media、QuickTime 或 Real Player 那样又大又丑的嵌入式播放器。

我建议使用 MP3 音频和 Flash,使用免费的 JW FLV 媒体播放器 它应该做你想做的一切,除了“低/高质量”的事情,但如果你需要的话,也许你可以只使用两个播放器。

I don't understand why you do not want streaming? Because that is exactly what I would recommend here. Note that streaming does not neccessarily mean a big, ugly, embedded player a la Windows Media, QuickTime or Real Player.

I would recommend using MP3 Audio and Flash, using the free JW FLV Media Player which should do everything that you want, except for the "low/high quality" thing, but maybe you can just use two players if you need.

情栀口红 2024-07-18 18:27:03

我会赞同迈克尔的建议,但稍作修改:

您可以使用开源 Flash 播放器(例如 XSPF Flash 播放器)并对其进行破解,使其在您开始播放之前就开始加载声音。 这样,在一段时间后(这取决于客户端和服务器之间的连接),您可以在客户端获得所有声音。

您可能还想看看 Soundmanager v2,它提供了与 Javascript 的紧密集成,无需额外的技巧。

I would second Michael's suggestion with a small modification:

You could use an open-source flash player (like the XSPF Flash player) and hack it such that it starts loading the sound even before you start the playback. This way you can have all the sounds at the client after a certain period of time (which depends on the connection between the client and the server).

You might also want to take a look at Soundmanager v2, which offers a tight integration with Javascript, without the need for additional hacks.

生寂 2024-07-18 18:27:03

您看过Wimpy Player吗? 他们有各种产品,从简单的音频按钮到带有播放列表的视频播放器。

我不确定是否要跳到文件的不同部分,但他们说它可以使用 Ajax 进行编程,而且我知道您可以设置它是否自动开始播放。

我用过一段时间,但后来改成了带有简单的“播放/暂停”按钮的东西。

(顺便说一句,我不明白你对非流媒体播放器的兴趣。如果用户必须先下载文件,为什么你需要提供一个接口?他们不会用他们使用的任何程序打开它在他们的电脑上?)

Have you seen Wimpy Player? They have various products, from a simple audio button to a video player with a play list.

I'm not sure about skipping to different parts of the file, but they say it is programmable with Ajax, and I know you can set whether it starts playing automatically or not.

I used this for a while, but later changed to something with a simple "play/pause" button.

(By the way, I don't understand your interest in a non-streaming player. If the user has to download the file first, why do you need to provide an interface? Won't they just open it with whatever program they use on their computer?)

人心善变 2024-07-18 18:27:03
  1. 如果您想在浏览器中使用此功能,我建议您使用基于 Flash 的内容(对于最终用户而言,它更加简单,基于更好的 API,并且比您想要依赖的任何媒体播放器具有更好的渗透性) )。
  2. 在 Flash 中,您可以通过两种协议加载音频/视频:HTTP 或 RTMP。
  3. RTMP 是一种时尚的音频/视频协议,并且对文档中的“查找”有严格的支持。 它在 Flash Media Server 中实现,但也在开源 Red5 中实现。 但是,这意味着您需要运行该服务器或购买 RTMP 服务。
  4. HTTP 支持检索文件的一部分(通过指定 Range 标头),但协议本身与格式无关,因此如果它是可变比特率,您可能会遇到一些问题。 因此从技术上讲,您应该能够在文件中跳转到未加载的部分,尽管 Flash 可能不允许这样做……比如说专有原因。
  5. 即使使用 Flash,mp4、ogg、aac 也会有问题。 最好的办法是在上传时将它们转换为通用格式 - 我认为 Flash 仅支持版本 9 之前的 mp3 和从 Flash Player 9 开始的 AAC。ffmpeg 和 mplayer 可以处理多种格式或从多种格式进行转换。
  6. 遗憾的是,这里没有灵丹妙药。 如果你想要一些灵活的东西,你将不得不牺牲一些开发时间并构建一些灵活的东西(不仅是网络播放器,还有幕后的一些魔法)。
  1. If you want to have this in the browser I suggest going for something Flash-based (it's much more straightforward for the end user, is based on a much better API and has a much better penetration than any media player you would like to count on).
  2. In Flash you can load audio/video by two protocols: HTTP or RTMP.
  3. RTMP is a sleek protocol for audio/video and has tight support for "seeking" within the document. It's implemented in the Flash Media Server, but also in the open source Red5. However, this means that you will need to run this server or buy the RTMP service.
  4. HTTP supports retrieving a part of a file (by specifying the Range header) but the protocol itself is format agnostic so if it's a variable bit rate you will probably have some issues. So technically you should be able to jump in the file to a section that's not loaded although Flash may not allow this for ... let's say proprietary reasons.
  5. mp4, ogg, aac will be problematic even with Flash. The best would be to convert them in a common format at upload time - I think Flash supports only mp3 before version 9 and AAC starting with Flash Player 9. ffmpeg and mplayer can handle/convert to/from many formats.
  6. Sorry to say, there is no silver bullet here. If you want something flexible you will have to trade off some development time and build something flexible (not only the web player but also some magic behind the scenes).
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文