简体   繁体   中英

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)

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. As you can see, the URL above is an audio stream, not an actual mp3. How do I put the two together?

If you visit that URL, your browser should start playing the audio stream. I basically need to be able to embed the audio stream into a web page.

Thanks!

You can use 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 "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. There is absolutely no difference between that stream URL you posted, and a random MP3 file served up from somewhere. 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. Here's what that looks like:

Content-Type: audio/mpeg

Same as it would be if you tossed an MP3 up there. No biggie.

Use WPaudio, or any other web MP3 player. They all will work fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM