Video for your Drupal Website

October 19, 2010 | by Jeannette Modic | Posted in CMS, Web Development

There are so many options available for video on your Drupal website, that I think it's hard to sift through all the options and find what is right for you. Here at Balance we've been analyzing all the available options and have come up with 3 strategies we use depending on the needs of our clients.

So, what are the challenges with video that need to be considered before choosing a solution?

  1. There is no magic format that works in every browser and mobile device. So, if you want your video to display in mobile, you will need to select an option that will handle multiple formats
  2. There are multiple video formats. You might need yours converted for performance and consistency.
  3. Your videos may be proprietary, and you want to keep the videos on your site so you don't have to adhere to a third-party's terms of use.

Luckily there are options out there to solve these problems.  Here are our "Winning Combinations" of video solutions for your Drupal website:

Host With a Third Party, Like YouTube

There are 2 modules you can install on your Drupal website that work with YouTube and other third-party providers that will make this integration seamless. The first module is the Video Upload Module. This module provides a CCK field that will allow you to upload your video directly to YouTube.

There are a couple of things to keep in mind about this module. First, the upload to YouTube occurs when you run cron. So, videos will not be instant. If you have your cron job set up to run every hour like Drupal recommends, then your video may not appear for up to an hour after you upload it. You can always bypass this wait time if you just run cron.php manually. 

Second, this module offers no option for videos that have already been uploaded to your YouTube account, or videos uploaded by other users. To account for this, you can install the Embedded Media Field Module and one or many of the add-ons that support the different third-party video hosting options. 

Embedded Media Field is the second module option for embedding third-party videos on your site. This module would require you to upload your video on the third-party site and then paste the embed code or the URL in the CCK field that comes with the module. 

If you host with a third party, there are many benefits. 

  • You won’t be using your bandwidth to stream the videos.
  • You will be using cutting-edge technology, which means your video will be available in any browser, and on mobile devices.
  • Multiple encoders are available, which means you can upload almost any format of video and the service will convert it to a web-friendly format if it needs to.

The only downside to hosting with a third-party is ownership of your video: There are no limits to distribution or reproduction.

Host on Your Site, Play Flash Videos

One video format that can be played in any browser is Flash videos. If you aren’t interested in your videos playing on mobile devices, you can use the Video Module to upload any format of video and convert it to Flash, and then use the SWF Tools Module to display the video on your site.

With this option you will host your own videos, so you will have to make sure your host can handle the bandwidth of streaming videos. You can upload any format and convert to Flash if the ffmpeg encoder is available through your host.

The downside with this option is that your videos will not be available on mobile devices. (Read why mobile devices don't support Flash.)

Host on Your Site, Mobile-Friendly Videos

To support all browsers and mobile devices, you will need to upload 2 versions of your video: a Flash video (.flv) and an HTML 5 friendly format such as .mp4. Currently there are no tools available that we could find that would let you upload a video and automatically convert it to the two versions you need. 

You can use the Video module that we mentioned above to convert to Flash to cover the web browsers. To get an MP4 video you can use an open-source program called Handbrake to convert your video. When creating your video content type you will add the Video Upload field from the Video module and a CCK Filefield to upload your MP4 file. 

To display your videos, we recommend the Media Front Module. This module will default to displaying the video using HTML 5, but fallback to Flash when the browser doesn’t support HTML 5. The only downside to this method is the time and complication involved in setting it up, and having to convert your file before uploading, but this is an all-encompassing solution that will work in every browser and mobile device.

We're hopeful that an even more convenient solution will be available soon, and we'll be sure to post an update if we find anything new.

So, how are you doing videos on your Drupal site? We’re always looking for new options and information. Let us know if you have any questions!

For more information about HTML 5 video, we recommend this excellent article: http://diveintohtml5.org/video.html



Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <table> <img> <td> <th> <tr> <br> <div> <span> <hr> <b> <i> <map> <area><h1> <h2> <h3> <h4> <h5> <p> <img>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Insert Google Map macro.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters (without spaces) shown in the image.