Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

HLS Streaming

(Added in DuraCloud 5.0.0)

HTTP Live Streaming (HLS) is an HTTP-based streaming protocol which supports delivery of adaptive bitrate video and audio streams. DuraCloud makes use of Amazon CloudFront to deliver its HLS streaming capability, so streaming content must be stored in the Amazon S3 storage provider to take advantage of this feature. 

...

While this diagram may seem complex, the vast majority of the work is done for you by DuraCloud and CloudFront. As noted above, you need to make one call to retrieve the signed cookies URL, then respond to the user redirecting them to that URL. The rest of the flow for setting cookies is handled outside of your application. The user is then returned to your application in order to continue to search for media content, and that content is displayed in the same way as with open streaming.

RTMP Streaming

(Deprecated as of DuraCloud 5.0.0, consider using HLS Streaming)

The Media Streaming capabilities provided by DuraCloud allow video and audio files to be streamed over RTMP. This feature in DuraCloud takes advantage of Amazon CloudFront streaming, so files to be streamed must be within spaces on an Amazon provider. This type of streaming uses the Flash Media Server to host streaming files over RTMP. File formats supported include MP3, MP4 and FLV among others. For a full listing of supported file types see the Flash Media Server documentation.

Open and Secure RTMP Streaming

DuraCloud supports two different types of RTMP streaming, open and secure. Open streaming allows anyone with access to the URL for a streamed content item to stream the content. This works well for open access content which is intended to be shared and accessed widely. Secure streaming requires that a request be made to DuraCloud to retrieve a signed URL. That signed URL can then be used to stream the file. The request to retrieve a signed URL can specify how long the content will be available to stream (the default is 8 hours) as well as the IP address or IP address range where the streaming is allowed to take place. The purpose of secure streaming is to restrict the use of the stream. This is ideal for scenarios where streamed content is not free to use or must only be provided to a limited audience. Note that both types of streaming, open and secure, use the RTMP protocol, which requires that a flash-based streaming media player be used to play the streamed content.

Using RTMP Streaming

Follow these steps to stream media files with DuraCloud using RTMP

...

  1. To enable open streaming: Select the space in the DuraCloud interface and click the "ON" button next to "RTMP Streaming:" in the Streaming section of the Space Detail pane. Alternatively, open streaming can be enabled using the same enable-streaming call as secure streaming, but with the "secure" parameter set to 'false".
  2. To enable secure streaming: Perform a POST HTTP call to the URL https://{institution}.duracloud.org/durastore/task/enable-streaming. The body of the POST request should include this JSON document: {"spaceId" : "","secure" : "true"}. Fill in the ID of the space to stream. Note that this call is using the DuraCloud REST API.

...

  1. When using open streaming: 
    1. Select a media file in the space. A video player will appear in the Content Detail pane. Verify that you are able to play the streamed file.
    2. Look in the space properties for the RTMP streaming address. This is the path you will use for streaming files. Alternatively, you can perform a get-url task call through the DuraCloud REST API to retrieve the streaming URL for each content item to be streamed. These URLs are predictable and do not expire.
  2. When using secure streaming:
    1. Spaces using secure streaming do not provide playback via the DuraCloud UI. You will need to perform a "get-signed-url" call to retrieve a signed URL for each content item to be streamed, and stream the file through an RTMP compatible player. More details about the get-signed-url call can be found in the Amazon S3 Storage Provider tasks section of the DuraCloud REST API.

...

streaming

...

The prefix value, when needed, should be added to the stream path by using the "resourcePrefix" parameter on the get-url or get-signed-url call made through the DuraCloud REST API.

In most cases, the file extension will need to be part of the stored file name. Even if files are named with a file extension (which is typically the case), calls to retrieve a streaming URL can specify the file name with no extension.

Info

If the streaming media player is not displayed in DuraCloud after you enable streaming (and select a content item), then the Flash player may not be enabled in your browser.

In Google Chrome, go to: chrome://settings/content/flash, then add "https://[*.]duracloud.org" into the Allow section. Once this setting is in place, refresh the DuraCloud UI page, and the viewer should appear. Other browsers may require an add-on or a similar series of steps to enable Flash.

RTMP Integration Demo Files

The following files are available as a bundle here.
They are intended as a starting point for integrating streaming media into your own website.

  • player.swf - The flash-based video player JWPlayer
  • playlist.xml - An example playlist which would include a list of items in your Source Media Space
  • playlistplayer.html - An HTML file which uses JWPlayer to display the items in the playlist
  • singleplayer.html - An HTML file which uses JWPlayer to display a single media file
  • stylish.swf - A supplementary flash file used to style the JWPlayer
  • swfobject.js - A javascript file (available from here) used to embed the JWPlayer on a web page
  • viewer.js - A javascript file used to simplify the loading of JWPlayer

All of the above files are intended as examples only. Their purpose is to give developers a starting point for embedding video streamed by DuraCloud on their own web pages.


Info

If you add files to a space with streaming turned on, those files will automatically be made available for streaming as well.

...