<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:media="http://search.yahoo.com/mrss/">

<channel>
	<title>Tutorials / Articles</title>
	<link>http://developer.revver.com/articles</link>
	<description>Technical articles, tutorials, and reference guides for developing Revverized applications.</description>
	<pubDate>Thu, 24 Jan 2008 02:49:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>
	<language>en</language>
			<item>
		<title>Widget Magic:  &#8220;Subverting the Lightbox Effect&#8221;</title>
		<link>http://developer.revver.com/articles/view/widget-magic-subverting-the-lightbox-effect/</link>
		<comments>http://developer.revver.com/articles/view/widget-magic-subverting-the-lightbox-effect/#comments</comments>
		<pubDate>Mon, 17 Dec 2007 22:55:08 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
		
		<category><![CDATA[Widget]]></category>

		<category><![CDATA[Tech Talk]]></category>

		<category><![CDATA[JSON]]></category>

		<guid isPermaLink="false">http://developer.revver.com/articles/view/widget-magic-subverting-the-lightbox-effect/</guid>
		<description><![CDATA[Introduction
The Revver Website widget&#8217;s default behavior is that when the user selects a thumbnail a virtual window opens ontop of the screen and presents the movie along with its pertinent meta-data.  This is done using &#8220;lightbox&#8221;, a very common javascript function seen in many websites today.
However, you may wish to use &#8220;thickbox&#8221; or &#8220;slimbox&#8221; [...]]]></description>
			<content:encoded><![CDATA[<h3>Introduction</h3>
<p>The Revver Website widget&#8217;s default behavior is that when the user selects a thumbnail a virtual window opens ontop of the screen and presents the movie along with its pertinent meta-data.  This is done using &#8220;lightbox&#8221;, a very common javascript function seen in many websites today.</p>
<p>However, you may wish to use &#8220;thickbox&#8221; or &#8220;slimbox&#8221; or even your own creation entirely.  You may also wish to add visual effects or maybe even not use a lightbox at all, but rather render the results into a DIV of your choosing.</p>
<h3>Using &#8220;onShowMovie&#8221;</h3>
<p>In fact, the widget supports all of these options, by utilizing the &#8220;onShowMovie&#8221; parameter.  When set, the &#8220;onShowMovie&#8221; parameter indicates a function or callback that will be called when the thumb is selected.</p>
<p>the entire video object is actually passed upon thumb selection, and optionally (if an affiliate is provided) the affiliateId.</p>
<p>As with any callbacks, you can either have an anonymous function in-line as part of the code, or create a separate named function that accepts the video object and the affiliateId as params.</p>
<h3>Code Examples</h3>
<p>Using the anonymous in-line callback:</p>
<pre>
// as part of the REVVER.widget.VideoCollection call:
"onShowMovie": function (video, affiliateId) {
        document.getElementbyId('rev-player').innerHTML = "";
	revverVideo.embed( {    mediaId : video.id,
                    affiliateId: affiliateId,
                    width: 480,
                    height: 392,
                    usePrivateDiv: true,
                    divId: 'rev-player' } );
}</pre>
<p>Using the named function:</p>
<pre>
// as part of the REVVER.widget.VideoCollection call:
"onShowMovie": displayMovie

// defined elsewhere in the JS code
function displayMovie(video, affiliateId) {
        document.getElementbyId('rev-player').innerHTML = "";
	revverVideo.embed( {    mediaId : video.id,
                    affiliateId: affiliateId,
                    width: 480,
                    height: 392,
                    usePrivateDiv: true,
                    divId: 'rev-player' } );
}</pre>
<p>Both of the above examples perform the same function.  In this case, they clear the contents then place a player into a div with the id &#8220;rev-player&#8221;.  Using this model, you can create just about any functionality you like.</p>
<h3>Video Object</h3>
<p>The video object being passed contains the following fields:</p>
<pre>
status,
description,
views,
author,
url,
duration,
ageRestriction,
quicktimeMediaUrl,
owner,
affiliateId,
publicationDate,
modifiedDate,
keywords,
title,
credits,
thumbnailUrl,
id</pre>
<h3>Additional Help</h3>
<p>For more detail on any of these return fields, feel free to review the JSON open.video.find specification at: <a href="/api/json/methods#openvideofind">http://developer.revver.com/api/json/methods#openvideofind</a>.</p>
<p>Note: the returnField for thumbnailUrl uses the advanced returnField functionality and returns a thumbnail that corresponds to the size you specify. If you do not specify a size for the thumbnail, then the default size of 120&#215;90 pixels is used.</p>
<p>We hope this has been useful.  Please feel free to post your examples and/or comments below.</p>
]]></content:encoded>
			<wfw:commentRss>http://developer.revver.com/articles/view/widget-magic-subverting-the-lightbox-effect/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Synchronizing Content for Syndication</title>
		<link>http://developer.revver.com/articles/view/synchronizing-content-for-syndication/</link>
		<comments>http://developer.revver.com/articles/view/synchronizing-content-for-syndication/#comments</comments>
		<pubDate>Tue, 30 Oct 2007 01:20:15 +0000</pubDate>
		<dc:creator>Revver Developer Team</dc:creator>
		
		<category><![CDATA[Tech Talk]]></category>

		<category><![CDATA[Python]]></category>

		<category><![CDATA[Syndication]]></category>

		<category><![CDATA[API]]></category>

		<guid isPermaLink="false">http://dv08x.la.revver.com/articles/view/synchronizing-content-for-syndication/</guid>
		<description><![CDATA[A common use case for Revver media is to create a local store of videos and then keep this store up to date.  This is commonly used by large syndication partners, but can be used by anyone wishing to keep track of changed videos in the Revver library.
In a given hour, 100 or so [...]]]></description>
			<content:encoded><![CDATA[<p>A common use case for Revver media is to create a local store of videos and then keep this store up to date.  This is commonly used by large syndication partners, but can be used by anyone wishing to keep track of changed videos in the Revver library.</p>
<p>In a given hour, 100 or so videos might get updated, and rather than constantly pull the same queries over and over, it&#8217;s helpful to have a &#8220;delta&#8221; of what has changed and much like rsync, just update the information you need.  This can also be useful for tracking updates made by your users.</p>
<p>This can be done rather easily, using the modifiedWithin query key and the &#8216;final&#8217; option key.</p>
<p>Example:</p>
<div class="highlight">
<pre><span style="color: #aaaaaa; font-style: italic">#!/usr/bin/python</span>

<span style="color: #0000aa">import</span> <span style="color: #00aaaa; text-decoration: underline">xmlrpclib</span>, <span style="color: #00aaaa; text-decoration: underline">sys</span>

s = xmlrpclib.Server(
    <span style="color: #aa5500">&#39;https://api.revver.com/xml/1.0?login=username&amp;amp;passwd=passwd&#39;</span>
)

query = <span style="color: #00aaaa">dict</span>(
modifiedWithin=<span style="color: #009999">60</span>*<span style="color: #009999">60</span>*<span style="color: #009999">24</span>,  <span style="color: #aaaaaa; font-style: italic"># in the last 24 hours</span>
statuses = [<span style="color: #aa5500">&#39;all&#39;</span>]
returnFields = [<span style="color: #aa5500">&#39;id&#39;</span>,
		<span style="color: #aa5500">&#39;title&#39;</span>,
		<span style="color: #aa5500">&#39;owner&#39;</span>,
		<span style="color: #aa5500">&#39;modifiedDate&#39;</span>,
		<span style="color: #aa5500">&#39;status&#39;</span>]

videos = []

done = <span style="color: #00aaaa">False</span>
offset = <span style="color: #009999">0</span>
<span style="color: #0000aa">while</span> <span style="color: #0000aa">not</span> done:
page = s.video.find(query, returnFields, <span style="color: #00aaaa">dict</span>(
orderBy=(<span style="color: #aa5500">&#39;modifiedDate&#39;</span>, <span style="color: #00aaaa">False</span>),
final=<span style="color: #00aaaa">True</span>,
offset = offset
))
offset += <span style="color: #00aaaa">len</span>(page[<span style="color: #aa5500">&#39;result&#39;</span>])
videos.extend(page[<span style="color: #aa5500">&#39;result&#39;</span>])
done = page[<span style="color: #aa5500">&#39;final&#39;</span>]

<span style="color: #0000aa">for</span> video <span style="color: #0000aa">in</span> videos:
<span style="color: #0000aa">print</span> <span style="color: #aa5500">&quot;%-10s %-30s %-10s %-20s %s&quot;</span> % (
        video[<span style="color: #aa5500">&#39;id&#39;</span>],
        video[<span style="color: #aa5500">&#39;owner&#39;</span>],
        video[<span style="color: #aa5500">&#39;modifiedDate&#39;</span>],
        video[<span style="color: #aa5500">&#39;status&#39;</span>],
        video[<span style="color: #aa5500">&#39;title&#39;</span>])
<span style="color: #0000aa">print</span>
<span style="color: #0000aa">print</span> <span style="color: #aa5500">&quot;%s videos modified since last pull&quot;</span> % <span style="color: #00aaaa">len</span>(videos)
</pre>
</div>
<p>Note:  Be sure when using loop constructs that accept boolean values that  you give yourself a maximum loop count, so in cause you mistype something you don&#8217;t end up in an infinite loop.</p>
]]></content:encoded>
			<wfw:commentRss>http://developer.revver.com/articles/view/synchronizing-content-for-syndication/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Revver Video Primer</title>
		<link>http://developer.revver.com/articles/view/revver-processing-overview/</link>
		<comments>http://developer.revver.com/articles/view/revver-processing-overview/#comments</comments>
		<pubDate>Tue, 30 Oct 2007 00:06:35 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
		
		<category><![CDATA[Reference]]></category>

		<category><![CDATA[Uploading]]></category>

		<guid isPermaLink="false">http://developer.revver.com/articles/2007/10/29/revver-video-primer/</guid>
		<description><![CDATA[Revver Video Overview
Revver provides a comprehensive solution for video creators, publishers and distributors to create, edit and manage their videos across multiple platforms.  Revver hosts all videos for free, and &#8220;packages&#8221; video streams with dynamic advertising solutions, so that creators and distributors can profit from the ever expanding business of internet video.
The process by [...]]]></description>
			<content:encoded><![CDATA[<h3>Revver Video Overview</h3>
<p>Revver provides a comprehensive solution for video creators, publishers and distributors to create, edit and manage their videos across multiple platforms.  Revver hosts all videos for free, and &#8220;packages&#8221; video streams with dynamic advertising solutions, so that creators and distributors can profit from the ever expanding business of internet video.</p>
<p>The process by which a user uploads and subsequently sees their video on Revver can be confusing to the new user especially if used to sites where uploading is either not available via an API, so we&#8217;ll start with a brief description of the video upload/transcode/review system.  There are FOUR stages in the process: <strong>UPLOADING</strong>, <strong>TRANSCODING</strong>, <strong>REVIEW</strong> and <strong>GOING ONLINE</strong>.    The entire process may take up to 2 hours, but depending on a number of factors it could be longer.</p>
<h4>STAGE 1: UPLOAD</h4>
<p>The first step is the actual upload.  Using a standard HTTP POST request the video data is uploaded to a server.  Upon a successful upload, a videoID is assigned to the video and it is passed to the transcoding system.</p>
<h4>STAGE 2: TRANSCODING</h4>
<p>All Revver media is offered in both Flash and Quicktime formats.  The process by which it is encoded into these different formats is known as &#8220;transcoding&#8221; (wikipedia link).  The transcoding queue is processed according to a set of simple rules, and then the resulting media file is passed thru a human review process.</p>
<h4>STAGE 3: REVIEW</h4>
<p>The goal of this process is to ensure that the Revver library is &#8220;clean&#8221; and free of stolen or pirated content as well as  to ensure that there is no pornography or hate speech .  In the case of copyright violations, the process that is usually taken is that the owner of the video is notified by the Revver Review team and given opportunity to defend the copyright, or provide additional materials as may be necessary.    In this case, the video receives a special status (see below) &#8220;review_verify&#8221; until it is either approved or rejected.&gt;</p>
<h4>STAGE 4: GOING ONLINE</h4>
<p>Once approved by the reviewers, the video then is distributed amongst a series of media servers to improve efficiency when delivering videos via API user sites.  It usually takes about 10 or 15 minutes for this stage, but this too can vary.  During this time, the video (see below) will be in the status &#8220;going_online&#8221;.  Once the distribution is complete, the video is then accessible via the flash player, and can be viewed on API user sites and the www.revver.com site.</p>
<p>In order to track this process, various &#8220;statuses&#8221; are assigned to the video as is passes through each stage.  These statuses are:</p>
<dl>
<dt>uploading</dt>
<dd>When the call to video.getUploadToken is made, a new upload token is created, and the status of the videoID associated to that token is set to &#8220;uploading&#8221;.</dd>
<dt>processing</dt>
<dd>When a POST request is made to the upload server along with the token in the URL, the system checks to see if video.create has been sucessfully been called for the associated videoID, and if so, changes the status to &#8220;processing&#8221;.  If not, then the videoID remains in the state &#8220;uploading&#8221; until video.create is called.</dd>
<dt>failed</dt>
<dd>For various reasons, videos may fail during the TRANSCODING stage.  When this happens, the status for the video is changed to &#8220;failed&#8221; and no further processing takes place.  Note: videos that fail are usually re-transcoded within a few hours or days at most, so the main reason that a video would never end up in the Revver library is if the uploading process never completed.</dd>
<dt>review</dt>
<dd>When transcoding completes, the videos are passed into a system that queues videos for our review team, and during this time, until they either approve, reject or request verification, the status remains &#8220;review&#8221;.  As Revver  employs a 24/7 staff of reviewers, this is usually the fastest stage of the process.</dd>
<dt>review_verify</dt>
<dd>In cases where copyright or ownership of the video content is required to be verified, the reviewer will request additional information.  This request will either go directly to the video uploader&#8217;s email (if provided), and/or will be visible in the same user&#8217;s dashboard on the www.revver.com site.</dd>
<dt>rejected</dt>
<dd>If reviewers determine that the video is not appropriate content, i.e. contains hate speech, blatant copyright violations, or pornography, it will be rejected, and the status set accordingly.</dd>
<dt>going_online</dt>
<dd>After a video has passed through review, and the reviewer has approved the video for going online, the status is updated and the video is then distributed across multiple video servers.</dd>
<dt>online</dt>
<dd>Videos in the &#8220;online&#8221; status are able to be downloaded in QT format, and played with the Revver Player, or Revver Player Component accordingly.  All other statuses are invalid for playing videos.</dd>
<dt>offline</dt>
<dd>Videos can be taken &#8216;offline&#8217; manually, and API developers can request that revver automatically set their videos to offline.  This is useful when videos are being uploaded as part of a series, and the developer or content owner wishes to control the release of the videos accordingly.</dd>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://developer.revver.com/articles/view/revver-processing-overview/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Upload Tutorial</title>
		<link>http://developer.revver.com/articles/view/video-upload-tutorial/</link>
		<comments>http://developer.revver.com/articles/view/video-upload-tutorial/#comments</comments>
		<pubDate>Mon, 29 Oct 2007 23:26:40 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
		
		<category><![CDATA[Uploading]]></category>

		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://developer.revver.com/articles/view/video-upload-tutorial/</guid>
		<description><![CDATA[The Revver XML-RPC API provides a simple mechanism for uploading videos.  The two XML-RPC API methods that are part of this mechanism are video.create() and video.getUploadTokens().  In this tutorial, we will review both, and explain how to use them properly, as well as how to use the flash uploader widget.
video.getUploadTokens()
The very first step [...]]]></description>
			<content:encoded><![CDATA[<p>The Revver XML-RPC API provides a simple mechanism for uploading videos.  The two XML-RPC API methods that are part of this mechanism are video.create() and video.getUploadTokens().  In this tutorial, we will review both, and explain how to use them properly, as well as how to use the flash uploader widget.</p>
<h3>video.getUploadTokens()</h3>
<p>The very first step required in order to upload a video is for the user to request a video upload token.  The video.getUploadTokens function can return multiple tokens at a time, so the first parameter is count.  The second parameter is actually optional, and like all the &#8220;options&#8221; in the API, it takes a struct, even though it has only one key, &#8220;owner&#8221;.  This parameter is used by the API to determine who the video is owned by, and when building video portals with child users, this becomes an important feature.   An owner is assumed to be a  child users of the API user, and an &#8220;invalid owner&#8221; error will be thrown if the API user does not have a child user with the given name.</p>
<p>A common mistake here is to put the owner name that is the same as the API user.  The API will see this as the child user and not as the API user, so if you have an API user &#8220;myusername&#8221;, then the owner will be assumed to be the actual user &#8220;myusername@myusername&#8221; which will likely not have the expected results.</p>
<p>Also, the return from this function will always be an array.  The first element is a string indicating the URL to which you must POST the actual file, and the second element is itself an array (even if you only requested 1 token) of tokens.</p>
<p>i.e.</p>
<div class="code_highlight">Array = [ ‘httpupload.revver.com’, [ ‘asdf897dasfdfh32dsa89f’] ]<br />
(this is only an example, your token will look different).</div>
<h3>video.create()</h3>
<p>Once you&#8217;ve gotten your token, you can now create the meta-data for your video.  Without meta-data, the video will never move past the &#8220;uploading&#8221; stage into processing, but you can run video.create() either before or after your file gets uploaded, so you could create a &#8220;bulk upload&#8221; tool if you wanted that processed multiple sets of video meta data then sent all the files to the server at once.</p>
<p>video.create takes 4 parameters, and an optional options struct.  The first param is the token, the second the title, the third is an array of keywords and the fourth parameter is a RECOMMENDATION for age restriction that is passed to our review team.   Additional meta-data is included in the options struct.  Other than credits, url, description and author, there is also a &#8220;references&#8221; id which refers to another video id.  This is useful for creating &#8220;video responses&#8221;.</p>
<h3>Uploading Videos</h3>
<p>Once you&#8217;ve got an upload token, you can upload your physical media.  The return from the video.getUploadToken() function includes the URL of the upload server.
</p>
<p>For each individual token returned, the URL for upload is the upload server and then the token and a “urlRedirect” querystring that is the absolute URL where the upload server will redirect after a successful upload.  When redirecting the server will add a &#8220;success&#8221; variable to your URL.  This variable is either true or false.  No other data is sent.</p>
<p>i.e.:</p>
<div class="code_highlight">http://httpupload.revver.com/asdf897dasfdfh32dsa89f?urlRedirect=http://www.myserver.com/upload_complete.php
</div>
<h3>HTML Forms vs. Flash Uploader</h3>
<p>Once you have your URL and token, you can create an upload form.</p>
<p>i.e.</p>
<div class="code_highlight">
&lt;form action=”http://httpupload.revver.com/asdf897dasfdfh32dsa89f?urlRedirect=http://www.myserver.com/upload_complete.php<br />
” method=”POST” type=”multipart/form-data”&gt;<br />
&lt;input type=”file” name=&#8221;file&#8221;/&gt;</p>
<p>&lt;input type=”submit”/&gt;<br />
&lt;/form&gt;
</p></div>
<p>If you prefer, you can use the Revver flash uploader, which is documented at http://developer.revver.com/widget/upload.</p>
]]></content:encoded>
			<wfw:commentRss>http://developer.revver.com/articles/view/video-upload-tutorial/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
