Skip to content

TVersity RSS extensions

Ronen Mizrahi edited this page Jan 21, 2015 · 1 revision

TVersity RSS Extensions

These extensions apply only to RSS 2.0 with media enclosures or Yahoo Media RSS with content elements.

Background

Unlike a standard podcast catcher, TVersity does not play the enclosed media file on a personal computer, instead it streams the media to a consumer electronic device. Since consumer electronic devices are limited in the media formats they support, TVersity may need to convert the media prior to streaming it. In order to determine whether a conversion is required, TVersity reads the header of media files over the network when parsing the RSS feed.

The header read operation is done using HTTP range requests (if possible) and with a user agent of TVersity Media Robot. This allows publishers to distinguish between user initiated requests and robot requests. It also minimizes the bandwidth load on publishers since only the header/footer of files is accessed.

Publishers that wish to avoid header read operation can add to their RSS feeds additional metadata. This document describes this metadata. Please note that while these tags are optional as far as RSS feed validity is concerned, the addition of all the audio and video related tags is required (including the audio and video codecs) to minimize robot traffic. For some formats the TVersity robot traffic will be completely eliminated, while for others it will only be reduced.

RSS extensions

TVersity adds some attributes to the element and media:content element. When using the TVersity extensions, you must add a namespace declaration in your xml, like this:

<rss xmlns:tversity="http://tversity.com/schemas/podcast-1.0.xsd" version="2.0">

The enclosure element

The RSS 2.0 standard added support for media enclosures, this enabled the podcast revolution to emerge, initially for audio only and later on for video as well. Here is an example of an enclosure element, taken from the standard:

<enclosure url="http://www.scripting.com/mp3s/weatherReportSuite.mp3" length="12216320" type="audio/mpeg" />

The Media RSS standard offers a different element for enclosures (see below), leaving users of RSS 2.0 without the Media RSS extensions with no standardized way to add metadata. TVersity tries to amend that by offering such a way in a consistent manner with the Media RSS standard.

TVersity adds the following optional attributes:

  • medium is the type of object (image | audio | video | document | executable). It is an optional attribute.
  • bitrate is the kilobits per second rate of media. It is an optional attribute.
  • audioBitrate is the kilobits per second rate of the audio portion of the media. It is an optional attribute.
  • videoBitrate is the kilobits per second rate of the video portion of the media. It is an optional attribute.
  • framerate is the number of frames per second for the media object. Both a single number or two integers with a / character between them an be used. 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 is the height of the media object. It is an optional attribute.
  • width is the width of the media object. It is an optional attribute.
  • audioCodec is the audio codec of the media object. codec codes are defined below. It is an optional attribute.
  • videoCodec is the video codec of the media object. codec codes are defined below. It is an optional attribute.
  • 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

Here is an example (typical for NTSC DVD video file with surround sound):

<enclosure
    url="http://some.domain.com/somevideo.vob"
    length="1000000000"
    type="video/mpeg" 

    tversity:duration="00:26:17.000"
    tversity:bitrate="8448000"

    tversity:width="720"
    tversity:height="480"
    tversity:framerate="30000/1001"
    tversity:videoBitrate="8000000"
    tversity:videoCodec="MPEG2VIDEO"

    tversity:audioBitrate="448000"
    tversity:channels="6"
    tversity:samplingrate="48000"
    tversity:audioCodec="AC3" 
    />

The media:content element

Here is an example of an enclosure element, taken from the Media RSS standard:

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

TVersity adds the following optional attributes:

  • audioBitrate is the kilobits per second rate of the audio portion of the media. It is an optional attribute.
  • videoBitrate is the kilobits per second rate of the video portion of the media. It is an optional attribute.
  • audioCodec is the audio codec of the media object. codec codes are defined below. It is an optional attribute.
  • videoCodec is the video codec of the media object. codec codes are defined below. It is an optional attribute.

Codec Codes

For lack of an inclusive and conclusive standard for codec codes, TVersity follows the codes defined in the ffmpeg header files.

Here are some common video codes:

MPEG1VIDEO
MPEG2VIDEO
H261
H263
MJPEG
MPEG4
WMV1
WMV2
WMV3
VC1
FLV1
H264
XVID
VP6
VP6F

Here are some common audio codes:

MP2
MP3
AAC
AC3
DTS
VORBIS
DVAUDIO
WMAV1
WMAV2
WMAP (aka 0x0162)
WMAL (aka 0x0163)
FLAC
ALAC
WAVPACK

PCM_S16LE
PCM_S16BE
PCM_U16LE
PCM_U16BE
PCM_S8
PCM_U8,
PCM_MULAW
PCM_ALAW
S32LE
S32BE
U32LE
U32BE
S24LE
S24BE
24LE
U24BE