/

VOD


The VOD API requires cloud storage for VOD to be configured on your server nodes.

List cloud storage HLS content

Description

Returns list of HLS playlists (m3u8) available on cloud bucket (S3 etc) for playback. These media files are created when a live stream is recorded on Red5 Pro with the 'record' parameter and then moved to cloud storage by Red5 Pro's cloud-storage plugin.

REQUEST

  • URI: http://{host}:{port}/streammanager/api/4.0/media/{scopeName}/playlists OR

    http://{host}:{port}/streammanager/api/4.0/media/{scopeName}/playlists/{subscope}

    If your content was recorded at a sub-scope level of an application, you will need to specify the sub-scope path at the {subscope} placeholder.

  • Method: GET

RESPONSE

  • Failure: HTTP CODE 400 or 404
  • Data :
    {
      "errorMessage": "<error-message-string>",
      "timestamp": <error-timestamp>
    }
  • Success: HTTP CODE 200
  • Data:
    {
      "playlists": [
        {
          "name": "<playlist-name>",
          "lastModified": <last-modified>,
          "length": <vod-duration>,
          "url": "<playlist-url>"
        }
      ]
    }

Example

REQUEST

  • URI: http://{host}:{port}/streammanager/api/4.0/media/live/playlists
  • Method : GET

RESPONSE

  • Success: HTTP CODE 200
  • Data:
    {
      "playlists": [
        {
          "name": "stream1.m3u8",
          "lastModified": 1475674784000,
          "length": 210,
          "url": "https://red5vodpro.s3.amazonaws.com/live/stream1/stream1.m3u8"
        }
      ]
    }

List cloud storage media files content

Description

Returns list of FLV and MP4 media files available on cloud storage bucket (S3 etc) for playback. These media files are created when a live stream is recorded on Red5 Pro with the record parameter and then is moved to cloud storage by the Red5 Pro cloud-storage writer Post-Processor.

REQUEST

  • URI: http://{host}:{port}/streammanager/api/4.0/media/{scopeName}/mediafiles OR

    http://{host}:{port}/streammanager/api/4.0/media/{scopeName}/mediafiles/{subscope}

    If your content was recorded at a sub-scope level of an application, you will need to specify the sub-scope path at the {subscope} placeholder.

  • Method: GET

RESPONSE

  • Failure: HTTP CODE 400 or 404
  • Data:
    {
      "errorMessage": "<error-message-string>",
      "timestamp": <error-timestamp>
    }
  • Success: HTTP CODE 200
  • Data:
    {
      "mediafiles": [
        {
          "name": "<media-name>",
          "lastModified": <last-modified>,
          "length": <duration>,
          "url": "<media-url>"
        }
      ]
    }

Example

REQUEST

  • URI: http://{host}:{port}/streammanager/api/4.0/media/live/mediafiles
  • Method : GET

RESPONSE

  • Success: HTTP CODE 200
  • Data:
    {
      "mediafiles": [
        {
          "name": "stream1.flv",
          "lastModified": 1475674784000,
          "length": 1519198,
          "url": "https://red5vodpro.s3.amazonaws.com/live/streams/stream1.flv"
        }
      ]
    }