Yahoo! Search
Portada - Inicio - Ayuda

Media RSS Module - RSS 2.0 Module

Especificación de versión de "Media RSS" 1.1.2

Módulo RSS que complementa la funcionalidad de elementos <enclosure> de RSS 2.0 para permitir una distribución más eficaz de objetos multimedia.

Change Notes

12/01/2004 - Created

02/21/2005 - Major consolidation of all requested changes: [1.0.0]

08/22/2005 - Improved global syndication capabilities: [1.1.0]

10/22/2005 - Minor improvements: [1.1.1]

12/3/2008 - Correcciones del espacio de nombre: [1.1.2]

Namespace declaration

El espacio de nombre para Media RSS se define como: http://ar.video.search.yahoo.com/mrss

For example:

<rss version="2.0" xmlns:media="http://ar.video.search.yahoo.com/mrss">

NOTA: Hay una barra diagonal al final del espacio de nombre, aunque existiera cierta confusión acerca de esto en versiones previas.

Descripción

"Media RSS" es un módulo RSS nuevo que complementa la funcionalidad <enclosure> de RSS 2.0. Los enclosures RSS ya se usan para distribuir archivos de audio e imágenes. Media RSS extiende enclosures para manejar otros tipos de contenido, como películas cortas o TV, además de brindar metadatos adicionales con los medios. Media RSS permite que los editores de contenidos y de blogs distribuyan contenido multimedia como clips de televisión y video, películas, imágenes y audio.

Primary Elements

<media:group>

<media:group> is a sub-element of <item>. It allows grouping of <media:content> elements that are effectively the same content, yet different representations.   For instance: the same song recorded in both the WAV and MP3 format. Es un elemento opcional que sólo se debe usar para este fin.

<media:content>

<media:content> is a sub-element of either <item> or <media:group>. Media objects that are not the same content should not be included in the same <media:group> element.  The sequence of these items implies the order of presentation. While many of the attributes appear to be audio/video specific, this element can be used to publish any type of media. It contains 14 attributes, most of which are optional.

 
        <media:content 
               url="http://www.foo.com/movie.mov" 
               fileSize="12216320" 
               type="video/quicktime"
               medium="video"
               isDefault="true" 
               expression="full" 
               bitrate="128" 
               framerate="25"
               samplingrate="44.1"
               channels="2"
               duration="185" 
               height="200"
               width="300" 
               lang="en" />

url should specify the direct url to the media object. If not included, a <media:player> element must be specified.

fileSize is the number of bytes of the media object. It is an optional attribute.

type is the standard MIME type of the object. It is an optional attribute.

medium is the type of object (image | audio | video | document | executable). While this attribute can at times seem redundant if type is supplied, it is included because it simplifies decision making on the reader side, as well as flushes out any ambiguities between MIME type and object type. It is an optional attribute.

isDefault determina si éste es el objeto predefinido que se debe usar para <media:group>. Sólo debe haber un objeto predeterminado por <media:group>. It is an optional attribute.

expression determines if the object is a sample or the full version of the object, or even if it is a continuous stream (sample | full | nonstop). Default value is 'full'. It is an optional attribute.

bitrate is the kilobits per second rate of media. It is an optional attribute.

framerate is the number of frames per second for the media object. It is an optional attribute.

samplingrate is the number of samples per second taken to create the media object. It is expressed in thousands of samples per second (kHz). It is an optional attribute.

channels is number of audio channels in the media object. It is an optional attribute.

duration is the number of seconds the media object plays. It is an optional attribute.

height es la altura del objeto de medios. It is an optional attribute.

width es el ancho del objeto de medios. It is an optional attribute.

lang es el lenguaje primario encapsulado en el objeto de medios. Los códigos de lenguaje posibles se detallan en RFC 3066. Este atributo se utiliza de manera similar al atributo xml:lang que se detalla en la Especificación XML 1.0 (Tercera Edición). It is an optional attribute.

These optional attributes, along with the optional elements below, contain the primary metadata entries needed to index and organize media content. Additional supported attributes for describing images, audio, and video may be added in future revisions of this document.

