简体   繁体   中英

Live Audio Stream

I am trying to setup live internet radio station using icecast server and want my stream to work in all modern browsers. My client only produces .ogg stream. All browsers doesn't play .ogg stream. For eg the .ogg stream I have setup works in chrome but doesn't work in IE. How should I make it run in all browsers?

  1. Is there a way I can convert .ogg stream to .mp3 or any other format on the fly
  2. Embed a audio player in the browser which can play .ogg stream.

Or Any other advice would be helpful.

Regards, Hitesh Bhutani

You have several options:

  1. Change encoding format from OGG to MP3 in your Virtual DJ software. Keep in mind that Firefox will not be able to play mp3 streams on some platforms using HTML5 audio tag due to licensing limitations.

  2. Install some kind of transcoding software on your server (where you have Icecast installed and running), for example liquidosap ( https://www.liquidsoap.info/ ). Liquidsoap can (among other things) take your stream as an input and transcode it to sereveral formats, for example - mp3, aac, ogg and then your Icecast server will have several mount points available, for example http://yourserver.com:8000/stream.mp3 , http://yourserver.com:8000/stream.ogg , http://yourserver.com:8000/stream.aac and then you can create a small javascript that wil detect browser version and choose suitable stream.

  3. Use HTML5 media player like jPlayer ( http://jplayer.org/ ) or Soundmanager2 ( http://www.schillmania.com/projects/soundmanager2/ ). These players can automatically detect browser version and select suitable stream type, also if they can't play the stream using HTML5 <audio> tag, they will fall back to internal Flash based player.

The most advanced way is to combine (2) and (3) methods, that will give you the most browser support.

Supported audio coding formats

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