SharkScopers
SharkScopers is a Drupal 6 site that allows online poker instructors to sell screencast tutorial videos. The first two minutes can be viewed by anyone. Users can purchase credits that unlock whole videos. Instructors then receive a cut of the profit.
Jonathan Brown from Blue Droplet Media in Edinburgh, Scotland, has been helping Mike Jonas from SharkScope in New York develop the site for more than a year. It uses Jonathan's Blue Droplet Video module extensively.
Mike had done a lot of research into what system should be used to build the site. His primary motivation for choosing Drupal was so that Blue Droplet Video could be used. He was blown away by how BDV integrates with CCK and Views, allowing the fundamentals of the site to be created with great ease.
Jonathan and Mike have very well defined roles within the project. For each task, they consult via email and Skype to construct robust specifications. Jonathan then implements the required functionality. A release early, release often methodology is used, allowing the site to innovate rapidly.
The fantastic theme was created entirely by Mike as a Zen sub-theme.
Credit bundles
Userpoints is used to maintain how many credits each user has.
A custom module was written so that credits could be purchased in bundles. An admin interface allows bundles to be created, specifiying name, credits and price. Additionally, private bundles can be defined that can only be accessed via a promotional URL.
Payment can be via Moneybookers or PayPal. This is handled by Jonathan's Simple payments module.
Videos
The video functionality was implemented with Jonathan's Blue Droplet Video module.
Instructors can upload video in any format and it will be transcoded to H.264 for viewing in-browser using Rob Loach's (superb!) Flowplayer module.
Transcoding is performed by a local installation of FFmpeg. As these are screencasts, transcoding parameters are set to have very high resolution and low frame rate. This produces really great results when the video is viewed fullscreen. One of the features of BDV is that it will never upscale a video. It is much better to encode it at its native resolution because you get more quality for your bitrate and upscaling reduces image quality.
The video content type created has two Blue Droplet Video CCK fields - one for the full video and one for the sample. The sample field was configured to only transcode the first 2 minutes. Some additional code was placed in a hook_nodeapi() so that if the instructor did not provide a sample video it would inherit the full video.
A video's price (in credits) is a simple integer CCK field. If the user has not unlocked the video, an unlock link is placed at the top and the sample video is rendered instead of the full length. If the user unlocks the video, the price is deducted from their userpoints balance.
BDV uses Storage API to handle file storage and serving. For SharkScopers, it was configured to use Amazon S3. Files are only stored locally temporarily, e.g. when they are first uploaded / created or when they need to be transcoded. This allows the VM that SharkScopers runs on to be significantly smaller than the 20+ GB of files it stores on S3.
While it is not possible to eliminate piracy completely, it is possible to mitigate it, especially in a niche area such as online poker. SharkScopers uses S3's signed URLs for full length videos. These URLs cease to work after a defined time (a few minutes in this case), meaning that posting them on forums would be fruitless. Storage API can generate these URLs with a simple configuration option.
Here is an example of a signed URL:
http://sharkscopers-secure_d6.s3.amazonaws.com/object-62901?AWSAccessKeyId=1EVD7Q7RZY2TXMPYVXG2&Expires=1262195588&Signature=KRVZhDdNRjsCUE9MVZOTDijgQj8%3D
Thumbnails
Blue Droplet Video has excellent integration with Views - the thumbnail grid was created with no programming whatsoever. Thumbnails are generated in their own request and then cached, so the whole page isn't delayed. Their size is defined in the Views field configuration.
Storage API's S3 service uses aggressive client side caching. The following HTTP header is served: "Cache-control: max-age=31536000". This means files can be kept fresh in the browser's cache for up to a year. This is possible because the service will never reuse a URL.
The video ratings were implemented with Fivestar.
Navigation bar
Mike had a great idea for a site-wide navigation bar and created mock ups and some logic rules.
It was implemented as a module that exposed a block. It simply examines the current path and renders HTML based on the logic that Mike provided. Mike themed it with CSS.
The avatars were rendered very easily with ImageCache.
Blog graphs
Users that blog on SharkScopers can insert a SharkScope graph of their poker playing performance at the bottom of each post.
This was implemented as a custom module that exposes a CCK field. The rendered graphs are cached in Amazon S3 using Storage API.
Migration to Drupal 6
The site was migrated to Drupal 6 in October.
In order to have the live site running alongside the dev site, it was necessary to duplicate the Amazon S3 containers. Storage API can do this very easily, but it would take a long time as there was 20 GB of files, each of which would have to be downloaded from the old container then uploaded to the new container.
However, S3 has a copy command, where it can copy a file directly between containers (much faster and free). Storage API was upgraded to detect when this is possible and perform a copy automatically. This greatly eased development and migration.
Playlog
Something new being tried out is measuring how much videos are being viewed. Not just how often videos are played, but how much time is spent actually viewing the videos.
This required some new functionality in Blue Droplet Video: the playlog. This can be enabled for any BDV field. It makes AJAX calls back to the site when the user scrubs to a new position, reaches the end of the video or leaves the page. BDV then records the timing info in the database.
SharkScopers' admin backend uses this information to determine how much time has been spent viewing each instructor's videos.
Conclusion
Drupal and Blue Droplet Video proved to be an excellent platform for SharkScopers.
Any time a security update is required, the developers are notified by email. The module is then updated very easily with Drush.
Only a few years ago a site like SharkScopers would have cost many millions of dollars to produce. Development was greatly eased by Drupal's rich ecosystem of open source modules and vibrant community. By collaborating with those who had similar functionality requirements, the site was developed in a very economically efficient manner.
Drupal version: Drupal 6.x