Creating a Recording Template
Live allows you to record a livestream and store the recording in VOD, where you can download and share the recording.
Figure 1 shows the process of recording live video to VOD.
- Add a VOD domain name. Before managing recording files in VOD, you need to enable the VOD service and add a domain name for VOD acceleration. For details, see Getting Started with VOD.
- Configure a recording template. You can configure multiple templates. The recording template whose App Name and Stream Name match those in your ingest URL will be applied, and recordings will be stored in VOD based on template settings. You can set a callback address to get notifications about the recording status.
- Push a stream through an ingest URL and record the livestream based on the configured recording template. For details about how to create an ingest URL, see Assembling an Ingest URL.
- Manage recordings. You can view basic information about recordings on the Live console, and manage recordings, such as preview, sharing, and deletion, on the VOD console.
The recordings have the same resolution as the pushed stream.
Notes
- This function is available only in AP-Singapore.
- Recording templates can be configured at domain name, application, and stream levels. Templates at the stream level take effect first. Templates at the same level must have the same recording type.
- Recordings cannot be deleted from Live because Live does not store recordings. Live logs recording events and store them for 30 days.
- If stream push is interrupted due to network jitter during live recording, recording stops. When stream push resumes, recording restarts accordingly.
- Recording starts when stream push starts and stops until stream push ends. Recording cannot be stopped or started during stream push. If the recording template is deleted during stream push, recording continues until stream push ends.
- Only input livestreams can be recorded. Transcoded livestreams cannot be recorded.
Prerequisites
- You have added an ingest domain name.
- You have configured CNAME records at your domain names' DNS provider.
- You have enabled the function of recording to VOD. To enable it, submit a service ticket.
- You have enabled the VOD service and added a domain name for VOD acceleration. This is a required step before you can manage recording files in VOD. For details, see Getting Started with VOD.
Pricing Notes
- Live recording is billed by Live. For details, see Recording Billing.
- Live recordings are stored in VOD. Therefore, VOD charges you for the storage. For details, see VOD Pricing Details.
Step 1: Add a VOD Domain Name
Before managing recording files in VOD, you need to enable the VOD service and add a domain name for VOD acceleration. For details, see Getting Started with VOD.
Step 2: Configure a Recording Template
If you want to record livestreams for replay, configure recording templates. The recording template whose App Name and Stream Name match those in your ingest URL will be applied.
- Log in to the Live console.
- In the navigation pane, choose .
- Click Manage in the Operation column of the desired ingest domain name.
- In the navigation pane, choose Templates > Recording (New).
- Click Create Recording Template. The Recording dialog box is displayed on the right, as shown in Figure 2.
Configure recording parameters based on Table 1.
Table 1 Parameters Parameter
Description
Recording Type
- Automatic: The recording automatically starts when livestreams that match the recording template are pushed.
- Manual: When livestreams that match the recording template are pushed, you can call the API for Submitting a Recording Command to start or stop the recording.
NOTE:- The recording type cannot be changed after the template is created.
- You can call the API to start recording only when the livestreams have been pushed.
- Manual recording supports only recording start and stop for a specific stream. Even if the recording template is at the domain name level, the stream name must be specified when you deliver the recording start and stop commands.
- To manually stop recording, you can set Maximum Stream Pause Length when configuring the recording template, so that recording will stop when the stream has been paused beyond the time indicated by Maximum Stream Pause Length. You can also call an API to stop recording.
- After the command for stopping recording is manually delivered, it takes a period of time to clear resources for the recording task. If the command for starting recording is delivered again shortly after the stop command is delivered, a message indicating that the recording task is not complete may be returned.
App Name
Application name. The default value is live. You can customize the application name. Only letters, digits, underscores (_), and hyphens (-) are allowed. If this parameter is set to *, the recording template applies to all applications under the domain name.
Stream Name
Livestream name. If this parameter is set to *, the recording template applies to all livestreams under the specified application.
Storage Location
Where recordings are stored
Select Video on Demand (VOD).
Transcoding Template Group Name
Enter the name of the transcoding template group configured in VOD.
You can create a transcoding template group in VOD or use an existing one. For details, see Transcoding Settings.
Recording Format
Format of recordings. Live videos can be recorded in HLS, FLV, or MP4 format.
HLS
Recording Length: Its value ranges from 1 to 720 minutes. If a live video has been recorded for more than 12 hours, a new M3U8 file will be created based on the naming rule.
Options of Max Stream Pause Length:
- Generate a new file when a stream is paused. This option is not supported for HLS.
- Do not generate a new file when a stream is paused
- Other: If the interruption duration of a livestream is within the specified range, no new recording file is generated. Otherwise, a new recording file is generated. The maximum interruption duration of a livestream is 300s.
FLV
Recording Length: Its value ranges from 1 to 360 minutes. If a live video has been recorded for more than six hours, a new file will be created based on the naming rule.
Options of Max Stream Pause Length:
- Generate a new file when a stream is paused.
- Other: If the interruption duration of a livestream is within the specified range, no new recording file is generated. Otherwise, a new recording file is generated.
MP4
Recording Length: Its value ranges from 1 to 360 minutes. If a live video has been recorded for more than six hours, a new file will be created based on the naming rule.
Options of Max Stream Pause Length:
- Generate a new file when a stream is paused.
- Other: If the interruption duration of a livestream is within the specified range, no new recording file is generated. Otherwise, a new recording file is generated.
If livestream push is normal, the time when HLS recordings are generated is related to the keyframe interval configured on the player. By default, the first recording is generated after three keyframe intervals (6 seconds). An FLV or MP4 recording is generated only after the recording ends.
The value of Max Stream Pause Length affects the triggering of the recording callback event RECORD_FILE_COMPLETE.
- Do not generate a new file when a stream is paused: This option is not supported for recording to VOD.
- Generate a new file when a stream is paused: Every time a stream is interrupted, a new recording file is generated and the recording callback event is triggered.
- Other: Every time the stream pause duration reaches the specified value, a new recording file is generated and the recording callback event is triggered. If the stream pause duration does not reach the specified value but the recording duration does, a recording file is generated and the recording callback event is triggered.
- Click OK.
You can create multiple recording templates. The recording template whose App Name and Stream Name match those in your ingest URL will be applied.
- Obtain an ingest URL to push streams.
The resolution and bitrate of the generated recordings match those of the livestreams.
You can manage recordings on the Live or VOD console, such as preview, download, and share.
Modifying or Deleting a Recording Template
You can perform the following operations on your recording template:
- Editing a recording template
Click Edit in the Operation column of the row containing the target recording template in the template list to edit the template.
The recording type cannot be changed.
- Deleting a recording template
Click Delete in the Operation column of the row containing the target recording template in the template list to delete the template.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot

