haudio: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
m (Added new contributors to contributors list)
Line 29: Line 29:
: Colin Barrett
: Colin Barrett
: Joe Andrieu
: Joe Andrieu
: Michael Smethurst
: Chris Newell
: Julian Stahnke
: Justin Maxwell
: Paul Wilkins


Microformats [[#Copyright]] and [[#Patents]] statements apply.
Microformats [[#Copyright]] and [[#Patents]] statements apply.

Revision as of 03:28, 15 October 2007

hAudio 0.7

604867362_da0921136a_o.png

hAudio is a simple, open, distributed format, suitable for embedding information about audio recordings in (X)HTML, Atom, RSS, and arbitrary XML. hAudio is one of several microformats open standards.

hAudio Microformat Draft Specification

Editor
Manu Sporny, Bitmunk - Digital Bazaar, Inc.
Contributors
Manu Sporny, Bitmunk - Digital Bazaar, Inc.
Martin McEvoy
Alexandre Van De Sande Releases all his contribution as public domain(see user page)
Michael Johnson
Dave Longley
Brian Suda
Ben Wiley Sittler
Scott Reynen
Frances Berriman
James Craig
David Janes
Andy Mabbett
Danny Ayers
Rudy Desjardins
Edward O'Connor
Ryan King
Chris Griego
Brad Hafichuk
Tantek Çelik
Colin Barrett
Joe Andrieu
Michael Smethurst
Chris Newell
Julian Stahnke
Justin Maxwell
Paul Wilkins

Microformats #Copyright and #Patents statements apply.

Introduction

It is difficult for a browser to extract semantic information about an audio recording described on a web page. Metadata such as speaker, musician, publisher, label, title of the work, release date, acquisition link, related image artwork and tags provide relevant context for the audio recording.

Having such information marked up can provide a number of benefits to the viewer. If a web browser understands that a particular web page contains a song performed by an artist, it can produce richer interactions. For example, specific searches may be performed for artists and songs via general search services such as Google and Wikipedia. Specific search services may also be queried such as MusicBrainz, The Internet Archive, FreeDB, or Bitmunk. Additionally, classification by crawlers can become more accurate. If there are 20 tracks found on a page done by the same artist, and that content consumes a significant portion of the page, it can be assumed that the page is not only about music, but also about a particular artist.

In order to enable and encourage the sharing, distribution, syndication, and aggregation of audio content, the authors propose the hAudio microformat, an open standard for distributed audio metadata. The authors have researched both numerous audio-info-examples in the wild and earlier attempts at audio-info-formats, and have designed hAudio around a simple minimal schema for audio content. Feedback is encouraged on the hAudio feedback page.

Inspiration and Acknowledgments

Many thanks to the various individuals that did research and proposed ideas and discussion related to media info and audio info in general. Among the many participants are RodBegbie, Dean Hudson, Tantek Çelik, Mary Hodder, Joshua Kinberg, ChrisMessina, and Lisa Rein.

Scope

Audio content consistently share several common fields. Where possible hAudio has been based on this minimal common subset.

Out of scope

Fields that are type-specific have been omitted from hAudio. It is important that hAudio be kept simple and minimal from the start. Additional features can be added as deemed necessary by practical implementation experience.

The concept of a universal audio identifier, that is, how to identify the same audio album, song, speech, or podcast across different music and audio sites, though something very useful to have, is outside the scope of this format.

Semantic XHTML Design Principles

Note: the Semantic XHTML Design Principles were written primarily within the context of developing hCard and hCalendar, thus it may be easier to understand these principles in the context of the hCard design methodology (i.e. read that first). Tantek

XHTML is built on XML, and thus XHTML based formats can be used not only for convenient display presentation, but also for general purpose data exchange. In many ways, XHTML based formats exemplify the best of both HTML and XML worlds. However, when building XHTML based formats, it helps to have a guiding set of principles.

  1. Reuse the schema (names, objects, properties, values, types, hierarchies, constraints) as much as possible from pre-existing, established, well-supported standards by reference. Avoid restating constraints expressed in the source standard. Informative mentions are ok.
    1. For types with multiple components, use nested elements with class names equivalent to the names of the components.
    2. Plural components are made singular, and thus multiple nested elements are used to represent multiple text values that are comma-delimited.
  2. Use the most accurately precise semantic XHTML building block for each object etc.
  3. Otherwise use a generic structural element (e.g. <span> or <div>), or the appropriate contextual element (e.g. an <li> inside a <ul> or <ol>).
  4. Use class names based on names from the original schema, unless the semantic XHTML building block precisely represents that part of the original schema. If names in the source schema are case-insensitive, then use an all lowercase equivalent. Components names implicit in prose (rather than explicit in the defined schema) should also use lowercase equivalents for ease of use. Spaces in component names become dash '-' characters.
  5. Finally, if the format of the data according to the original schema is too long and/or not human-friendly, use <abbr> instead of a generic structural element, and place the literal data into the 'title' attribute (where abbr expansions go), and the more brief and human readable equivalent into the element itself. Further informative explanation of this use of <abbr>: Human vs. ISO8601 dates problem solved

Format

In General

The hAudio format is based on a set of fields common to numerous audio content sites and formats in use today on the web. Where possible field names have been chosen based on those defined by the related hCard standards.

Schema

The hAudio schema consists of the following:

  • hAudio (haudio)
    • audio-title or album-title required. text. (the names 'recording' and 'album' have been proposed as a replacement for -title)
    • track optional. using text or hAudio.
    • position optional. text.
    • contributor. optional. using text or hCard.
    • published. optional. using datetime-design-pattern.
    • sample (rel). optional. sample file/stream using rel-design-pattern with sample as the mf-rel-value.
    • enclosure (rel). optional. full download of file using rel-enclosure.
    • payment (rel). optional. link to purchase process using rel-payment.
    • photo. optional. using HTML and XHTML tag img.
    • category. optional. text.
    • duration. optional. ISO-8601 time duration using abbr-design-pattern (re-used from hcalendar).
    • price. optional. using currency-proposal.
    • description optional. text.

The following are disputed changes or additions to the hAudio schema:

  • hAudio proposed changes/additions
    • podcast required for collections of audio represented as a podcast. text.

Field details

The fields of the hAudio schema represent the following:

hAudio

An hAudio is used to identify and describe metadata associated with an individual audio recording.

  • an hAudio element is identified by class name haudio

Recording

The title of a single audio recording is a short textual description used to identify the work among interested parties. This can be the title of a speech, song title, or short description regarding a sound effect.

  • The element is identified by the class name audio-title.
  • hAudio MUST have either audio-title or album-title.

Album

The title of a collection of audio recordings that are represented as a CD, album or LP. The text should be a short textual description used to identify the work among interested parties. This can be the title of a CD, album title, or the name of a collection of audio recordings.

  • The element is identified by the class name album-title.
  • hAudio MUST have either album-title or audio-title.

Track

A container for another hAudio item. Used in conjunction with album-title.

  • The element is identified by the class name track.
  • hAudio MAY have one or more tracks, but MUST have album-title defined. If album-title is not defined, track cannot be defined.
  • The element MUST be processed opaquely. No sub-elements should be read from any hAudio contained in a track element.
  • The contents of the element MAY be plain-text or marked up using hAudio.

Position

The position is used to describe the position of the hAudio item in a list. Examples of hAudio lists can include album track listings, music top 10 lists, playlists, and podcast chapters.

  • The element is identified by the class name position.
  • hAudio MAY include one position element.
  • The contents of the element MUST be a number or other sequential identifier.

Contributor

A Contributor is any entity that takes part in the creation and distribution of an audio recording. Examples include: artist, publisher, guitarist, vocalist, violinist, lead singer, backup singer, bassist, drummer, manager, and roadie.

  • The element is identified by the class name contributor.
  • hAudio MAY include one or more contributors.
  • The contents of the element MAY be plain-text or MAY include a valid hCard Microformat.
  • The role field should be used to specify the Contributor's responsibility related to the audio recording if the hCard Microformat is utilized for mark-up.
  • If multiple Contributors are specified without role specifications, it may be assumed that the first role mentioned is the artist. This applies to plain-text contributor markup as well.

Published

The published date specifies the date that the audio recording was made available to the public. Examples include: The airing date of a radio broadcast, the day a speech was given, or the day a music album was made available for sale.

  • The element is identified by the class name published.
  • hAudio MAY include one or more published elements.
  • The contents of the element must include a date format compliant with the datetime-design-pattern.

Sample

A Sample URL specifies from where an excerpt of the audio recording may be retrieved.

  • The element is identified by a URL fitting the rel-design-pattern, the rel content being sample.
  • hAudio MAY include one or more URL samples.
  • The URL SHOULD point to a directly accessible stream or file.
  • The type of the sample MAY be specified by using the type specifier for a URL.

Full Download (Enclosure)

An Full Download URL specifies from where the full version of an audio recording may be retrieved. The URL MUST point to a direct link to a file.

  • The element is identified by a URL fitting the rel-design-pattern, the rel content being enclosure.
  • hAudio MAY include one or more enclosure URLs.
  • The type of the file MAY be specified by using the type specifier for a URL.

Purchase (Payment)

An Purchase URL specifies from where the full version of an audio recording may be purchased. The URL MUST point to a page that contains a purchase process.

  • The element is identified by a URL fitting the rel-design-pattern, the rel content being payment.
  • hAudio MAY include one or more payment URLs.
  • The type of the file MAY be specified by using the type specifier for a URL.

Photo

A photo specifies an image that should be used to summarize the audio recording. Examples include: the image of a speaker, an audio album cover image, or a picture from a concert.

  • The element is identified by the class name photo.
  • hAudio MAY include one or more photo elements.
  • The element must be an <img> element.

Category

The Category specifies the genre or style used to classify the audio recording. Examples include: blues, rock, motivational, spoken word, or sound effect.

  • The element is identified by the class name category.
  • hAudio MAY include one or more category elements.

Duration

The Duration specifies the length in time of the audio recording in seconds. Examples include: 104 seconds, 3:23, and 4 minutes.

  • The element is identified by the class name duration.
  • hAudio MAY include one duration element.
  • The contents of the element SHOULD use the abbr-design-pattern whose title attribute contains an ISO-8601 formatted duration, specifically in seconds. This allows us to expand into specifying time slices and other time markup in the future, but keep parsing simple for now. An example of 3:23 (203 seconds) would be "P203S" in ISO 8601 format. Currently, all abbr attributes specifying duration SHOULD be in seconds.

Price

The Price specifies the amount of currency that must be exchanged for acquisition of a full specimen of the audio recording. Examples include: One Dollar, $2, and £4.

  • The element is identified by the class name price.
  • hAudio MAY include one or more price elements.
  • The contents of the element SHOULD use the currency-proposal.

Description

An explanation of the contents of the hAudio item. This could explain the significance of a speech, the full-text description of a sound effect, or the meaning of a song or album.

  • The element is identified by the class name description.
  • hAudio MAY include one or more description elements. If more than one description element is defined, the full description for the hAudio is the concatenation, in order, of all description elements.

Disputed Additions

The following are disputed additions to the hAudio format. Either enough data has not been gathered or re-analyzed for inclusion into the format, or some do not want to overly complicate hAudio.

Podcast

The podcast element is used to identify that a particular hAudio is a podcast and has a given title. Examples of proper podcast titles are "This Week in Tech (August 7th, 2007)", "The Latest Blog Trends", or similar podcast titles.

  • The element is identified by the class name podcast.
  • hAudio MUST include either recording, album, or podcast
  • The contents of the element SHOULD be the title of the podcast.

More Semantic Equivalents

For some properties there is a more semantic equivalent, and therefore they get special treatment, e.g.:

  • For "photo", use <img class="photo" src="..." alt="" />
  • If only 'album-title' is specified, then the hAudio is an album.
  • If only 'audio-title' is specified, then the hAudio is a song, audio track, sound effect, speech, or other atomic/singular work.
  • If both 'album-title' and 'audio-title' is specified, then the hAudio is a song that is part of an album.
  • If 'album-title' and one or more 'track's are specified, the hAudio is an album containing tracks. Each track is assumed to be an hAudio, unless specified otherwise. None of the track properties should implicitly be added to the containing hAudio. In other words, the parser shouldn't parse the contents of the 'track' hAudio into the higher-level, non-track hAudio object.

Language

  • To explicitly convey the natural language that an hAudio is written in, use the standard (X)HTML 'lang' attribute on the element with class="haudio", e.g. <div class="haudio" lang="en"> ... </div> If portions of an hAudio (e.g. the item name) are in a different language, use the 'lang' attribute on those portions.
  • hAudio processors which need to handle the language of reviews MUST process the standard (X)HTML 'lang' attribute as specified.

Human vs. Machine Readable

If an <abbr> element is used for a property, then its 'title' attribute is used for the value of the property, instead of the contents of the element, which can then be used to provide a user-friendly alternate presentation of the value.

Similarly, if an <img /> element is used for one or more properties, it MUST be treated as follows:

  1. For the "photo" property and any other property that takes a URL as its value, the src="..." attribute provides the property value.
  2. For other properties, the <img /> element's 'alt' attribute is the value of the property.

Notes

This section is informative.

  • By marking up audio content with the hAudio microformat, the expectation is communicated that information about the content MAY be indexed. This has no impact on the copyright of the content itself which the publisher may explicitly specify using rel-license as specified above.
  • The enumerated list of item types is under development and may be extended.
  • Each type may have custom hAudio fields that follow the common set.
  • Additional details about a particular item should be specified with the rest of the item's info at the URL provided for the item.

XMDP Profile

<dl class="profile">
 <dt>class</dt>
 <dd><p>
  <a rel="help" href="http://www.w3.org/TR/html401/struct/global.html#adef-class">
   HTML4 definition of the 'class' attribute.</a>
  This meta data profile defines some 'class' attribute values (class names) 
  and their meanings as suggested by a 
  <a href="http://www.w3.org/TR/WD-htmllink-970328#profile">
   draft of "Hypertext Links in HTML"</a>.
  <dl>
   <dt>haudio</dt>
   <dd>
    Used to identify and describe metadata associated with an individual audio recording.
   </dd>
   <dt>audio-title</dt>
   <dd>
    A short textual description used to identify an audio recording among interested parties.
   </dd>
   <dt>collaborator</dt>
   <dd>
    An entity that takes part in the creation and distribution of an audio recording.
   </dd>
   <dt>published-date</dt>
   <dd>
    The date that the audio recording was made available to the public.
   </dd>
   <dt>image-summary</dt>
   <dd>
    An image that should be used to summarize the audio recording.
   </dd>
   <dt>category</dt>
   <dd>
    The genre or style used to classify the audio recording.
   </dd>
   <dt>duration</dt>
   <dd>
    The length of the audio recording.
   </dd>
   <dt>price</dt>
   <dd>
    The amount of currency that must be exchanged for acquisition of a full specimen of the audio recording.
   </dd>
 </dd>
</dl>

Examples

Here are a few examples of audio content from current web sites, and how they could be easily enhanced to support the hAudio audio metadata microformat.

Want to write valid hAudio? Use the hAudio creator (not implemented yet) to write about audio content and publish it on your blog.

Simple Song Example

Display:

Start Wearing Purple by Gogol Bordello

Microformatted XHTML:

<div class="haudio">
   <span class="audio-title">Start Wearing Purple</span> by 
   <span class="contributor">Gogol Bordello</span>
</div>

Speech Example

Display:

I Have a Dream, a speech by Martin Luther King Jr.

Microformatted XHTML:

	 
<div class="haudio">	 
   <span class="recording">I Have a Dream</span>, a 	 
   <span class="category">speech</span> by 	 
   <div class="contributor">	 
      <div class="vcard">	 
         <span class="fn">Martin Luther King, Jr.</span>	 
      </div>	 
   </div>	 
</div>	 

Song and Album Example

Display:

Start Wearing Purple by Gogol Bordello found on Underdog World Strike

Microformatted XHTML:

<div class="haudio">
   <span class="audio-title">Start Wearing Purple</span> by 
   <div class="contributor">
      <div class="vcard">
         <span class="org fn">Gogol Bordello</span>
      </div>
   </div>
   found on
   <span class="album-title">Underdog World Strike</span>
</div>

Complete Album Example

An example that uses every element of hAudio:

[Image] Live Phish, Volume 15 by Phish
Released: October 31, 2002
Acquire: Sample, Live Recording, Buy High Quality Track
Category: Live
Duration: 145 minutes, 27 seconds
Price: $14.99

Tracks:
1. Sanity (5:48)
2. Highway To Hell (3:39)

Here is the hAudio Microformat markup:

<div class="haudio">
   <img class="photo" src="images/live_phish_vol_15.jpg"/>
   <span class="album-title">Live Phish, Volume 15</span>
   <span class="contributor">
      <span class="vcard">
         <span class="fn org">Phish</span>
      </span>
   </span>
   <br/>
   Released on:
   <abbr class="published" title="20023110">October 31, 2002<abbr>
   <br/>
   Acquire: 
   <a rel="sample" href="/samples/live_phish_vol_15_sample.mp3">Sample</a>, 
   <a rel="enclosure" href="/live/phish_live_phish_vol_15.mp3">Live Recording</a>,
   <a rel="payment" href="/buy/phish_live_phish_vol_15">Buy High Quality Track</a>
   Category: <span class="category">live</span>
   Duration: <abbr class="duration" title="P8727S">145 minutes, 27 seconds</abbr>
   Price: <span class="money">
             <abbr class="currency" title="USD">$</abbr>
             <span class="amount">14.99</span>
          </span>
   Tracks:
   <span class="track">
    <span class="haudio>
     <span class="position">1</span>.
     <span class="audio-title">Sanity</span> 
     (<abbr class="duration" title="P348S">5:48</abbr>)
     </span>
    </span>
   </span>
    <span class="haudio>
     <span class="position">2</span>.
     <span class="audio-title">Highway To Hell</span> 
     (<abbr class="duration" title="P219S">3:39</abbr>)
     </span>
    </span>
   </span>
</div>

Examples in the wild

This section is informative.

Implementations

This section is informative.

See hAudio Implementations.

References

Normative References

Informative References

Similar Work

Copyright

This document and specification was placed into the public domain on July 25th, 2007 by the authors. There are no usage, distribution, re-printing, or any other restrictions of any kind with regards to the text or content of this specification.

Patents

The authors of this Microformat have not and will not apply for patents covering any invention covering this Microformat in part or as a whole. There are no claims to any patent in this document. Each author is required to report any known patent issues immediately under this section.

This document and specification is distributed under a royalty free patent policy, e.g. per the W3C Patent Policy (http://www.w3.org/Consortium/Patent-Policy-20040205/), and IETF RFC3667 (http://www.ietf.org/rfc/rfc3667.txt) & RFC3668 (http://www.ietf.org/rfc/rfc3668.txt).

Public Domain Release

The authors and editors of this page due hereby relinquish their copyright on the document and release the text of this page into the public domain.

Work in progress

This specification is a work in progress. As additional aspects are discussed, understood, and written, they will be added.

Further Reading

Mailing List Discussion

Specification Development Statistics

  • Number of examples reviewed: 185
  • Total examples analyzed: 105
  • Days of development from concept to first draft: 129
  • Estimated hours of work by primary investigator on hAudio: 320
  • Estimated combined work hours by mailing list: 170
  • Total estimated hours of work to produce hAudio draft: 490
  • Estimated cost to develop based on $65,000/year salary: $16,600

Related Pages