[英]Using an audio stream URL with wpaudio or any other such script
I have bunch of audio stream URLs, like this one: http://popplers5.bandcamp.com/download/track?enc=mp3-128&id=1269403107&stream=1 (which, by the way, are from the incredible bandcamp . com) 我有一堆音频流URL,例如: http ://popplers5.bandcamp.com/download/track?enc=mp3-128&id=1269403107&stream=1(顺便说一下,它们来自不可思议的bandcamp。com)
I need to know how to use these with audio streaming scripts like the wpaudio plugin (wpaudio . com) Most of these plugins require a link to an actual mp3 file. 我需要知道如何将它们与wpaudio插件(wpaudio。com)等音频流脚本一起使用。大多数这些插件都需要链接到实际的mp3文件。 As you can see, the URL above is an audio stream, not an actual mp3.
如您所见,上面的URL是音频流,而不是实际的mp3。 How do I put the two together?
如何将两者放在一起?
If you visit that URL, your browser should start playing the audio stream. 如果您访问该URL,则浏览器应开始播放音频流。 I basically need to be able to embed the audio stream into a web page.
我基本上需要能够将音频流嵌入到网页中。
Thanks! 谢谢!
You can use mplayer: 您可以使用mplayer:
mplayer -dumpstream url
Check this page: 检查此页面:
for more information. 欲获得更多信息。
If this is not a live stream thing, as it looks like for the above file, you can use a simple wget: 如果这不是实时流内容(如上述文件所示),则可以使用简单的wget:
wget "http://popplers5.bandcamp.com/download/track?enc=mp3-128&id=1269403107&stream=1" -O outfile.mp3
Be sure to check copyright/licensing of the content before you do anything with it. 在对内容进行任何操作之前,请务必检查其版权/许可。
You can use WPaudio or any of the others you want, no problem. 您可以使用WPaudio或任何其他想要的东西,没问题。 There is absolutely no difference between that stream URL you posted, and a random MP3 file served up from somewhere.
您发布的流URL和从某个地方提供的随机MP3文件之间绝对没有区别。 At least, not from your browser's perspective.
至少不是从浏览器的角度来看。
Your browser has no idea, and does not care, how the source server gets its content. 您的浏览器不知道,也不关心源服务器如何获取其内容。 It's all HTTP, and the only thing your browser cares about is content type.
都是HTTP,您的浏览器唯一关心的就是内容类型。 Here's what that looks like:
看起来像这样:
Content-Type: audio/mpeg
Same as it would be if you tossed an MP3 up there. 与将MP3丢到那里一样。 No biggie.
没关系
Use WPaudio, or any other web MP3 player. 使用WPaudio或任何其他Web MP3播放器。 They all will work fine.
他们都将正常工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.