Media rss media group element

From Bjoern Hassler's website
Jump to: navigation, search
syndication  |  resource discovery  |  formats  |  Syndication and metadata  |  Using media rss to syndicate and share media  |  Media rss media group element  |  Overview of images in rss  |  Category:Syndication
Using Yahoo media for content aggregation
Working with Yahoo Media
Using media rss to syndicate and share media
Example feeds
Formats
metafeed
feedheader
short item
full item
The yahoo media content and group elements
Enclosures in yahoo media, rss, and atom
Media rss media group element
Media rss media group alternatives scheme
Appendix
Atom media extension
Overview of images in rss

Printing and index

1 A reasonably complete media:group tag[edit]

Having looked at yahoo media vs. atom/rss in the previous chapter, we now retun to yahoo media and examine what a reasonably complete group/content set would look like.

2 Media:content[edit]

2.1 The basic media:content element[edit]

The media rss spec (http://search.yahoo.com/mrss) gives this example:

     <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" />

This is a good specification of the video, but it doesn't include everything that we need. Let's start with some less important attributes: For general purposes I would be happy to not have

              framerate="25"
              samplingrate="44.1"
              channels="2"

but where possible these should be added.

2.2 Adding flash compatibility information[edit]

There is some additional information we would like. The issue is that a desktop player would be able to download the video, and make further decisions based on the video itself. That's why the rss enclosure can be fairly simple: Once the client (e.g. itunes) has got the file, it can work out what bitrate etc it is.

However, if we want to reused the video on a remote site, we don't want to download the video to get extra information, hence we need the extra information given in the media:content element (as opposed to the rss enclosure). One important factor for media encoded with the mp4/m4v containers is the particular codec used. If that codec is H.264/AAC with fast start, we can play such a file in flash, otherwise we can't (see Flash H.264). We can of course make an assumption, e.g. that all m4v file are H.264, while all mp4 files are mpeg4 part 2. To specify this explicitly, we can follow the recommendations on Media RSS Extension and add:

   smn:videocodec="H.264"
   smn:audiocodec="AAC"
   smn:QTFastStart="yes"

or perhaps just

   smn:flashcompatible="yes"

(we don't need to say what version of flash: mp4 content only plays in flash 9 anyway). At a recent workshop, we decided that the second solution would be better, in the form of

  smn:FlashCompatible="9.0.115.0"

which would also allow the distinction of an flv in flash 7 format vs. an flv in flash 8 format.

2.3 Adding 'transport' information[edit]

             s:transport="streaming,pseudostreaming,download"

2.4 Alternative delivery via torrent[edit]

<media:p2p ... />

2.5 Adding version control[edit]

There some circumstances, such as off-line caching, distribution scenarios via file sharing, re-use and re-mixing of media objects, where an unique identifier per media:content element may be import.

We suggest three mechanisms to do this: doi / updated / version:

     <media:content 
              url="http://www.foo.com/movie.mov" 
              smn:version="<string>" >
      </media:content>

WIth some feed readers, if the guid/date of the feed doesn't change, the record won't be updated. So make sure the date changes.

2.6 Adding a hash[edit]

Ideally these would also be added to the file as metadata. In addition a hash

 <media:content><media:hash algo="md5">...</media:hash></media:content>

would be good, to be able to verify the media.

2.7 Outcomes[edit]

This gives:

     <media:content 
              url="http://www.foo.com/movie.mov" 
              fileSize="12216320" 
              type="video/quicktime"
              medium="video"
              isDefault="true" 
              expression="full" 
              bitrate="128" 
              height="200"
              width="300" 
              duration="185" 
              smn:FlashCompatible="9.0.115.0"
              smn:transport=""
              smn:torrent=""
              lang="en" />

as a fairly complete media:content tag. With this information, the video itself can be reused on a remote site, without having to inspect the video itself.

3 The media:group[edit]

3.1 Specifying alternative formats via the media:group[edit]

In principle, alternative formats can be placed into the same media:group. These could be alernative video formats, e.g.

<media:group>

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

  <media:content url="http://www.foo.com/movie.avi" fileSize="30540800"
    type="video/msvideo" medium="video" isDefault="true"
    expression="full" bitrate="1280" duration="185" height="400" width="600" lang="en" />

</media:group>

But the media group should also include audio versions, slides (e.g. for talks/lectures), and transcripts:

<media:group>

  <media:content url="http://www.foo.com/movie.mp3" fileSize="12216320"
    type="video/quicktime" medium="audio" isDefault="false"
    expression="full" bitrate="32" duration="185" lang="en" />

  <media:content url="http://www.foo.com/movie_slides.pdf" fileSize="522163"
    type="application/pdf" medium="document" isDefault="false"
    expression="full" lang="en" />

  <media:content url="http://www.foo.com/movie_transcript.txt" fileSize="251564"
    type="text/plain" medium="document" isDefault="false"
    expression="full" lang="en" />

<media:group>

4 Additional metadata with the media:group and media:content[edit]

One issue is how to distinguish these different items? This cannot be done through the media:content attributes.

However, in yahoo media, the following elements can be sub-elements of <channel>, <item>, <media:content> and/or <media:group>: <media:rating> <media:title> <media:description> <media:keywords> <media:thumbnail> <media:category> <media:hash> <media:player> <media:credit> <media:copyright> <media:text> <media:restriction>. More information at http://search.yahoo.com/mrss/.

So you can do something like:

<media:group>
	 <media:content url="file.wmv">
		  <media:title>The item in windows media format</media:title>
		  <media:description>The item in windows media format</media:description>
                  <media:category>Some category</media:category>
 	 </media:content>
	 <media:content url="file.m4v">
		  <media:title>The item in ipod format</media:title>
		  <media:description>The item in ipod format</media:description>
                  <media:category>Some category</media:category>
	 </media:content>
</media:group>

4.1 Step 3: specify the nature of the media alternatives in the media:category[edit]

For details, and rationale, see media rss media group alternatives. Essentially the related page w:media rss media group alternatives specifies a scheme for distinguishing various media:content elements within a media group. The idea is to introduce a scheme that describes media:content items further:

<media:category scheme="http://www.sciencemedianetwork.org/mrmgas" label="slides">slides</media:category>

This would give (version 1):

<media:group>

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

  <media:content url="http://www.foo.com/movie.avi" fileSize="30540800"
    type="video/msvideo" medium="video" isDefault="true"
    expression="full" bitrate="128" duration="1850" height="400" width="600" lang="en" />

  <media:content url="http://www.foo.com/movie.mp3" fileSize="12216320"
    type="video/quicktime" medium="audio" isDefault="false"
    expression="full" bitrate="32" duration="185" lang="en">
    <media:category scheme="http://www.sciencemedianetwork.org/mrmgas" label="audio track">audio track</media:category>
  </media:content>

  <media:content url="http://www.foo.com/movie_slides.pdf" fileSize="522163"
    type="application/pdf" medium="document" isDefault="false"
    expression="full" lang="en">
    <media:category scheme="http://www.sciencemedianetwork.org/mrmgas" label="slides">slides</media:category>
  </media:content>
 
  <media:content url="http://www.foo.com/movie_transcript.txt" fileSize="251564"
    type="text/plain" medium="document" isDefault="false"
    expression="full" lang="en">
    <media:category scheme="http://www.sciencemedianetwork.org/mrmgas" label="transcript">transcript</media:category>
   </media:content>

<media:group>

You might also consider the content items to below to different media:groups, in which case you could e.g. take out the slides into a separate group ('version 2'):

<media:group>
  <media:category scheme="http://www.sciencemedianetwork.org/mrmgas" label="supplementary materials">supplementary</media:category>
  <media:content url="http://www.foo.com/movie_slides.pdf" fileSize="522163"
    type="application/pdf" medium="document" isDefault="false"
    expression="full" lang="en">
    <media:category scheme="http://www.sciencemedianetwork.org/mrmgas" label="slides">slides</media:category>
  </media:content>
</media:group>