Record a real-time stream with the Wowza Video REST API

Learn how to record your Real-Time Streaming at Scale stream. You have to set the recording options when you create the real-time stream; you can't change them after a stream is created.

Before you start

You should have access to the following items:

  • RTS@S licenseContact us for more information. To enable and purchase capacity for Real-Time Streaming at Scale for your account and access the /real_time operations, contact 720.279.8163 or schedule a call.

1. Create a real-time stream

Create a real-time stream by sending a POST request to the /real_time endpoint. By default, record is false.  To record a real-time stream:

  • Set record to true.

    Wowza Cloud subcribers: This will create an MP4 that you can download later.

    Wowza Video subscribers: This will create an MP4 that you can download later and also process the stream through the VOD encoder, which creates a VOD stream that you can use later to restream the best quality stream your viewers connection can support. 

    If you only want an MP4 download, also set disable_vod_encoder to true. It is false by default, and you'll get both an MP4 and a VOD stream. VOD streams can take a bit of processing time as multiple renditions are created. If you only need the MP4, you can save processing time by skipping VOD stream creation.
  • Change any values unique to your broadcast, using the API reference documentation as a resource. See the Endpoint Reference button below for a full list of options.

Sample request

Endpoint Reference

curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${WV_JWT}" \
-d '{
   "real_time_stream": {
     "name": "MyRealTimeStream",
     "record": true,
     "disable_vod_encoder": true
   } 
}' "${WV_HOST}/api/${WV_VERSION}/real_time"

Sample response

The response includes:

  • An ID that you can use to perform other actions on the stream, like getting the details or deleting it. This is also used to configure the viewer page.
{
  "real_time_stream": {
    "id": "2adffc17",
    "name": "MyRealTimeStream",
    "stream_name": "8d304b93f1684320a54f2798666eeca7",
    "token": "97e52731bc21ef66e4c05a8ee1e28b64bf5f9db728573d94e690277cea9215bc",
    "subscribe_token": "50e161bfa42fbd581a0dfe5f632596b86c2c577a56bd439b38f8c904aabad04d",
    "rtmp_url": "rtmp://[primary_server]:[host_port]/[sub-domain]/[stream_name]?[token]",
    "enable_secure_viewer": true,
    "state": "active",
    "recording": true,
    "disable_vod_encoder": true,
    "created_at": "2021-06-30T18:02:20.00Z",
    "updated_at": "2021-06-30T20:03:16.00Z",
    "region": "phoenix"
  }
}

This example creates a real-time stream that will record the stream and create only an MP4, not a VOD stream.

2. Finish configuring your real-time-stream

Step 1, what you just worked through, is a modification to step 1 in this article: Deliver real-time streams with the Wowza Video REST API. Use the linked article to complete set up for your real-time stream, starting at step 2.