Subject: How to specify multiple alternative encodings of the same content?

From: "J.B. Nicholson-Owens" <[email-masked]>
Date: Sun, 06 Nov 2005 23:34:16 -0600

I maintain NewsFromNeptune.com, a website which points to an archive of 
recordings of a weekly political talk show called "News from Neptune".  I'm 
considering using ATOM so listeners can be notified about new episodes entering 
the archive.

I'd like to be able to tell the user's software that there are multiple 
encodings of the same show, one in Ogg Vorbis, another in FLAC, and a third in 
Speex.  Given a URI to each encoding, the client could pick which one is 
appropriate for downloading.

How do I specify this in ATOM?

Thanks.

---

From: "A. Pagaltzis" <[email-masked]>
Date: Mon, 7 Nov 2005 13:30:48 +0100

* J.B. Nicholson-Owens <[email-masked]> [2005-11-07 06:40]:
> I'd like to be able to tell the user's software that there are
> multiple encodings of the same show, one in Ogg Vorbis, another
> in FLAC, and a third in Speex.

The basic idea is simple:

    <link rel="enclosure" type="audio/mpeg" href="show.mp3" />
    <link rel="enclosure" type="application/ogg" href="show.ogg" />
    <link rel="enclosure" type="audio/x-speex" href="show.spx" />

However, there is currently no mechanism to specify that these
enclosures are all equivalent, and that the client should pick
only one of them. Clients which automatically download closures
will probably take all three.

There was just recently discussion about an extension that would
allow specifying such subtleties; but I don’t know what the
status of James’ I-D is.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

---

From: "Thomas Broyer" <[email-masked]>
Date: Mon, 7 Nov 2005 15:53:33 +0100 (CET)

> will probably take all three.

How about:

<content type="audio/mpeg" src="show.mp3" />
<link rel="alternate" type="application/ogg" href="show.ogg" />
<link rel="alternate" type="audio/x-speex" href="show.spx" />

Not really equivalent to link[@rel="enclosure"] though…

-- 
Thomas Broyer

---

From: James M Snell <[email-masked]>
Date: Mon, 07 Nov 2005 07:51:06 -0800

It's in progress. A newborn tends to slow these things down a bit ;-) 
Expect a draft by the end of the week.

---

From: Sjoerd Visscher <[email-masked]>
Date: Sat, 12 Nov 2005 13:57:27 +0100

J.B. Nicholson-Owens wrote:
> recordings of a weekly political talk show called "News from Neptune".  
> I'm considering using ATOM so listeners can be notified about new 
> episodes entering the archive.
> 
> encodings of the same show, one in Ogg Vorbis, another in FLAC, and a 
> third in Speex.  Given a URI to each encoding, the client could pick 
> which one is appropriate for downloading.
> 

Ideally, just like in XHTML 2.0[1], I think the type attribute should 
have the option of providing multiple content-types.

So the link would become:

<link rel="enclosure" type="audio/mpeg, application/ogg, audio/x-speex" 
href="show" />

Or with preferences:

<link rel="enclosure" type="application/ogg, audio/mpeg;q=0.5, 
audio/x-speex;q=0.2" href="show" />

Or even with multiple languages:

<link rel="enclosure" type="audio/mpeg, application/ogg, audio/x-speex" 
href="show" hreflang="en-CA, fr-CA" />

But this would require HTTP content negotiation, which I think is not 
practical for most users.

[1] http://www.w3.org/TR/xhtml2/mod-handler.html#adef_handler_type
-- 
Sjoerd Visscher
http://w3future.com/weblog/