W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2012

Re: [whatwg] metadata attribute for media

From: Philip Jägenstedt <philipj@opera.com>
Date: Thu, 27 Sep 2012 10:44:20 +0200
To: whatwg@whatwg.org, "Ralph Giles" <giles@mozilla.com>
Message-ID: <op.wlac76p9sr6mfa@kirk>
On Fri, 21 Sep 2012 01:32:19 +0200, Ralph Giles <giles@mozilla.com> wrote:

> Back in June, I proposed[1] a new attribute to get metadata "tag" data
> out of media resources.
>
> I've done an experimental implementation of this which is now in the
> Firefox Aurora (alpha) channel[2] and Nightly development builds.
>
> The method is media.mozGetMetadata() and it returns a new object each
> time, whose properties are key:value pairs representing the metadata
> tags from the file. Aurora supports this for Ogg Vorbis (.ogg) streams.
> Nightly supports Opus (.opus) files as well.
>
> Right now the method returns whatever set of tags happen to be in the
> media stream, at least if they can be interpreted as unicode text. There
> are several things I'd like to fix about this. Media formats generally
> have rules about how to map various tags to a standard vocabulary. Right
> now, web content has to implement those rules, but the user-agent is in
> a better position to do so.
>
> Also, a number of Mozilla (C++) developers I've talked to prefer a fixed
> schema for metadata, rather than the more dynamic approach.
>
> So, I'd like to do a new method which returns an object with a fixed
> schema we can describe in idl, representing standard fields derived from
> the dublic core tag set. The raw metadata would be available under the
> old method for advanced applications.
>
> Some metadata is also per-track, rather than per-stream, so it makes
> sense to have these calls available on track objects as well as media
> objects.
>
> The most essential tags are dc:creator and dc:title. That covers almost
> all player use cases. For per-track metadata, the language is perhaps
> also useful for selection purposes. Are there any other tags folks would
> like to see in the initial proposal?

I'm skeptical that all that we want from ID3v2 or common VorbisComment  
tags can be mapped to Dublin Core, it seems better to define mappings  
directly from the underlying format to the WebIDL interface. As an  
example, the MusicBrainz schema has both a track artist (e.g. "Queen feat.  
George Michael") and an album artist (e.g. "Queen") and two kinds of  
titles (track title and recording title) which doesn't seem to benefit  
 from being passed through dc:creator and dc:title.

Given the open-endedness of metadata contained in actual media resources,  
I'm personally a bit skeptical that there's something we could add to the  
Web platform that would be better than just letting authors pass that  
metadata out-of-band using any representation they like, but what use  
cases are you trying to cover here?

-- 
Philip Jägenstedt
Core Developer
Opera Software
Received on Thursday, 27 September 2012 08:44:52 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:45 UTC