Nota: <media:content> y <media:group> no tienen limitaciones en el número de veces que pueden aparecer; la naturaleza de RSS se debe conservar: un <item> representa una "historia". Simply stated, this is similar to the blog style of syndication. However, if one is using this module to strictly publish media, there should be one <item> element for each media object/group. Esto es para permitir la atribución adecuada para el origen del contenido de medios a través del elemento <link>. It also allows the full benefit of the other RSS elements to be realized.

Optional Elements

The following elements are optional and may appear as sub-elements of <channel>, <item>, <media:content> and/or <media:group>.

When an element appears at a shallow level, such as <channel> or <item>, it means that the element should be applied to every media object within its scope.

Duplicated elements appearing at deeper levels of the document tree have higher priority over other levels. Por ejemplo, los elementos de nivel <media:content> se ven favorecidos sobre aquellos de nivel <item>. The priority level is listed from strongest to weakest: <media:content>, <media:group>, <item>, <channel>.

<media:adult>

[NOTE: This is deprecated, and has been replaced with the more flexible <media:rating>]

<media:rating>

Esto permite que se declare la audiencia permisible. Si no se incluye este elemento, supone que no es necesaria ninguna restricción. Tiene un atributo opcional.

               <media:rating scheme="urn:simple">adult</media:rating>
               <media:rating scheme="urn:icra">r (cz 1 lz 1 nz 1 oz 1 vz 1)</media:rating>
               <media:rating scheme="urn:mpaa">pg</media:rating>
               <media:rating scheme="urn:v-chip">tv-y7-fv</media:rating>

scheme is the URI that identifies the rating scheme. It is an optional attribute. If this attribute is not included, the default scheme is urn:simple (adult | nonadult).

<media:title>

El título del objeto de medios en particular. Tiene 1 atributo opcional.

        <media:title type="plain">The Judy's - The Moo Song</media:title>

type especifica el tipo de texto incrustado. Los valores posibles son 'simple' o 'html'. El valor predeterminado es 'simple'. Todo el html debe ser codificado por entidad. Es un atributo opcional.

<media:description>

Short description describing the media object typically a sentence in length. It has 1 optional attribute.

        <media:description type="plain">This was some really bizarre band I listened to as a young lad.</media:description>

type especifica el tipo de texto incrustado. Los valores posibles son 'simple' o 'html'. El valor predeterminado es 'simple'. Todo el html debe ser codificado por entidad. Es un atributo opcional.

<media:keywords>

Highly relevant keywords describing the media object with typically a maximum of ten words. The keywords and phrases should be comma delimited.

        <media:keywords>kitty, cat, big dog, yarn, fluffy</media:keywords>

<media:thumbnail>

Allows particular images to be used as representative images for the media object. If multiple thumbnails are included, and time coding is not at play, it is assumed that the images are in order of importance. It has 1 required attribute and 3 optional attributes.

        <media:thumbnail url="http://www.foo.com/keyframe.jpg" width="75" height="50" time="12:05:01.123" />

url specifies the url of the thumbnail. It is a required attribute.

height specifies the height of the thumbnail. It is an optional attribute.

width specifies the width of the thumbnail. It is an optional attribute.

time especifica la diferencia de tiempo en relación con el objeto de medios. Por lo general se usa al crear varios cuadros clave dentro de un video único. El formato para este atributo debe estar en Tiempo Normal de Reproducción (NTP) de DSM-CC como se utiliza en RTSP [RFC 2326 3.6 Normal Play Time]. Es un atributo opcional.

Notas:

NTP has a second or subsecond resolution. It is specified as H:M:S.h (npt-hhmmss) or S.h (npt-sec), where H=hours, M=minutes, S=second and h=fractions of a second.

A possible alternative to NTP would be SMPTE. It is believed that NTP is simpler and easier to use.

<media:category>

Permite establecer una clasificación que da una idea del tipo de contenido multimedia y de sus contenidos concretos. It has 2 optional attributes.

        <media:category scheme="http://search.yahoo.com/mrss/category_
        schema">music/artist/album/song</media:category>

        <media:category scheme="http://dmoz.org" label="Ace Ventura - Pet 
        Detective">Arts/Movies/Titles/A/Ace_Ventura_Series/Ace_Ventura_
        -_Pet_Detective</media:category>

        <media:category scheme="urn:flickr:tags">ycantpark 
        mobile</media:category>

