Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Using Amazon Web Services

NOTE: For help with the JW Player for Flash v5, please refer to the following tutorial:  Using Cloudfront

By following this tutorial you will learn how to:

Step 1: Download the JW Player

You can either download the player here or use LongTail’s setup wizard to generate the embed code for a customized version of the player.

Step 2: Upload Your Videos to Amazon S3

In order to upload your videos to Amazon S3, you will need two things: an Amazon S3 account and an S3 client to transfer your video files. We suggest using one of the following four S3 clients: Bucket Explorer (Mac + PC), Cyberduck (Mac), CloudBerry S3 Explorer (PC) and S3 Hub (Mac).

After signing up, log into your Amazon S3 account and create a new directory, or bucket, as it's called by Amazon. Name the directory after a subdomain name on your own site (videos.mywebsite.com, for example). We'll use this later on for the DNS redirect.

Next, upload your videos to this directory using your S3 client. When you’re done, set the access properties (aka the ACL file, or permissions) of each video so that everyone can read the files. Now your videos are available under http://videos.mywebsite.com.s3.amazonaws.com.

Step 3: Optimize Your Traffic Using Amazon CloudFront

Once you have uploaded your videos to Amazon S3, Amazon offers a low-cost CDN companion service called Amazon CloudFront, which allows you to optimize the network traffic sent to your users based on their location. Amazon provides documentation on setting up Amazon CloudFront with your Amazon S3-hosted files.

Step 4: Domain Masking: Creating User-Friendly URLs (optional)

This step is mostly cosmetic and only available to users who have access to the DNS records of their domain (the domain owner should have this, usually). Domain masking, different than domain forwarding, involves the practice of hiding or changing the URL. The reasons are varied, but often involve making the URLs shorter for aesthetic and user-friendly reasons. Compare, for instance, the rather unwieldy http://videos.mywebsite.com.s3.amazonaws.com/myvideo.flv with the more manageable http://videos.mywebsite.com/myvideo.flv. The latter URL, in addition to being easier on the eyes, appears a great deal more professional.

Masking your domain requires access your DNS zone file, either directly or through a management console. (Parallels offers a quick tutorial on changing zone files using their popular Plesk server management software). If you have questions, ask your hosting provider or server administrator for more information on how to accomplish this task.

You will be adding one line to your DNS file, but before you do, keep in mind three important items:

  1. Subdomain used for masking – This can be any name; in the above example, we used videos.
  2. DNS record type – This must be a CNAME for domain-to-domain forwarding.
  3. Subdomain to forward to – In our example: “videos.mywebsite.com.s3.amazonaws.com.” Note: this URL contains an ending “.”

The additional line you will be adding to your zone file should look like this:

  1. videos IN CNAME videos.mywebsite.com.s3.amazonaws.com

Step 5: Embed the JW Player On Your Site

Now, you will need to embed the JW Player in your site. If you're unfamiliar with this process, please read our Embedding Flash tutorial, or the excellent documentation of the SWFObject embed JavaScript. For a SWFObject, the embed code should look something like this:

<script type="text/javascript" src="swfobject.js"></script> <script type="text/javascript"> swfobject.registerObject("player", "9.0.0", "expressInstall.swf"); </script>

<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="328" height="200"> <param name="movie" value="player.swf" /> <param name="allowfullscreen" value="true" /> <param name="flashvars" value="file=http://videos.mywebsite.com/myvideo.flv" /> <object type="application/x-shockwave-flash" data="player.swf" width="328" height="200"> <param name="movie" value="player.swf" /> <param name="allowfullscreen" value="true" /> <param name="flashvars" value="file=http://videos.mywebsite.com/myvideo.flv" /> <p><a href="http://get.adobe.com/flashplayer">Get Flash</a> to see this player.</p> </object>

Step 6: Customize Your Player

Now that you have videos on your site, you’ll want to customize your player.

  1. Skin your player: choose from LongTail’s library of player skins to customize the look of your player
  2. Add a Plugin: choose from our library of plugins to extend the player’s features

Step 7: Monetize Your Videos

You can use LongTail’s AdSolution to run pre-roll, overlay, mid-roll or post-roll advertisements on your video content from over 40 video ad networks like Google’s AdSense, ScanScout, YuMe and many more. Sign up now and follow the instructions in the LongTail Dashboard.

Additional Resources

If you're looking for additional resources to help you set up your Amazon CloudFront account, here are a few helpful links:

  1. The CloudFront Getting Started Guide gives you an overview of CloudFront's features and shows you how to get started in 4 easy steps.
  2. CloudFront Management Tool Roundup contains information about 7 management tools and sites that will help you to get going with CloudFront.
  3. Mike Culver's CloudFront Tutorial Video demonstrates what you need to do, step by step!

Questions?

If you’re confused, please visit our forums and ask a question to our community – over two million strong!