Rdio rant on audio element problems

The HTML5 audio element has unfinished business. This posting by Ian McKellar of Rdio to the Rdio-API mailing list articulates the problems well.

The conversational context is that he’s explaining why the Rdio in-browser player uses a a headless Flash module to stream audio rather than the Audio element.

We have no plans to support streaming via <audio> tags. There are a few show-stopper issues with the specification and the implementations that make it inappropriate for our use.

First of all there is no audio codec supported across popular browsers: http://en.wikipedia.org/wiki/Comparison_of_layout_engines_(HTML5_Media)#Audio_format_support
As you can see Firefox only supports Ogg Vorbis and while Chrome supports that Safari and IE do not.

Current implementations are immature and generally of poor quality. For example while iOS browsers have an <audio> tag it seems that they apparently don’t actually work very well: http://www.phoboslab.org/log/2011/03/the-state-of-html5-audio
Most other browsers have have their own warts and bugs too. I’m sure this will all look a lot better in a few years, but for the time being the platform isn’t ready. And for all of Flash’s bugs and flaws they do handle music streaming pretty well.

The <audio> API doesn’t support streaming which *significantly* increases bandwidth usage. Flash’s RTMP protocol allows devices to only download what they’re actually playing. If you skip 20 seconds into a song then Flash will have only downloaded about 30 seconds worth of audio. Using HTTP progressive download playback (the only protocol that <audio> supports) then you’d have downloaded as much of the track as could be streamed across your network connection. Seeking with RTMP also significantly more efficient and quick than with plain old HTTP.

Finally Rdio’s business and the businesses of our content partners depends on being able to securely deliver content to subscribers. When I listen to a song by a friend’s band (eg: http://rd.io/x/Q1I2VLLD) I know that my friend is getting paid. While we all know that no security mechanisms are perfect the ones available in Flash are significantly more sophisticated, robust and well tested than what we could build on top of HTML5 <audio>.

RFC 2397, meet HTTP Link header

Media type:
application/json; schema=dublin_core

Null data URI with this type:

Link response header with null data URI:
Link: data:application/json;schema=dublin_core,%7B%7D; rel="meta"

Link response header with artist and song title:
data:application/json; schema=dublin_core,{Creator%3A"Michael%20Jackson"%2CTitle%3D"Billie%20Jean"}

Using a data URI instead an HTTP URI is more robust, simpler and faster. I had to invent the media type, though. application/json; schema=dublin_core is a neologism.

Also, having two semicolons in there (you need one for the media type parameter to the data URI and one for the rel attribute) might be a bug.

Link: header for audio metadata

  1. • lucasgonze clears throat
  2. [6:21pm] lucasgonze: I have this thought –
  3. [6:22pm] lucasgonze: apply http://www.w3.org/wiki/LinkHeader to audio files on the web, as a method to annotate pcm data.
  4. [6:22pm] lucasgonze: as an alternative to id3
  5. [6:22pm] lucasgonze: so let’s say there is http://example.com/example.wav
  6. [6:22pm] lucasgonze: wav has no metadata support
  7. [6:23pm] lucasgonze: GET on http://example.com/example.wav would return a response header pointing to a metadata file
  8. [6:23pm] lucasgonze: Link: example-metadata.json; rel=meta
  9. [6:25pm] lucasgonze: GET http://example.com/stairwaytoheaven.wav
  10. [6:25pm] lucasgonze: Link: http://musicbrainz.org/ws/2/recording/ccfdd180-22e1-49b9-bd81-b5fcf2c6474e?inc=artist-credits%2Breleases; rel=meta
  11. [6:35pm] lucasgonze: use CORS on the metadata resource http://www.w3.org/TR/cors/ to enable cross site requests from ajax
  12. [6:36pm] lucasgonze: then a javascript-based audio renderer in the browser can access metadata for any file
  13. [6:37pm] lucasgonze: the metadata technology is factored out of the codec.
  14. [6:37pm] lucasgonze: the http request becomes the envelope for waveform data and metadata together.
  15. [6:37pm] lucasgonze: metadata technology and audio signal processing technology can evolve independently

See also the Web Audio API and jsmad.

Scandinavian Music Company Set to Take Over By Reinventing the Mixtape

Scandinavian Music Company Set to Take Over By Reinventing the Mixtape.

X5 focuses on back catalogs of classical music and creating custom compilations with titles like “The 99 Darkest Pieces of Classical Music” or “The 50 Most Essential Pieces of Classical Music” which, since being released in 2008, has made more than $2 million worldwide. Essentially, they buy up a truckload of song licenses at low-rates, package them into winning compilations and resell at a moderate markup. X5 has released more than 8,000 of these thematic albums — some by composer, mood, holiday, etc. — with most falling under the “classical” genre.

In 2010, X5 was the number two classical label in the U.S. with a 20% market share, and had 13 #1 Billboard Classical albums — more than any other label, save for Universal Music Group (with whom X5 is currently in talks).

The company has been able to make all that money through some simple tricks: The albums are inexpensive, the artwork is simple but striking, X5 distributes through all major music sites — iTunes, Amazon, Spotify, Rhapsody, etc. — and designs albums with a kind of “music SEO” in mind. “Think of the person that types ‘classical’ into the iTunes search box,” says Scott Ambrose Reilly, X5′s new U.S.-based CEO. “That’s the kind of person we’re trying to sell to.”

personal legacy

Steve Jobs inspired me by building his business on quality. Before the rebirth of Apple the dominant designer in the computer industry was Microsoft, which specializes in willfully shoddy workmanship. They inspired others to do knowingly bad work and made it harder to develop a business consensus for good work. Microsoft’s world was cynical, depressing and demoralizing. Apple under Jobs countered this. It showed that cynicism towards your own workmanship is not necessary.

But when you buy an Apple product you more or less give up your right to repair it. You can’t install the software of your choosing, you can’t sell your software to other owners without Apple’s blessing. You give up your right to modify and improve a possession, which negates your own property rights. Apple is such a powerful corporation that they can sell you stuff without your getting true ownership. This is undemocratic. It increases the power of the biggest and most powerful corporations. Even Microsoft at its peak was more open. This makes me sad and a little more cynical.