scheme es el URI que identifica el esquema de categorización. Es un atributo opcional. Si este atributo no se incluye, el esquema predeterminado es ‘http://ar.video.search.yahoo.com/mrss/category_schema’.

label es la etiqueta legible que se puede mostrar en las aplicaciones de usuario final. It is an optional attribute.

<media:hash>

This is the hash of the binary media file. It can appear multiple times as long as each instance is a different algo. It has 1 optional attribute.

        <media:hash algo="md5">dfdec888b72151965a34b4b59031290a</media:hash>

algo indica el algoritmo utilizado para crear el código hash. Los valores posibles son 'md5' y 'sha-1'. El valor predeterminado es 'md5'. Es un atributo opcional.

<media:player>

Allows the media object to be accessed through a web browser media player console. Se requiere este elemento sólo si no se especifica un atributo directo de medios url en el elemento <media:content>. It has 1 required attribute, and 2 optional attributes.

        <media:player url="http://www.foo.com/player?id=1111" height="200" width="400" />

url es la URL de la consola de reproducción que reproduce el medio. It is a required attribute.

height es la altura de la ventana del navegador en que se debe abrir url. Es un atributo opcional.

width is the width of the browser window that the url should be opened in. Es un atributo opcional.

<media:credit>

Notable entity and the contribution to the creation of the media object. Current entities can include people, companies, locations, etc. Specific entities can have multiple roles, and several entities can have the same role. These should appear as distinct <media:credit> elements. It has 2 optional attributes.

        <media:credit role="producer" scheme="urn:ebu">entity name</media:credit>

role specifies the role the entity played. Must be lowercase. It is an optional attribute.

scheme es el URI que identifica el esquema de roles. Es un atributo opcional. Si este atributo no se incluye, el esquema predeterminado es 'urn:ebu'. Ver: Códigos de Rol de la Unión Europea de Radiodifusión.

Example roles:

        actor
        anchor person
        author
        choreographer
        composer
        conductor
        director
        editor
        graphic designer     
        grip
        illustrator
        lyricist
        music arranger
        music group
        musician
        orchestra
        performer
        photographer
        producer
        reporter
        vocalist

Roles adicionales: Códigos de Rol de la Unión Europea de Radiodifusión

<media:copyright>

Información de copyright para objeto de medios. Tiene 1 atributo opcional.

        <media:copyright url="http://blah.com/additional-info.html">2005 FooBar Media</media:copyright>

url is the url for a terms of use page or additional copyright information. If the media is operating under a Creative Commons license, the Creative Commons module should be used instead. It is an optional attribute.

<media:text>

Allows the inclusion of a text transcript, closed captioning, or lyrics of the media content. Many of these elements are permitted to provide a time series of text. In such cases, it is encouraged, but not required, that the elements be grouped by language and appear in time sequence order based on the start time. Elements can have overlapping start and end times. It has 4 optional attributes.

        <media:text type="plain" lang="en" start="00:00:03.000" 
        end="00:00:10.000"> Oh, say, can you see</media:text>
        <media:text type="plain" lang="en" start="00:00:10.000" 
        end="00:00:17.000">By the dawn's early light</media:text>

type especifica el tipo de texto incrustado. Los valores posibles son 'simple' o 'html'. El valor predeterminado es 'simple'. Todo el html debe ser codificado por entidad. Es un atributo opcional.

lang is the primary language encapsulated in the media object. Language codes possible are detailed in RFC 3066. This attribute is used similar to the xml:lang attribute detailed in the XML 1.0 Specification (Third Edition). It is an optional attribute.

start specifies the start time offset that the text starts being relevant to the media object. An example of this would be for closed captioning. Usa el formato de código de tiempo NTP (ver: el atributo de tiempo usado en <media:thumbnail>).   Es un atributo opcional.

end especifica el tiempo final de relevancia del texto. Si no se proporciona este atributo, y se utiliza un tiempo de start, se espera que el tiempo final sea el final del clip o el inicio del siguiente elemento <media:text>.

