From XiphWiki
Jump to navigation Jump to search

See other suggested metadata methods.

This document describes the proposed Multimedia Metadata Format (M3F) for the Ogg Container. The format is built on the Extensible Markup Language (XML). It is intended to describe any kind of multimedia (audio, video, text, images, …) that can reside in an Ogg container.

HELP IS NEEDED!! See the ogg-dev email list or contribute directly to the wiki.

Format description

The basics

No element except the ‘metadata’ element is required. Though some elements have required attributes when those elements are used.

‘xml:lang’ and ‘xml:base’ attributes may be used on any element.

All date attributes and elements must be formatted as per the ISO 8601:2000 International Date and Time Format standard.

XML declaration and name spaces

A metadata document must have a standard XML declaration on the very first line. The XML deceleration must contain the ‘version’ and ‘encoding’ attributes; as shown in the below example:

<?xml version="1.0" encoding="UTF-8" ?>

The ‘metadata’ element is required as the top level container. It must contain at least one XML name space defining the format via the ‘xmlns’ attribute. (The URL used in the example is not the final address as no name space have been created yet.)

<metadata xmlns="http://xmlns.xiph.org/metadata/0.1/">

The Multimedia Metadata Format can be extended by including multiple XML name spaces to the ‘metadata’ element. As with any other XML format: Software may not add, modify, or expect elements and attributes not defined by a XML name space.

Container media resources

Media resources in the stream is described as ‘resource’ children of the ‘metadata’ element. Each resource element must have a ‘oggserial’ linking it to the correct chunk in the stream. It must also have a ‘type’ attribute with the native MIME type of the resource.

<resource oggserial="0xEXAMPLE" type="audio/vorbis">

Resource elements can also have an optional unique ‘id’ attribute. The ‘id’ attribute is used as a label when the resource needs to be addressed by another resource element.

<resource id="unique-resource-id" […]>

Full example

(Deprecated. Will be updated later.)

<?xml version="1.0" encoding="UTF-8" lang="en" base="./" ?>
<metadata xmlns="http://xmlns.xiph.org/media-metadata/0.1/">
	<video type="video/theora" />
	<image type="application/svg+xml" />
	<text type="text/plain" />
	<audio type="audio/flac" oggserial="audio.flac">
		<title>Sink To the Bottom</title>
		<collection track="2" tracks="12" date="1996-10-01" uri="urn:x-isrc:0123456789">
			<title>Fountains of Wayne</title>
			<artwork uri="#embedded-image" /></collection>
		<collection track="1" tracks="1" date="1997">
			<title>Sink To the Bottom</title></collection>
			<person role="vocal">Chris Collingwood</person>
			<person role="instrument vocal" title="base">Adam Schlesinger</person>
			<person role="vocal instrument" title="guitar and vocals">Jody Porter</person>
			<person role="instruments" title="drums">Brian Young</person>
			<organisation role="ensemble">Some People in the Background</organisation>
			<person role="producer">Person behind the Glass Wall</person>
			<organisation role="label" uri="http://recording-people.com/">Recording Company</organisation></entities>
		<rights date="2018">℗ 2008 Recording Company. All distribution rights reserved.</rights>
		<location>China, Earth</location>
			<quality compression="8" />
			<source media="cd" uri="urn:x-isrc:0123456789" />
			<software title="flac" version="2.2" uri="http://xiph.org/flac/" /></encoding></audio></metadata>


  • 2007-09-08 – Wiki page created based on original format and suggestsion from the email list.
  • 2007-09-06 – Format suggested on Xiph's ogg-dev email list by Daniel Aleksandersen.