Switch branches/tags
test-tag release-513.003 release-513.002 release-513.001 release-512.002 release-512.001 release-511.003 release-511.002 release-511.001 release-510.002 release-510.001 release-509.004 release-509.003 release-509.002 release-509.001 release-508.001 release-507.002 release-507.001 release-506.001 release-505.008 release-505.007 release-505.006 release-505.005 release-505.004 release-505.003 release-505.002 release-505.001 release-504.004 release-504.003 release-504.002 release-504.001 release-503.003 release-503.002 release-503.001 release-502.001 release-501.002 release-501.001 release-500.002 release-500.001 release-499.005 release-499.004 release-499.003 release-499.002 release-499.001 release-498.003 release-498.002 release-498.001 release-497.002 release-497.001 release-496.006 release-496.005 release-496.004 release-496.003 release-496.002 release-496.001 release-495.005 release-495.004 release-495.003 release-495.002 release-495.001 release-494.003 release-494.002 release-494.001 release-493.004 release-493.003 release-493.002 release-493.001 release-492.003 release-492.002 release-492.001 release-491.003 release-491.002 release-491.001 release-490.002 release-490.001 release-489.005 release-489.004 release-489.003 release-489.002 release-489.001 release-488.006 release-488.005 release-488.004 release-488.003 release-488.002 release-488.001 release-487.002 release-487.001 release-486.001 release-485.006 release-485.005 release-485.004 release-485.003 release-485.002 release-485.001 release-484.004 release-484.003 release-484.002 release-484.001 release-483.005
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
actions
apiwrappers
css
feedingesters
filerepo
handlers
images
js
sql
templates
tests
videoInfo
README.md
UpdateThumbnailTask.class.php
VideoFileUploader.class.php
VideoHandlerController.class.php
VideoHandlerHelper.class.php
VideoHandlerHooks.class.php
VideoHandlerSpecialController.class.php
VideoHandlers.i18n.php
VideoHandlers.setup.php
VideosController.class.php
crowdin.conf

README.md

Feed Ingesters and Video Handers

Feed Ingesters

Videos at wikia are broken into 2 categories: Premium and Non-Premium.

Non-premium videos are videos that we allow users to upload onto the site. These include videos from providers like youtube, vimeo, dailymotion, etc. The full list of non-premium providers we support can be found here.

Premium videos are those that we license. We have a cron job which runs 4 times a day and polls each of our premium providers to see if they have any new content. If they do, we upload those videos onto our video wikia found at video.wikia.com. Once those videos have been added to video wiki, users can then embed them in their local wikias (eg, thelastofus.wikia.com, callofduty.wikia.com, disney.wikia.com, etc). The FeedIngester classes found in this extension are part of the ETL process for each of these providers. Each one will check its corresponding provider's api, then normalize the data before uploading it onto our site.

The cron job which runs is the ingestPartnerWithVideoData.php script. It iterates over our list of currently active premium providers, instantiates the corresponding feedingester class for the provider, and kicks off the ingestion process.

Remote Assets

Within premium videos there's a distinction between whether a video is a remote asset or not. A video which is not a remote asset is one which is hosted by the provider themselves. For example, all of our CrunchyRoll videos are hosted on CrunchyRoll servers and are played using CrunchyRoll's player. IGN is the same. All IGN's videos are hosted on IGN servers and use the IGN player. A remote asset on the other hand, is a premium video which is actually hosted on Ooyala and is played through Ooyala's player. Currently we have 2 providers whose videos we treat as remote assets: IVA and Screenplay. During the ingestion process for these 2 providers, rather than uploading their assets onto our site, we instead use Ooyala's API and load them onto Ooyala. Then, when we ingest videos from Ooyala, we ingest the video to Wikia normally from there.

Here's a document on Wikia One which has a diagram for the overall process: Feed Ingestion Architecture

Video Handlers

A first thing to note is that Wikia does not store any videos on our servers. Instead we store metadata about the video in the video151 database (the database for video.wikia.com). The exact tables which we store information in can be found in the Feed Ingestion Architecture link. Because we don't have the physical files ourselves, we have VideoHandler classes which are in charge of determining how to play the video based on its provider. In some cases this involves loading a javascript player (as is the case with videos ingested from Ooyala), and in others it involves just using an iframe (as is the case for videos ingested from Maker Studios).

VideoHandlers are registered to their corresponding video files via the $wgMediaHandlers[] array (eg, $wgMediaHandlers['video/makerstudios'] = 'MakerstudiosVideoHandler';). Mediawiki keys of the img_major_mime and the img_minor_mime columns found in the image table joined by a '/' to determine which key to use when checking $wgMediaHandlers. So, for example, all Maker Studios videos have 'video' as the value for their img_major_mime, and 'makerstudios' as the value for their img_minor_mime. Mediawiki will join those 2 creating 'video/makerstudios' then look in the $wgMediaHandlers array for that key and use the corresponding MakerstudiosVideoHandler handler. See VideoHandlers.setup.php for more examples of registering video handlers.