<media:restriction>

Permite que se impongan restricciones en el agregador que pone los medios en el flujo. Actualmente, las restricciones se basan en el distribuidor (uri) y en los códigos de país. Este elemento es meramente informativo y no puede suponerse ni implicarse ninguna obligación. Only one <media:restriction> element of the same type can be applied to a media object - all others will be ignored. Las entidades en este elemento deben separarse con espacios. Para permitir que el productor declare explícitamente sus intenciones, se reservan dos literales: 'all', 'none'. Estos literales sólo pueden usarse una vez. Este elemento tiene un atributo requerido y un atributo opcional (con requisitos estrictos para su exclusión).

        <media:restriction relationship="allow" type="country">au us</media:restriction>

relationship indicates the type of relationship that the restriction represents (allow | deny). In the example above, the media object should only be syndicated in Australia and the United States. It is a required attribute.

Note: If the "allow" element is empty and the type is relationship is "allow", it is assumed that the empty list means "allow nobody" and the media should not be syndicated.

A more explicit method would be:

        <media:restriction relationship="allow" type="country">au us</media:restriction>

type especifica el tipo de restricción (país | uri) con la que el medio se puede distribuir. Es un atributo opcional; sin embargo sólo puede excluirse al utilizar uno de los valores literales "all" o "none".

"country" allows restrictions to be placed based on country code. [ISO 3166]

"uri" allows restrictions based on URI. Examples: urn:apple, http://images.google.com, urn:yahoo, etc.

Best Practices

Se recomiendan los siguientes "best practices" cuando se use Media RSS:

If your feed is not an "incremental" in the traditional RSS sense, but rather an entire snapshot of all media available, please take note of the <fh:incremental> element. This element when set to "false" correctly informs the RSS reader that the current feed replaces the previously fetched feed.

If you prefer to syndicate media more along the lines of traditional RSS, this specification also allows you to daisy chain multiple feeds together to compose a history of media that is available on your site.

En la medida de lo posible, el medio programado para caducar después de un tiempo dado debe anotarse a través del elemento <dcterms:valid> de Dublin Core.

