Menu
Amazon CloudFront
Developer Guide (API Version 2016-09-29)

Playing the On-Demand Stream In a Test Web Application

To confirm that on-demand streaming is working, you play the stream in a test web application. When AWS CloudFormation created an Amazon EC2 instance, it also installed sample video files and two sample players:

  • Silverlight – for streaming videos using the Microsoft Smooth Streaming protocol

  • OSMF 2.0 – for streaming videos in Adobe Flash using the Adobe HTTP Dynamic Streaming (Adobe HDS) protocol

The following procedures explain how to play the on-demand stream using different protocols:

To play a video using the Microsoft Smooth Streaming protocol

  1. Open the AWS CloudFormation console at https://console.aws.amazon.com/cloudformation/.

  2. In the list of AWS CloudFormation stacks, choose the stack for on-demand HTTP streaming.

  3. In the bottom pane of the AWS CloudFormation console, choose the Outputs tab.

  4. On the Outputs tab, copy the URL in the OriginS3 field. This is the URL for the Microsoft Smooth Streaming example web page on your Unified Streaming server.

  5. Paste the URL into a browser and go to the website.

  6. Copy the value of the SmoothManifest key, and paste it into URL field on the example web page. In the following example URL, note that media-file-path-excluding-bucket-name-but-including-media-file-name is literal text that you'll replace in the next step:

    http://d111111abcdef8.cloudfront.net/unifiedhttpstreaming-unifiedvods3bucket-123abc4/media-file-path-excluding-bucket-name-but-including-media-file-name/manifest

  7. In the example web page, replace media-file-path-excluding-bucket-name-but-including-media-file-name with the correct path of the video in Amazon S3 that you want to play. For example, if your media file name is nasa_msl_launch.mp4, then the URL is the following:

    http://d111111abcdef8.cloudfront.net/unifiedhttpstreaming-unifiedvods3bucket-123abc4/nasa_msl_launch.mp4/manifest

    If the video is in the folder space-videos in your Amazon S3 bucket, then the URL is the following:

    http://d111111abcdef8.cloudfront.net/unifiedhttpstreaming-unifiedvods3bucket-123abc4/space-videos/nasa_msl_launch.mp4/manifest

To play a video using the Apple HTTP Live Streaming (HLS) protocol

  1. Open the AWS CloudFormation console at https://console.aws.amazon.com/cloudformation/.

  2. In the list of AWS CloudFormation stacks, choose the stack for on-demand HTTP streaming.

  3. In the bottom pane of the AWS CloudFormation console, choose the Outputs tab.

  4. Open a Safari web browser on an Apple iOS device, or open the Safari web browser or QuickTime Player 10.x on a computer running Mac OS X Snow Leopard (version 10.6) or later.

  5. Copy the value of the SmoothManifest key, and paste it into URL field in the Safari browser or QuickTime Player. In the following example URL, note that media-file-path-excluding-bucket-name-but-including-media-file-name is literal text that you'll replace in the next step:

    http://d111111abcdef8.cloudfront.net/unifiedhttpstreaming-unifiedvods3bucket-123abc4/media-file-path-excluding-bucket-name-but-including-media-file-name/manifest

  6. In the URL field, replace media-file-path-excluding-bucket-name-but-including-media-file-name with the correct path of the video in Amazon S3 that you want to play. For example, if your media file name is nasa_msl_launch.mp4, then the URL is the following:

    http://d111111abcdef8.cloudfront.net/unifiedhttpstreaming-unifiedvods3bucket-123abc4/nasa_msl_launch.mp4/manifest

    If the video is in the folder space-videos in your Amazon S3 bucket, then the URL is the following:

    http://d111111abcdef8.cloudfront.net/unifiedhttpstreaming-unifiedvods3bucket-123abc4/space-videos/nasa_msl_launch.mp4/manifest

To play a video using the Adobe HTTP Dynamic Streaming (HDS) protocol

  1. Open the AWS CloudFormation console at https://console.aws.amazon.com/cloudformation/.

  2. In the list of AWS CloudFormation stacks, choose the stack for on-demand HTTP streaming.

  3. In the bottom pane of the AWS CloudFormation console, choose the Outputs tab.

  4. On the Outputs tab, copy the URL in the OriginS3 field. This is the URL for the Flash TTP Player example web page on your Unified Streaming server.

  5. Paste the URL into a browser and go to the website.

  6. Copy the value of the HDSManifest key, and paste it into URL field on the example web page. In the following example URL, note that media-file-path-excluding-bucket-name-but-including-media-file-name is literal text that you'll replace in the next step:

    http://d111111abcdef8.cloudfront.net/unifiedhttpstreaming-unifiedvods3bucket-123abc4/media-file-path-excluding-bucket-name-but-including-media-file-name/manifest

  7. In the URL field, replace media-file-path-excluding-bucket-name-but-including-media-file-name with the correct path of the video in Amazon S3 that you want to play. For example, if your media file name is nasa_msl_launch.mp4, then the URL is the following:

    http://d111111abcdef8.cloudfront.net/unifiedhttpstreaming-unifiedvods3bucket-123abc4/nasa_msl_launch.mp4/manifest

    If the video is in the folder space-videos in your Amazon S3 bucket, then the URL is the following:

    http://d111111abcdef8.cloudfront.net/unifiedhttpstreaming-unifiedvods3bucket-123abc4/space-videos/nasa_msl_launch.mp4/manifest

To play a video using the MPEG-DASH protocol

  1. Browse to http://dashif.org/reference/players/javascript/index.html, which is a list of available versions of an MPEG-DASH test client.

  2. Choose the latest version of the Dash client.

  3. On the Reference Client version number page, in the Stream list, choose a streaming format.

  4. Open the AWS CloudFormation console at https://console.aws.amazon.com/cloudformation/.

  5. In the list of AWS CloudFormation stacks, choose the stack for on-demand HTTP streaming.

  6. In the bottom pane of the AWS CloudFormation console, choose the Outputs tab.

  7. Copy the value of the MPEGDASHManifest key, and paste it into manifest field on the Reference Client page. In the following example URL, note that media-file-path-excluding-bucket-name-but-including-media-file-name is literal text that you'll replace in the next step:

    http://d111111abcdef8.cloudfront.net/unifiedhttpstreaming-unifiedvods3bucket-123abc4/media-file-path-excluding-bucket-name-but-including-media-file-name/manifest

  8. In the manifest field, replace media-file-path-excluding-bucket-name-but-including-media-file-name with the correct path of the video in Amazon S3 that you want to play. For example, if your media file name is nasa_msl_launch.mp4, then the URL is the following:

    http://d111111abcdef8.cloudfront.net/unifiedhttpstreaming-unifiedvods3bucket-123abc4/nasa_msl_launch.mp4/manifest

    If the video is in the folder space-videos in your Amazon S3 bucket, then the URL is the following:

    http://d111111abcdef8.cloudfront.net/unifiedhttpstreaming-unifiedvods3bucket-123abc4/space-videos/nasa_msl_launch.mp4/manifest

Next: Deleting the AWS CloudFormation Stack and Amazon S3 Bucket for On-Demand Streaming