You are here: Home press room netCorps blog Archive 2007 June 14 Streaming Google and YouTube Video in Plone
Document Actions

Streaming Google and YouTube Video in Plone

by Matthew Latterell last modified March 04, 2008 01:42

So you think you want to add streaming video to your website. YouTube and Google Video now make streaming video a snap to share, although they can't magically turn us all into award winning videographers. If, however, you have meaningful good quality video that you want to get out to your constituents, streaming video from a service like Google Video or YouTube onto your website is a quick and easy way to go.

So you think you want to add streaming video to your website. YouTube and Google Video now make streaming video a snap to share, although they can't magically turn us all into award winning videographers. If, however, you have meaningful good quality video that you want to get out to your constituents, streaming video from a service like Google Video or YouTube onto your website is a quick and easy way to go.

Since we do most of our website development in Plone, the steps for "embedding" the video in a webpage are specific to Plone websites. Google Video and YouTube, to their credit, make it simple to add streaming video to almost any website or blog.

The approach outlined in this documentation relies on a Plone Product called ATGoogleVideo. If you don't have access to this tool or simply want to "embed" links to video in your Plone pages, refer to the instructions regarding disabling Plone's safe_html transform found on the "Embedding videos in Kupu" page at Plone.org.

The first step is to upload your video to Google Video or YouTube (also owned by Google). Since the tools to stream video on a Plone site work for either service, we don't have a strong preference on which service to use. Google Video will allow for larger videos (over 100MB) and for longer videos (over ten minutes), so the size of your video file will probably guide your selection.

Both services require you to have an account in order to upload video files. Once you create an account, you'll be able to upload your video file.

For YouTube, the steps are very easy:

  1. Click "Upload Videos" in the upper-right-hand corner of any YouTube page.
  2. Enter as much information about your video as possible, including Title, Description, Tags, and Category. The more information you include, the easier it is for users to find your video!
  3. Click the "Go upload a file" button.
  4. In the next window, click the "Browse" button to browse for the video file. Select the file you want to upload.
  5. Determine if you want your video set to Public or Private.
  6. Click the "Upload Video" button.

 

For Google Video, the steps are similar for videos up to 100MB in length:

  1. Once you are logged in, click on the "Upload your videos" link.
  2. Click on the "Browse" link to locate your video file from your computer.
  3. Enter a title and description for the video.
  4. Select the genre and language for the video (if desired).
  5. Select whether you would like the video to be included in Google Video's search or if it should be treated as "unlisted".
  6. Check the box to agree to Google's "Upload Terms and Conditions" and click on the "Upload Video" button.

 

For videos larger than 100MB, Google Video offers the Desktop Uploader (versions are available for Windows, Mac and Linux).

Once you have your video uploaded to YouTube or Google Video, you'll want to "embed" it on your website--basically link to it so that it streams from within your webpage. Both Google Video and YouTube offer the code to enter into webpages or blogs, but with Plone the process is a little different. You'll still need some of the code, just a whole lot less.

First, you'll need to create a Google Video content item. To do this, click on the "Add to Folder/Add Item" drop-down menu when you are logged in to Plone (NOTE: this assumes that your account is a Manager level account and also that the ATGoogleVideo product is installed on your website--check with whoever provides technical support to you for your website).

 

Adding Google Video Content Item

 

 

Once you have clicked on "google video" from the drop-down menu, you'll be able to configure the item. You'll want to give the item a title and possibly a description (the same as you entered when you uploaded the video to YouTube or Google Video) and, most importantly, you'll want to enter the "docID" for the video itself.

The docID for the video is found either in the URL of the video or from the "embed" code that YouTube and Google Video provide.

For example, to "embed" the video Turning the Tide: Friends of the Coast Campaign, the North Carolina Coastal Federation first uploaded the video to Google Video. They then added the docID to the Google Video item on their website. The actual URL or address of the video on Google Video is:

http://video.google.com/videoplay?docid=-7186620611333914604&hl=en.

The docID is inside that address, it is -7186620611333914604.

The video "A Voice for Change: The Tayna Fogle Story", a YouTube video uploaded by Kentuckians for the Commonwealth, has the URL or address of:

http://www.youtube.com/watch?v=cCl7hdAO-gw&feature=PlayList&p=
FFEC33B629CC2989&index=0

The docID is a little harder to find in this address, it is cCl7hdAO-gw.

Both Google Video and YouTube also provide an "embed" link to their videos that contain the docID as well. Use whichever approach (the "embed" link or the URL) seems easier.

Enter the title, description, docID and any other relevant information into the new Google Video content item and click the "Save" button at the bottom of the screen:

Configuring Google Video Item

 

You can also select the Quality of the playback ("best" is recommended), whether the video should start playing automatically once loaded (instead of requiring the viewer to click on it to start it playing). You can also upload an image that will appear in a list of available videos that are linked on your website.

If the video doesn't play after you have gone through these steps, the first thing to check is the docID. Make sure that the video will play when viewed directly on Google Video or YouTube as well. If the docID is correct and the video plays on Google Video or YouTube, troubleshooting may require the assistance of whoever provides technical support for your website.