Examples

  1. A recently created movie, using the RSS 2.0 <enclosure> element and without the use of the Media RSS module.
    <rss version="2.0">
    <channel>
    <title>Title of page</title>
    <link>http://www.foo.com</link>
    <description>Description of page</description>
        <item>
            <title>Story about something</title>
            <link>http://www.foo.com/item1.htm</link>
            <enclosure url="http://www.foo.com/file.mov" 
            length="320000" type="video/quicktime"/>
        </item>
    </channel>
    </rss>
  2. A movie review with a trailer, using a Creative Commons license.
    <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/"
    xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">
    <channel>
    <title>My Movie Review Site</title>
    <link>http://www.foo.com</link>
    <description>I review movies.</description>
        <item>
            <title>Movie Title: Is this a good movie?</title>
            <link>http://www.foo.com/item1.htm</link>
            <media:content url="http://www.foo.com/trailer.mov" 
            fileSize="12216320" type="video/quicktime" expression="sample"/>
            <creativeCommons:license>
            http://www.creativecommons.org/licenses/by-nc/1.0
            </creativeCommons:license>
            <media:rating>nonadult</media:rating>
        </item>
    </channel>
    </rss>
  3. A music video with a link to a player window, and additional metadata about the video, including expiration date.
    <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/"
    xmlns:dcterms="http://purl.org/dc/terms/">
    <channel>
    <title>Music Videos 101</title>
    <link>http://www.foo.com</link>
    <description>Discussions of great videos</description>
        <item>
            <title>The latest video from an artist</title>
            <link>http://www.foo.com/item1.htm</link>
            <media:content url="http://www.foo.com/movie.mov" fileSize="12216320" 
            type="video/quicktime" expression="full">
            <media:player url="http://www.foo.com/player?id=1111" 
            height="200" width="400"/>
            <media:hash algo="md5">dfdec888b72151965a34b4b59031290a</media:hash>
            <media:credit role="producer">producer's name</media:credit>
            <media:credit role="artist">artist's name</media:credit>
            <media:category scheme="http://blah.com/scheme">music/artist 
            name/album/song</media:category>
            <media:text type="plain">
            Oh, say, can you see, by the dawn's early light
            </media:text>
            <media:rating>nonadult</media:rating>
            <dcterms:valid>
                start=2002-10-13T09:00+01:00;
                end=2002-10-17T17:00+01:00;
                scheme=W3C-DTF
            </dcterms:valid>
            </media:content>
        </item>
    </channel>
    </rss>
  4. Several different songs that relate to the same topic.
    <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
    <channel>
    <title>Song Site</title>
    <link>http://www.foo.com</link>
    <description>Discussion on different songs</description>
        <item>
            <title>These songs make me think about blah</title>
            <link>http://www.foo.com/item1.htm</link>
            <media:content url="http://www.foo.com/band1-song1.mp3" 
            fileSize="1000" type="audio/mpeg" expression="full">
            <media:credit role="musician">member of band1</media:credit>
            <media:category>music/band1/album/song</media:category>
            <media:rating>nonadult</media:rating>
            </media:content>
            <media:content url="http://www.foo.com/band2-song1.mp3" 
            fileSize="2000" type="audio/mpeg" expression="full">
            <media:credit role="musician">member of band2</media:credit>
            <media:category>music/band2/album/song</media:category>
            <media:rating>nonadult</media:rating>
            </media:content>
            <media:content url="http://www.foo.com/band3-song1.mp3" 
            fileSize="1500" type="audio/mpeg" expression="full">
            <media:credit role="musician">member of band3</media:credit>
            <media:category>music/band3/album/song</media:category>
            <media:rating>nonadult</media:rating>
            </media:content>
        </item>
    </channel>
    </rss>
  5. Same song with multiple files at different bitrates and encodings. (Bittorrent example as well)
    <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
    <channel>
    <title>Song Site</title>
    <link>http://www.foo.com</link>
    <description>Songs galore at different bitrates</description>
        <item>
            <title>Cool song by an artist</title>
            <link>http://www.foo.com/item1.htm</link>
            <media:group>
                <media:content url="http://www.foo.com/song64kbps.mp3" 
                fileSize="1000" bitrate="64" type="audio/mpeg" 
                isDefault="true" expression="full"/>
                <media:content url="http://www.foo.com/song128kbps.mp3" 
                fileSize="2000" bitrate="128" type="audio/mpeg" 
                expression="full"/>
                <media:content url="http://www.foo.com/song256kbps.mp3" 
                fileSize="4000" bitrate="256" type="audio/mpeg" 
                expression="full"/>
                <media:content url="http://www.foo.com/song512kbps.mp3.torrent" 
                fileSize="8000" type="application/x-bittorrent;enclosed=audio/mpeg" 
                expression="full"/>
                <media:content url="http://www.foo.com/song.wav" 
                fileSize="16000" type="audio/x-wav" expression="full"/>
                <media:credit role="musician">band member 1</media:credit>
                <media:credit role="musician">band member 2</media:credit>
                <media:category>music/artist name/album/song</media:category>
                <media:rating>nonadult</media:rating>
            </media:group>
        </item>
    </channel>
    </rss>

Acknowledgements

Gracias a las personas que han contribuido a este desarrollo y a aquellas que enviaron sugerencias y correcciones. El grupo de Yahoo! "rss-media" ha sido de gran ayuda para transformar la propuesta inicial de Media RSS en un desarrollo real. Aunque ha habido muchas contribuciones de miembros de esta comunidad, agradecemos especialmente la colaboración de Danny Ayers, Marc Canter, Lucas Gonze, Vadim Zaliva, Greg Smith, Robert Sayre, Suzan Foster, Erwin van Hunen, Greg Gershman, Jennifer Kolar, Bill Kearney y Andreas Haugstrup Pedersen.

En el equipo de Yahoo!: David Hall, John Thrall, Eckart Walther, Jeremy Zawodny, Andy Volk y Bradley Horowitz.

En el equipo de Google: David Marwood y Peter Chane.


Copyright © 2009 Yahoo! All rights reserved. Privacidad / Legal - Sugiere tu sitio