Matt Sherman
Matt Sherman

Reputation: 8358

How to play an AAC+ stream in Chrome?

I’ve tried several combinations of types and setting in (the excellent) mediaplayer.js, but cannot get BBC Radio 3 to play in Chrome. The stream URL is here, and the playlist from which it is taken is here.

The tag is:

<audio src="http://bbcmedia.ic.llnwd.net/stream/bbcmedia_intl_lc_radio3_p?s=1362261751&amp;e=1362276151&amp;h=47e8b2755e05d1a5ceeb665f116984de" type="audio/mp4" id="player"></audio>

Looking at Chrome’s inspector, I see that the network is calling the stream, but it just loads indefinitely, without audio starting.

Other streams are working fine (demo), but this particular one is problematic, and I assume it has to do with the AAC+ format.

Edit: The instantiation code is here, figure it’s clearer than pasting the whole thing in.

Edit 2: It works in Safari (Mac)! Which I assume is related to Quicktime. Which is why I believe that AAC+ is the issue.

Upvotes: 4

Views: 9692

Answers (3)

suatDMK 2
suatDMK 2

Reputation: 21

html audio player plays aac+ file in chrome browser.

<audio id="audio1" controls autoplay>
   <source src="test.aac"></source>
</audio>

it does play aac+ streams if it is from SHOUTCAST v2. (sometime crossdomain.xml must be exist in shoutcast folder for audition)

Upvotes: 1

SpliFF
SpliFF

Reputation: 39004

Firstly, which OS, which Chrome version did you test with?

AAC+ is covered by software patents so it isn't going to be available if your OS has disabled it in the ffmpeg library that Chrome depends on (on OS where Chrome doesn't bundle its own ffmpeg). If you are running something like debian or ubuntu it might be disabled by default for legal reasons. On Windows Chrome may have removed support from the bundled ffmpeg themselves to avoid liability issues.

Alternatively since AAC+ supports DRM it might be an issue with BBC encrypting or blocking the stream in a way that Chrome doesn't support.

If I'm right then there's probably no good solutions since you can fix it on your machine (with a custom Chrome/FFMpeg build) but not on your end-users side where it really matters. Flash supports AAC so you could fallback to a flash player using the codec fallback techniques described here but you might run into the crossdomain/licensing issues described here.

The MDN codec page claims Chrome 3.0 (but not Chromium) supports AAC in MP4 containers but it does not clarify whether that support extends to AAC+ (unless that's what they mean by "main only").

Upvotes: 1

kirbyfan64sos
kirbyfan64sos

Reputation: 10727

See https://groups.google.com/forum/m/#!msg/jplayer/9Ks2Crfjwrg/jDCDBgv3qr0J. It seems that AAC+ support is somewhat odd. It also seems that AAC+ can be placed in various containers. like m4a and FLV. Also see stackoverflow.com/questions/4018596/aac-streaming-from-shoutcast-in-flash.

Upvotes: 1

Related Questions