When you are first faced with the task of hosting and playing videos in Drupal, the number of different approaches and solutions might seem overwhelming. Where to store the videos? What is the difference between CDNs, cloud storage services and hosted video solutions? Which Drupal modules to use with which service? This blog post walks you through the basics of hosting and playing videos in Drupal:

  • Part 1 tells you about the most popular Drupal modules for video handling, and introduces CDNs and cloud storage services.
  • Part 2 explores hosted video solutions in detail, and offers some basic information about using video sharing sites.

Drupal modules

Let’s start with some of the most popular Drupal modules for video handling.

  • Media module: A widely used Drupal module for storing and handling media assets (images, audio and video). Although it’s not specialized for video, it’s worth getting to know it: combined with other modules it can be a valid solution for video management, and some cloud services (like Youtube, Vimeo, Brightcove, etc) have their own modules integrated with the Media module.
  • MediaElement module: The Media module can’t play videos out of the box. To be able to play a video, it needs the MediaElement module, which provides a HTML5 (or flash fallback) player for the videos. With the MediaElement module you can serve video content streamed to mobile devices as well, responsivity only depends on the theming of the player.
  • Video module: The Video module can handle video upload, transcoding and playing. It also generates thumbnails and can deliver videos from cloud systems.

As you can see, already by using and combining these (or similar) modules, you can set up a reliable video storing and handling solution in Drupal, but really, this is just the beginning. You have many more things to take into consideration based on your bandwidth, delivery and storage needs.

CDNs

CDNs (content delivery networks) are largely distributed systems optimized for delivering content to end-users over the internet with high availability and high performance. For video content, they are often coupled with a transcoding server.

Some well-known CDNs:

They are expensive, but a good choice for improving performance and delivering content to high traffic websites. As the data-centers are distributed, they will be faster than usual hosting providers. Also contemplate using a CDN if you already have a transcoding software.

Drupal module to use

The CDN module provides easy Content Delivery Network integration for Drupal sites. It alters file URLs, so that files are downloaded from a CDN instead of your web server. The project page explains the functionality and also links to helpful articles to better understand how CDNs work.

Cloud storage services

Cloud storage services aren’t optimized for delivering rich media content on high traffic sites, but can be a cheaper alternative to CDNs if you don’t have a huge number of videos and your site traffic isn’t very high.

Some cloud storage services:

Drupal module to use

The Media module alone doesn't provide full cloud storing services, but together with the Remote stream wrapper module, you can reach external files from Drupal. However, using this solution you can only read them, but can't fully handle files on the remote servers.

Some Drupal modules for full cloud storage service integration:

  • Storage API: Storage API is a low-level framework for managed file storage and service that can be extended to work with any storage service.
  • Google Cloud storage: Google Cloud Storage allows you to replace the local file system with Google Storage. Files uploaded into Drupal will still be managed by Drupal, but instead of being stored on the local server, they will be stored on the Google Cloud Platform.

As you can see, video hosting is not for the faint-hearted. Especially if your customer experience is important, there are a lot of moving pieces to take into account. That is why many people choose to work with a hosted video solution. In part 2 we will introduce hosted video solutions and video sharing sites.

About the author

Diána Lakatos

Technical Writer

Diana is responsible for writing, editing and reviewing software documentation, website copy, user documents, articles and blog posts.
Besides working for Pronovix, she's writing reviews for Japanese and Korean TV channels NHK World TV and Arirang TV.

She graduated as a programmer, then went on earning system administrator and system analyst and designer degrees. She's fluent in English and German, and worked as a translator for a publishing company translating books from German to Hungarian. She's the Hungarian translator of Basecamp.

Before becoming a writer, she worked with international clients like Sony Pictures Television, Da Vinci Learning and The Walt Disney Company as a key account manager in integrated marketing campaigns focusing on digital media.