Metadata: Difference between revisions

From XiphWiki
Jump to navigation Jump to search
No edit summary
(Changed tense of M3F + tidy)
 
(83 intermediate revisions by 23 users not shown)
Line 1: Line 1:
==Motivation==
This page aims to give an overview of the current state of metadata in Ogg and the ongoing projects towards improving it. The different components work in concert; for example [[Ogg Skeleton]] provides important infrastructure for [[CMML]], [[VorbisComment]] is simple to use and program, while the draft [[M3F|Multimedia Metadata Format (M3F)]] provides more sophisticated information.
 
== [[VorbisComment]]s ==


All the Xiph.org codecs have some internal mechanism for including metadata about the current stream.
All the Xiph.org codecs have some internal mechanism for including metadata about the current stream.
Generally, this is one of the codec headers, and in the words of the [http://www.xiph.org/ogg/vorbis/doc/v-comment.html vorbis spec],  
Generally, this is one of the codec headers, and in the words of the [http://www.xiph.org/vorbis/doc/v-comment.html vorbis spec],  
"It is meant for short, text comments...much like someone jotting a quick note on the bottom of a CDR."
"It is meant for short, text comments ... much like someone jotting a quick note on the bottom of a CDR." A single VorbisComment can store upto 2^64 bytes (16 exabytes).
 
VorbisComments store metadata describing the stream in key=value pairs, such as "ARTIST=Elvis", "TITLE=Blue Suede Shoes". Multiple copies of any given key are allowed (for example you can specify ARTIST several times for multiple performers). The specification has several suggested keys: TITLE, VERSION, ALBUM, TRACKNUMBER, ARTIST, PERFORMER, COPYRIGHT, LICENSE, ORGANIZATION, DESCRIPTION, GENRE, DATE, LOCATION, CONTACT, ISRC. See the [http://www.xiph.org/vorbis/doc/v-comment.html specification] for the intent of each one.
 
The [[VorbisComment]] page contains improvements to the suggested comment set.
 
== [[FLAC]] metadata blocks ==
 
Metadata is included in the FLAC codec as METADATA_BLOCK_DATA. Seven types of metadata block are defined: 
#''METADATA_BLOCK_STREAMINFO'': Sample rate, number of channels, etc.
#''METADATA_BLOCK_PADDING'': Nul padding.
#''METADATA_BLOCK_APPLICATION'': Third-party applications can register an ID. Metadata is typically 32-bit integers, but any datatypes can be specified.
#''METADATA_BLOCK_SEEKTABLE'': For one or more seek points.
#''METADATA_BLOCK_VORBIS_COMMENT'': Also known as FLAC tags, the contents of a VorbisComment packet. Note that the 32-bit field lengths are little-endian coded according to the Vorbis spec, as opposed to the usual big-endian coding of fixed-length integers in the rest of FLAC. FLAC metadata blocks are limited to 2^24 bytes (16 megabytes) and a VorbisComment packet in FLAC must fit within that limit.
#''METADATA_BLOCK_CUESHEET'': Typically, but not necessarily, for CD-DA (Red Book) cuesheets.
#''METADATA_BLOCK_PICTURE'': For binary picture data.
 
== [[Ogg Skeleton]] ==
 
[[Ogg Skeleton]] provides metadata useful for handling Ogg streams. This includes information like mime-types and mapping for granulepos which allows seeking streams without the need for the demuxer to understand them. The latest version, [[Ogg Skeleton 4]], also provides a keyframe index to enable faster seeking over high latency networks.
 
Ogg Skeleton allows for attachment of message header fields, given as name-value pairs, that contain some sort of protocol messages about the logical bitstream. This is intended for decode related stuff, such as the screen size for a video bitstream or the number of channels for an audio bitstream.
 
== [[OggKate]] ==
 
[[OggKate]] was originally designed for karaoke and text. The stream can carry text and images, and these can be animated.
 
== [[CMML]] (deprecated) ==
 
CMML is not used anymore; use [[OggKate]] instead. The [[CMML|Continuous Media Markup Language]] allowed time-based marking up of media streams, at its simplest this allowed you to divide media files into clips and provide information about each clip.
 
== [[M3F]] (unused draft) ==
 
[[M3F|Multimedia Metadata Format]] is not being developed anymore; use [[VorbisComment]] instead.
 
The format was intended to replace VorbisComments for the use of ''structured'' metadata, allowing VorbisComments to revert to its orginally intended use of "short, text comments ... much like someone jotting a quick note on the bottom of a CDR."
 
[[M3F]] for the Ogg container was a draft specification which aimed to provide metadata for media streams. The exact aims of this project were still under development, but they included being able to describe artist relationships to a piece more accurately as well as providing the structure to encourage more reliable metadata.


This works well enough for most things, and can be overloaded/abused (depending on your point of view)
== [[XMLEmbedding]] (unused draft) ==
for most other things. But there are three major requirements that point to the design of an external
metadata format; one that can be interleaved with the other streams in a container.


* ''Machinability'' There are a number of items of metadata that a player will want to parse and take action on. While there are usually 'convention' schemes for doing this with the embedded comment headers, this is much easier if there is a separate metadata stream designed for such use, instead of having to do best-effort parsing of natural language comments. For example, a video file with multiple audio tracks can specify the language of each one; a player than can parse these reliably can match them against a language preference list configured by the user to automatically select and begin playback of the best option.
To implement XML metadata in Ogg (as for [[M3F]]), a mapping to Ogg streams is needed. The use of XML metadata will also open the way for the inclusion of technologies such as:
* RDF + dublin core
* [http://www.adobe.com/products/xmp/ XMP]
* [http://wiki.musicbrainz.org/MusicBrainzXMLMetaData MusicBrainz]
* [http://www.w3.org/Graphics/SVG/ SVG]
This specification is still not past the discussion stage.


* ''Kitchen Sink'' There are a minority of people who care passionately about having every detail about a track available. In the sense of conserving such information, and providing an equivalent to liner notes for online distribution, this is a goal worth supporting. However, the simple unstructured key-value pairs offered by the inline metadata are unwieldy for this level of detail. How do you tell the 2nd unit Assistant Director from the USA unit Assistant Director? How do you indicate which artist played tenor sax in the solo?
== Aims of advanced metadata ==


* ''Addressability'' The internal comment metadata headers are by necessity attached to a single content stream. This is useful for some appication, but a limitation in others. In a multiplexed stream, which set of comments refers to the collection as a whole? (By convention, in Ogg, it's the first logical bitstream occuring, but we can do better.) A separate metadata stream type must address this issue of collective metadata while still allowing description of individual streams. It should also allow temporal addressability, so that changes can be described. Because the in-stream comment metadata are part of the codec headers, it cannot change over the course of the stream, and allowing additional comment packets elsewhere in the stream presents seeking challenges. In the Ogg container this can be resolved by inserting a chain boundary, but this is a poor option for very-low-bitrate streams and unreliable transports such as RTP.
VorbisComments work well enough for most things, and can be overloaded/abused (depending on your point of view) for most other things. But there are three major requirements that point to the design of an external metadata format; one that can be interleaved with the other streams in a container.


==Proposed Solutions==
* '''Machinability:''' There are a number of items of metadata that a player will want to parse and take action on. While there are usually 'convention' schemes for doing this with the embedded comment headers, this is much easier if there is a separate metadata stream designed for such use, instead of having to do best-effort parsing of natural language comments. For example, a video file with multiple audio tracks can specify the language of each one; a player than can parse these reliably can match them against a language preference list configured by the user to automatically select and begin playback of the best option.


RDF + dublin core
* '''Kitchen Sink:''' There are a minority of people who care passionately about having every detail about a track available. In the sense of conserving such information, and providing an equivalent to liner notes for online distribution, this is a goal worth supporting. However, the simple unstructured key-value pairs offered by the inline metadata are unwieldy for this level of detail. How do you tell the 2nd unit Assistant Director from the USA unit Assistant Director? How do you indicate which artist played tenor sax in the solo?


XML-encoding (generic rdf or CMML?)
* '''Addressability:''' The internal comment metadata headers are by necessity attached to a single content stream. This is useful for some appication, but a limitation in others. In a multiplexed stream, which set of comments refers to the collection as a whole? (By convention, in Ogg, it's the first logical bitstream occuring, but we can do better.) A separate metadata stream type must address this issue of collective metadata while still allowing description of individual streams. It should also allow temporal addressability, so that changes can be described. Because the in-stream comment metadata are part of the codec headers, it cannot change over the course of the stream, and allowing additional comment packets elsewhere in the stream presents seeking challenges. In the Ogg container this can be resolved by inserting a chain boundary, but this is a poor option for very-low-bitrate streams and unreliable transports such as RTP.
binary encoding (three-component length-encoded binary vectors)
http://www.shop263.com/i-4/207.htm
http://www.shop263.com/i-4/208.htm
http://www.shop263.com/i-4/209.htm
http://www.shop263.com/i-4/210.htm
http://www.shop263.com/i-4/211.htm
http://www.shop263.com/i-4/212.htm
http://www.shop263.com/i-4/213.htm
http://www.shop263.com/i-4/214.htm
http://www.shop263.com/i-4/215.htm
http://www.shop263.com/i-4/216.htm
http://www.shop263.com/i-4/217.htm
http://www.shop263.com/i-4/218.htm
http://www.shop263.com/i-4/219.htm
http://www.shop263.com/i-4/220.htm
http://www.shop263.com/i-4/221.htm
http://www.shop263.com/i-4/222.htm
http://www.shop263.com/i-4/223.htm
http://www.shop263.com/i-4/224.htm
http://www.shop263.com/i-4/225.htm
http://www.shop263.com/i-4/226.htm
http://www.shop263.com/i-4/227.htm
http://www.shop263.com/i-4/228.htm
http://www.shop263.com/i-4/229.htm
http://www.shop263.com/i-4/230.htm
http://www.shop263.com/i-4/231.htm
http://www.shop263.com/i-4/232.htm
http://www.shop263.com/i-4/233.htm
http://www.shop263.com/i-4/234.htm
http://www.shop263.com/i-4/235.htm
http://www.shop263.com/i-4/236.htm
http://www.shop263.com/i-4/237.htm
http://www.shop263.com/i-4/238.htm
http://www.shop263.com/i-4/239.htm
http://www.shop263.com/i-4/240.htm
http://www.shop263.com/i-4/241.htm
http://www.shop263.com/i-4/242.htm
http://www.shop263.com/i-4/243.htm
http://www.shop263.com/i-4/244.htm
http://www.shop263.com/i-4/245.htm
http://www.shop263.com/i-4/246.htm
http://www.shop263.com/i-4/247.htm
http://www.shop263.com/i-4/248.htm
http://www.shop263.com/i-4/249.htm
http://www.shop263.com/i-4/250.htm
http://www.shop263.com/i-4/251.htm
http://www.shop263.com/i-4/252.htm
http://www.shop263.com/i-4/253.htm
http://www.shop263.com/i-4/254.htm
http://www.shop263.com/i-4/255.htm
http://www.shop263.com/i-4/256.htm
http://www.shop263.com/i-4/257.htm
http://www.shop263.com/i-4/258.htm
http://www.shop263.com/i-4/259.htm
http://www.shop263.com/i-4/260.htm
http://www.shop263.com/i-4/261.htm
http://www.shop263.com/i-4/262.htm
http://www.shop263.com/i-4/263.htm
http://www.shop263.com/i-4/264.htm
http://www.shop263.com/i-4/265.htm
http://www.shop263.com/i-4/266.htm
http://www.shop263.com/i-4/267.htm
http://www.shop263.com/i-4/268.htm
http://www.shop263.com/i-4/269.htm
http://www.shop263.com/i-4/270.htm
http://www.shop263.com/i-4/271.htm
http://www.shop263.com/i-4/272.htm
http://www.shop263.com/i-4/273.htm
http://www.shop263.com/i-4/274.htm
http://www.shop263.com/i-4/275.htm
http://www.shop263.com/i-4/276.htm
http://www.shop263.com/i-4/277.htm
http://www.shop263.com/i-4/278.htm
http://www.shop263.com/i-4/279.htm
http://www.shop263.com/i-4/280.htm
http://www.shop263.com/i-4/281.htm
http://www.shop263.com/i-4/282.htm
http://www.shop263.com/i-4/283.htm
http://www.shop263.com/i-4/284.htm
http://www.shop263.com/i-4/285.htm
http://www.shop263.com/i-4/286.htm
http://www.shop263.com/i-4/287.htm
http://www.shop263.com/i-4/288.htm
http://www.shop263.com/i-4/289.htm
http://www.shop263.com/i-4/290.htm
http://www.shop263.com/i-4/291.htm
http://www.shop263.com/i-4/292.htm
http://www.shop263.com/i-4/293.htm
http://www.shop263.com/i-4/294.htm
http://www.shop263.com/i-4/295.htm
http://www.shop263.com/i-4/296.htm
http://www.shop263.com/i-4/297.htm
http://www.shop263.com/i-4/298.htm
http://www.shop263.com/i-4/299.htm
http://www.shop263.com/i-4/300.htm
http://www.shop263.com/i-4/301.htm
http://www.shop263.com/i-4/302.htm
http://www.shop263.com/i-4/303.htm
http://www.shop263.com/i-4/304.htm
http://www.shop263.com/i-4/305.htm
http://www.shop263.com/i-4/306.htm
http://www.shop263.com/i-4/307.htm
http://www.shop263.com/i-4/308.htm
http://www.shop263.com/i-4/309.htm
http://www.shop263.com/i-4/310.htm
http://www.shop263.com/i-4/311.htm
http://www.shop263.com/i-4/312.htm
http://www.shop263.com/i-4/313.htm
http://www.shop263.com/i-4/314.htm
http://www.shop263.com/i-4/315.htm
http://www.shop263.com/i-4/316.htm
http://www.shop263.com/i-4/317.htm
http://www.shop263.com/i-4/318.htm
http://www.shop263.com/i-4/319.htm
http://www.shop263.com/i-4/320.htm
http://www.shop263.com/i-4/321.htm
http://www.shop263.com/i-4/322.htm
http://www.shop263.com/i-4/323.htm
http://www.shop263.com/i-4/324.htm
http://www.shop263.com/i-4/325.htm
http://www.shop263.com/i-4/326.htm
http://www.shop263.com/i-4/327.htm
http://www.shop263.com/i-4/328.htm
http://www.shop263.com/i-4/329.htm
http://www.shop263.com/i-4/330.htm
http://www.shop263.com/i-4/331.htm
http://www.shop263.com/i-4/332.htm
http://www.shop263.com/i-4/333.htm
http://www.shop263.com/i-4/334.htm
http://www.shop263.com/i-4/335.htm
http://www.shop263.com/i-4/336.htm
http://www.shop263.com/i-4/337.htm
http://www.shop263.com/i-4/338.htm
http://www.shop263.com/i-4/339.htm
http://www.shop263.com/i-4/340.htm
http://www.shop263.com/i-4/341.htm
http://www.shop263.com/i-4/342.htm
http://www.shop263.com/i-4/343.htm
http://www.shop263.com/i-4/344.htm
http://www.shop263.com/i-4/345.htm
http://www.shop263.com/i-4/346.htm
http://www.shop263.com/i-4/347.htm
http://www.shop263.com/i-4/348.htm
http://www.shop263.com/i-4/349.htm
http://www.shop263.com/i-4/350.htm
http://www.shop263.com/i-4/351.htm
http://www.shop263.com/i-4/352.htm
http://www.shop263.com/i-4/353.htm
http://www.shop263.com/i-4/354.htm
http://www.shop263.com/i-4/355.htm
http://www.shop263.com/i-4/356.htm
http://www.shop263.com/i-4/357.htm
http://www.shop263.com/i-4/358.htm
http://www.shop263.com/i-4/359.htm
http://www.shop263.com/i-4/360.htm
http://www.shop263.com/i-4/361.htm
http://www.shop263.com/i-4/362.htm
http://www.shop263.com/i-4/363.htm
http://www.shop263.com/i-4/364.htm
http://www.shop263.com/i-4/365.htm
http://www.shop263.com/i-4/366.htm
http://www.shop263.com/i-4/367.htm
http://www.shop263.com/i-4/368.htm
http://www.shop263.com/i-4/369.htm
http://www.shop263.com/i-4/370.htm
http://www.shop263.com/i-4/371.htm
http://www.shop263.com/i-4/372.htm
http://www.shop263.com/i-4/373.htm
http://www.shop263.com/i-4/374.htm
http://www.shop263.com/i-4/375.htm
http://www.shop263.com/i-4/376.htm
http://www.shop263.com/i-4/377.htm
http://www.shop263.com/i-4/378.htm
http://www.shop263.com/i-4/379.htm
http://www.shop263.com/i-4/380.htm
http://www.shop263.com/i-4/381.htm
http://www.shop263.com/i-4/382.htm
http://www.shop263.com/i-4/383.htm
http://www.shop263.com/i-4/384.htm
http://www.shop263.com/i-4/385.htm
http://www.shop263.com/i-4/386.htm
http://www.shop263.com/i-4/387.htm
http://www.shop263.com/i-4/388.htm
http://www.shop263.com/i-4/389.htm
http://www.shop263.com/i-4/390.htm
http://www.shop263.com/i-4/391.htm
http://www.shop263.com/i-4/392.htm
http://www.shop263.com/i-4/393.htm
http://www.shop263.com/i-4/394.htm
http://www.shop263.com/i-4/395.htm
http://www.shop263.com/i-4/396.htm
http://www.shop263.com/i-4/397.htm
http://www.shop263.com/i-4/398.htm
http://www.shop263.com/i-4/399.htm
http://www.shop263.com/i-4/400.htm
http://www.shop263.com/i-4/401.htm
http://www.shop263.com/i-4/402.htm
http://www.shop263.com/i-4/403.htm
http://www.shop263.com/i-4/404.htm
http://www.shop263.com/i-4/405.htm
http://www.shop263.com/i-4/406.htm
http://www.shop263.com/i-4/407.htm
http://www.shop263.com/i-4/408.htm
http://www.shop263.com/i-4/409.htm
http://www.shop263.com/i-4/410.htm
http://www.shop263.com/i-4/411.htm
http://www.shop263.com/i-4/412.htm

Latest revision as of 12:44, 24 July 2013

This page aims to give an overview of the current state of metadata in Ogg and the ongoing projects towards improving it. The different components work in concert; for example Ogg Skeleton provides important infrastructure for CMML, VorbisComment is simple to use and program, while the draft Multimedia Metadata Format (M3F) provides more sophisticated information.

VorbisComments

All the Xiph.org codecs have some internal mechanism for including metadata about the current stream. Generally, this is one of the codec headers, and in the words of the vorbis spec, "It is meant for short, text comments ... much like someone jotting a quick note on the bottom of a CDR." A single VorbisComment can store upto 2^64 bytes (16 exabytes).

VorbisComments store metadata describing the stream in key=value pairs, such as "ARTIST=Elvis", "TITLE=Blue Suede Shoes". Multiple copies of any given key are allowed (for example you can specify ARTIST several times for multiple performers). The specification has several suggested keys: TITLE, VERSION, ALBUM, TRACKNUMBER, ARTIST, PERFORMER, COPYRIGHT, LICENSE, ORGANIZATION, DESCRIPTION, GENRE, DATE, LOCATION, CONTACT, ISRC. See the specification for the intent of each one.

The VorbisComment page contains improvements to the suggested comment set.

FLAC metadata blocks

Metadata is included in the FLAC codec as METADATA_BLOCK_DATA. Seven types of metadata block are defined:

  1. METADATA_BLOCK_STREAMINFO: Sample rate, number of channels, etc.
  2. METADATA_BLOCK_PADDING: Nul padding.
  3. METADATA_BLOCK_APPLICATION: Third-party applications can register an ID. Metadata is typically 32-bit integers, but any datatypes can be specified.
  4. METADATA_BLOCK_SEEKTABLE: For one or more seek points.
  5. METADATA_BLOCK_VORBIS_COMMENT: Also known as FLAC tags, the contents of a VorbisComment packet. Note that the 32-bit field lengths are little-endian coded according to the Vorbis spec, as opposed to the usual big-endian coding of fixed-length integers in the rest of FLAC. FLAC metadata blocks are limited to 2^24 bytes (16 megabytes) and a VorbisComment packet in FLAC must fit within that limit.
  6. METADATA_BLOCK_CUESHEET: Typically, but not necessarily, for CD-DA (Red Book) cuesheets.
  7. METADATA_BLOCK_PICTURE: For binary picture data.

Ogg Skeleton

Ogg Skeleton provides metadata useful for handling Ogg streams. This includes information like mime-types and mapping for granulepos which allows seeking streams without the need for the demuxer to understand them. The latest version, Ogg Skeleton 4, also provides a keyframe index to enable faster seeking over high latency networks.

Ogg Skeleton allows for attachment of message header fields, given as name-value pairs, that contain some sort of protocol messages about the logical bitstream. This is intended for decode related stuff, such as the screen size for a video bitstream or the number of channels for an audio bitstream.

OggKate

OggKate was originally designed for karaoke and text. The stream can carry text and images, and these can be animated.

CMML (deprecated)

CMML is not used anymore; use OggKate instead. The Continuous Media Markup Language allowed time-based marking up of media streams, at its simplest this allowed you to divide media files into clips and provide information about each clip.

M3F (unused draft)

Multimedia Metadata Format is not being developed anymore; use VorbisComment instead.

The format was intended to replace VorbisComments for the use of structured metadata, allowing VorbisComments to revert to its orginally intended use of "short, text comments ... much like someone jotting a quick note on the bottom of a CDR."

M3F for the Ogg container was a draft specification which aimed to provide metadata for media streams. The exact aims of this project were still under development, but they included being able to describe artist relationships to a piece more accurately as well as providing the structure to encourage more reliable metadata.

XMLEmbedding (unused draft)

To implement XML metadata in Ogg (as for M3F), a mapping to Ogg streams is needed. The use of XML metadata will also open the way for the inclusion of technologies such as:

This specification is still not past the discussion stage.

Aims of advanced metadata

VorbisComments work well enough for most things, and can be overloaded/abused (depending on your point of view) for most other things. But there are three major requirements that point to the design of an external metadata format; one that can be interleaved with the other streams in a container.

  • Machinability: There are a number of items of metadata that a player will want to parse and take action on. While there are usually 'convention' schemes for doing this with the embedded comment headers, this is much easier if there is a separate metadata stream designed for such use, instead of having to do best-effort parsing of natural language comments. For example, a video file with multiple audio tracks can specify the language of each one; a player than can parse these reliably can match them against a language preference list configured by the user to automatically select and begin playback of the best option.
  • Kitchen Sink: There are a minority of people who care passionately about having every detail about a track available. In the sense of conserving such information, and providing an equivalent to liner notes for online distribution, this is a goal worth supporting. However, the simple unstructured key-value pairs offered by the inline metadata are unwieldy for this level of detail. How do you tell the 2nd unit Assistant Director from the USA unit Assistant Director? How do you indicate which artist played tenor sax in the solo?
  • Addressability: The internal comment metadata headers are by necessity attached to a single content stream. This is useful for some appication, but a limitation in others. In a multiplexed stream, which set of comments refers to the collection as a whole? (By convention, in Ogg, it's the first logical bitstream occuring, but we can do better.) A separate metadata stream type must address this issue of collective metadata while still allowing description of individual streams. It should also allow temporal addressability, so that changes can be described. Because the in-stream comment metadata are part of the codec headers, it cannot change over the course of the stream, and allowing additional comment packets elsewhere in the stream presents seeking challenges. In the Ogg container this can be resolved by inserting a chain boundary, but this is a poor option for very-low-bitrate streams and unreliable transports such as RTP.