If you don't find an answer, please click here to post your question.

Universal MRSS: Source With Extension

0 Kudos
Started ‎09-20-2017 by
Modified ‎09-20-2017 by

Universal MRSS: Source With Extension

by Community Manager on ‎09-20-2017 09:42 AM (217 Views)

Use the following Universal MRSS feed if you need the source file extension.

This feed will return the highest resolution preview image for the enlisted videos.

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:fh="http://purl.org/syndication/history/1.0"
xmlns:ooyala="http://www.ooyala.com/mrss/">
<channel>
<title>Sample MRSS Feed</title>
<description>Sample MRSS Feed using Universal Syndications</description>
<link>http://www.exampledomain.com</link>{% for asset in assets %}{% if asset.asset_type == "video" %}
<item>
<title>{{asset.name | escape}}</title>
<description>{{asset.description | escape}}</description>
<guid isPermaLink="false">{{asset.embed_code}}</guid>
<pubDate>{{asset.created_at}}</pubDate>
<media:title>{{asset.name | escape}}</media:title>
<media:description>{{asset.description | escape}}</media:description>
<media:thumbnail url="{{asset.preview_image[max width].url}}" width="{{asset.preview_image[max width].width}}" height="{{asset.preview_image[max width].height}}"></media:thumbnail>
<media:category scheme="http://www.ooyala.com">/Universal Syndicatiom</media:category>
<ooyala:metadata name="migrate__orig_filename">{{ asset.original_file_name }}</ooyala:metadata>
<content_type>{% if asset.original_file_name contains '.f4v' %}video/x-f4v{% endif %}{% if asset.original_file_name contains '.flv' %}video/x-flv{% endif %}{% if asset.original_file_name contains '.m4a' %}audio/mp4a-latm{% endif %}{% if asset.original_file_name contains '.m4v' %}video/x-m4v{% endif %}{% if asset.original_file_name contains '.mov' %}video/quicktime{% endif %}{% if asset.original_file_name contains '.mp3' %}audio/mpeg{% endif %}{% if asset.original_file_name contains '.mp4' %}video/mp4{% endif %}{% if asset.original_file_name contains '.mpg' %}video/mpeg{% endif %}{% if asset.original_file_name contains '.wav' %}audio/x-wav{% endif %}{% if asset.original_file_name contains '.wmv' %}video/x-ms-wmv{% endif %}</content_type>
{% for stream in asset.streams %}{% if stream.container == "NA" %}<link>{{stream.url | escape}}</link>{% endif %}{% endfor %}
<media:content url="{{asset.streams[flash_enabled].url | escape}}"
fileSize="{{asset.streams[flash_enabled].file_size}}"
duration="{{asset.duration | divided_by:100}}"
medium="video"
expression="full">
</media:content>
<dcterms:valid>start={{asset.flight_start_time}};
end={{asset.flight_end_time}};scheme=W3C-DTF</dcterms:valid>
</item>{% endif %}{% endfor %}
</channel>
</rss>