The audio transcoding parameters for recording.
Used by actions: CreateCloudRecording.
Name | Type | Required | Description |
---|---|---|---|
SampleRate | Integer | Yes | The audio sample rate. 1: 48000 Hz (default) 2: 44100 Hz 3: 16000 Hz |
Channel | Integer | Yes | The number of sound channels. 1: Mono-channel 2: Dual-channel (default) |
BitRate | Integer | Yes | The audio bitrate (bps). Value range: [32000, 128000]. Default: 64000. |
The cloud storage information.
Used by actions: CreateCloudRecording.
Name | Type | Required | Description |
---|---|---|---|
Vendor | Integer | Yes | The cloud storage provider. 0: Tencent Cloud COS. The storage services of other providers are not supported currently. |
Region | String | Yes | The region of cloud storage. |
Bucket | String | Yes | The storage bucket. |
AccessKey | String | Yes | The access_key of the cloud storage account. |
SecretKey | String | Yes | The secret_key of the cloud storage account. |
FileNamePrefix | Array of String | No | The bucket to save data, which is an array of strings that can contain letters (a-z and A-Z), numbers (0-9), underscores (_), and hyphens (-). For example, if the value of this parameter is ["prefix1", "prefix2"] , the recording file xxx.m3u8 will be saved as prefix1/prefix2/TaskId/xxx.m3u8 . |
The VOD parameters.
Used by actions: CreateCloudRecording.
Name | Type | Required | Description |
---|---|---|---|
TencentVod | TencentVod | No | The Tencent Cloud VOD parameters. |
The custom layout parameters.
Used by actions: CreateCloudRecording, ModifyCloudRecording.
Name | Type | Required | Description |
---|---|---|---|
Top | Integer | Yes | The Y axis of the window’s top-left corner. Value range: [0, 1920]. The value cannot be larger than the canvas height. |
Left | Integer | Yes | The X axis of the window’s top-left corner. Value range: [0, 1920]. The value cannot be larger than the canvas width. |
Width | Integer | Yes | The relative width of the window. Value range: [0, 1920]. The sum of the values of this parameter and Left cannot exceed the canvas width. |
Height | Integer | Yes | The relative height of the window. Value range: [0, 1920]. The sum of the values of this parameter and Top cannot exceed the canvas height. |
UserId | String | No | The user ID (string) of the anchor whose video is shown in the window. If you do not set this parameter, anchors’ videos will be shown in their room entry sequence. |
Alpha | Integer | No | The degree of transparency of the canvas. Value range: [0, 255]. 0 means fully opaque, and 255 means fully transparent. |
RenderMode | Integer | No | 0: Stretch. In this mode, the image is stretched to fill the space available. The whole image is visible after scaling. However, if the original aspect ratio is different from the target, the image may be distorted. 1: Crop (default). In this mode, if the original aspect ratio is different from the target, the image will be cropped according to the target before being stretched to fill the space available. The image will not be distorted. 2: Blank. This mode stretches the image while keeping its original aspect ratio. If the original aspect ratio is different from the target, there may be blank spaces to the top and bottom or to the left and right of the window. 3: Smart stretch. This mode is similar to the crop mode, except that it restricts cropping to 20% of the image’s width or height at most. |
MediaId | Integer | No | The type of the stream subscribed to. 0: Primary stream (default) 1: Substream |
ImageLayer | Integer | No | The image layer. 0 is the default value and means the bottommost layer. |
SubBackgroundImage | String | No | The download URL of the background image for a window. The image must be in JPG or PNG format and cannot be larger than 5 MB. If the image’s aspect ratio is different from that of the window, the image will be rendered according to the value of RenderMode . |
The layout parameters for mixed-stream recording.
Used by actions: CreateCloudRecording, ModifyCloudRecording.
Name | Type | Required | Description |
---|---|---|---|
MixLayoutMode | Integer | Yes | Layout mode: 1: Floating 2: Screen sharing 3: Grid (default) 4: Custom Floating: By default, the video of the first anchor (you can also specify an anchor) who enters the room is scaled to fill the screen. When other anchors enter the room, their videos appear smaller and are superimposed over the large video from left to right starting from the bottom of the canvas according to their room entry sequence. If the total number of videos is 17 or less, there will be four windows in each row (4 x 4); if it is greater than 17, there will be five windows in each row (5 x 5). Up to 25 videos can be displayed. A user who publishes only audio will still be displayed in one window. Screen sharing: The video of a specified anchor occupies a larger part of the canvas on the left side (if you do not specify an anchor, the left window will display the canvas background). The videos of other anchors are smaller and are positioned on the right side. If the total number of videos is 17 or less, the small videos are positioned from top to bottom in up to two columns on the right side, with eight videos per column at most. If there are more than 17 videos, the additional videos are positioned at the bottom of the canvas from left to right. Up to 25 videos can be displayed. A user who publishes only audio will still be displayed in one window. Grid: The videos of anchors are scaled and positioned automatically according to the total number of anchors in a room. Each video has the same size. Up to 25 videos can be displayed. Custom: Specify the layout of videos by using the MixLayoutList parameter. |
MixLayoutList | Array of MixLayout | No | The custom layout details. This parameter is valid if MixLayoutMode is set to 4 . Up to 25 videos can be displayed. |
BackGroundColor | String | No | The background color, which is a hexadecimal value (starting with "#", followed by the color value) converted from an 8-bit RGB value. For example, the RGB value of orange is R:255 G:165 B:0 , and its hexadecimal value is #FFA500 . The default color is black. |
MaxResolutionUserId | String | No | The user whose video is displayed in the big window. This parameter is valid if MixLayoutMode is set to 1 (floating) or 2 (screen sharing). If it is left empty, the first anchor entering the room is displayed in the big window in the floating mode and the canvas background is displayed in the screen sharing mode. |
MediaId | Integer | No | The stream type. 0: Primary stream (default) 1: Substream (screen sharing stream) This parameter specifies the type of the stream displayed in the big window. If it appears in MixLayoutList , it indicates the type of the stream of a specified user. |
BackgroundImageUrl | String | No | The download URL of the background image for the canvas, which must be in JPG or PNG format and cannot be larger than 5 MB. |
PlaceHolderMode | Integer | No | 1 means to use placeholders, and 0 (default) means to not use placeholders. If this parameter is set to 1 , when a user is not publishing video, a placeholder image will be displayed in the window reserved for the user. |
BackgroundImageRenderMode | Integer | No | The render mode to use when the aspect ratio of a video is different from that of the window. This parameter is defined the same as RenderMode in MixLayoufList . |
DefaultSubBackgroundImage | String | No | The download URL of the default background image for a window. The image must be in JPG or PNG format and cannot be larger than 5 MB. If the image’s aspect ratio is different from that of the window, the image will be rendered according to the value of RenderMode . |
WaterMarkList | Array of WaterMark | No | The watermark layout. Up to 25 watermarks are supported. |
The audio and video parameters for recording.
Used by actions: CreateCloudRecording.
Name | Type | Required | Description |
---|---|---|---|
VideoParams | VideoParams | No | The video transcoding parameters for recording. If you set this parameter, you must specify all its fields. If you do not set it, the default will be used. |
AudioParams | AudioParams | No | The audio transcoding parameters for recording. If you set this parameter, you must specify all its fields. If you do not set it, the default will be used. |
The on-cloud recording parameters.
Used by actions: CreateCloudRecording.
Name | Type | Required | Description |
---|---|---|---|
RecordMode | Integer | Yes | The recording mode. 1: Single-stream recording. Records the audio and video of each subscribed user ( UserId ) in a room and saves the recording files (M3U8/TS) to the cloud.2: Mixed-stream recording. Mixes the audios and videos of subscribed users ( UserId ) in a room, records the mixed stream, and saves the recording files (M3U8/TS) to the cloud. |
MaxIdleTime | Integer | No | The time period (seconds) to wait after there are no anchors in a room to stop recording automatically. The value cannot be smaller than 5 or larger than 86400 (24 hours). Default value: 30. |
StreamType | Integer | No | The media type of the streams to record. 0: Audio and video streams (default) 1: Audio streams only 2: Video streams only |
SubscribeStreamUserIds | SubscribeStreamUserIds | No | The allowlist/blocklist for stream subscription. |
OutputFormat | Integer | No | The format of recording files. 0 (default): HLS; 1: HLS + MP4 (recorded in HLS and converted to MP4). |
The information of the recording files, which is returned by the DescribeCloudRecording
API.
Used by actions: DescribeCloudRecording.
Name | Type | Description |
---|---|---|
UserId | String | The user whose stream is recorded into the file. In the mixed-stream recording mode, this parameter will be empty. Note: This field may return null , indicating that no valid values can be obtained. |
FileName | String | The filename. |
TrackType | String | The type of the media recorded. video audio audio_video Note: This field may return null , indicating that no valid values can be obtained. |
BeginTimeStamp | Integer | The start time (Unix timestamp) of the recording file. |
The storage parameters.
Used by actions: CreateCloudRecording.
Name | Type | Required | Description |
---|---|---|---|
CloudStorage | CloudStorage | No | The cloud storage information. |
CloudVod | CloudVod | No | The VOD information. |
The subscription allowlist/blocklist. You cannot specify an allowlist and a blocklist for audio/video subscription at the same time. The maximum number of streams one can receive at the same time is 25. When streams are mixed, up to 24 videos are supported. You can use .*$
to specify user IDs with the same prefix, but make sure there aren’t users whose IDs contain ".*$" and are exactly the same as the prefix you pass in. If there are, TRTC will only allow or block those users.
Used by actions: CreateCloudRecording, ModifyCloudRecording.
Name | Type | Required | Description |
---|---|---|---|
SubscribeAudioUserIds | Array of String | No | The allowlist for audio subscription. For example, ["1", "2", "3"] means to only subscribe to the audios of users 1, 2, and 3, and ["1.*$"] means to only subscribe to the audios of users whose ID prefix is 1 . If this parameter is left empty, the audios of all anchors in the room will be received. The array can contain at most 32 elements. |
UnSubscribeAudioUserIds | Array of String | No | The blocklist for audio subscription. For example, ["1", "2", "3"] means to not subscribe to the audios of users 1, 2, and 3, and ["1.*$"] means to not subscribe to users whose ID prefix is 1 . If this parameter is left empty, the audios of all anchors in the room will be received. The array can contain at most 32 elements. |
SubscribeVideoUserIds | Array of String | No | The allowlist for video subscription. For example, ["1", "2", "3"] means to only subscribe to the videos of users 1, 2, and 3, and ["1.*$"] means to only subscribe to the videos of users whose ID prefix is 1 . If this parameter is left empty, the videos of all anchors in the room will be received. The array can contain at most 32 elements. |
UnSubscribeVideoUserIds | Array of String | No | The blocklist for video subscription. For example, ["1", "2", "3"] means to not subscribe to the videos of users 1, 2, and 3, and ["1.*$"] means to not subscribe to the videos of users whose ID prefix is 1 . If this parameter is left empty, the videos of all anchors in the room will be received. The array can contain at most 32 elements. |
The Tencent Cloud VOD parameters.
Used by actions: CreateCloudRecording.
Name | Type | Required | Description |
---|---|---|---|
Procedure | String | No | The operation to perform on the media uploaded. The value of this parameter is the name of a task flow template. You can create a custom task flow template in Tencent Cloud VOD. |
ExpireTime | Integer | No | The expiration time of the media file, which is a time period (seconds) from the current time. For example, 86400 means to save the media file for one day. To save the file permanently, set this parameter to 0 . |
StorageRegion | String | No | The storage region. Set this parameter if you have special requirements on the storage region. |
ClassId | Integer | No | The category ID, which is returned after you create a category by calling an API. You can use categories to manage media files. The default value is 0 , which means others. |
SubAppId | Integer | No | The VOD subapplication ID. If you need to access a resource in a subapplication, set this parameter to the subapplication ID; otherwise, leave it empty. |
SessionContext | String | No | The task flow context, which is passed through after the task is completed. |
SourceContext | String | No | The upload context, which is passed through after upload is completed. |
The video transcoding parameters for recording.
Used by actions: CreateCloudRecording.
Name | Type | Required | Description |
---|---|---|---|
Width | Integer | Yes | The video width in pixels. The value of this parameter cannot be larger than 1920, and the result of multiplying Width and Height cannot exceed 1920 x 1080. The default value is 360 . |
Height | Integer | Yes | The video height in pixels. The value of this parameter cannot be larger than 1920, and the result of multiplying Width and Height cannot exceed 1920 x 1080. The default value is 640 . |
Fps | Integer | Yes | The video frame rate. Value range: [1, 60]. Default: 15. |
BitRate | Integer | Yes | The video bitrate (bps). Value range: [64000, 8192000]. Default: 550000. |
Gop | Integer | Yes | The keyframe interval (seconds). Default value: 10. |
The watermark layout.
Used by actions: CreateCloudRecording, ModifyCloudRecording.
Name | Type | Required | Description |
---|---|---|---|
WaterMarkType | Integer | No | The watermark type. 0 (default): image; 1: text (not supported yet). |
WaterMarkImage | WaterMarkImage | No | The information of watermark images. This parameter is required if the watermark type is image. |
The information of watermark images.
Used by actions: CreateCloudRecording, ModifyCloudRecording.
Name | Type | Required | Description |
---|---|---|---|
WaterMarkUrl | String | Yes | The download URLs of the watermark images, which must be in JPG or PNG format and cannot be larger than 5 MB. |
Top | Integer | Yes | The Y axis of the image's top-left corner. Value range: [0, 2560]. The value cannot be larger than the canvas height. |
Left | Integer | Yes | The X axis of the image’s top-left corner. Value range: [0, 2560]. The value cannot be larger than the canvas width. |
Width | Integer | Yes | The relative width of the image. Value range: [0, 2560]. The sum of the values of this parameter and Left cannot exceed the canvas width. |
Height | Integer | Yes | The relative height of the image. Value range: [0, 2560]. The sum of the values of this parameter and Top cannot exceed the canvas height. |
Was this page helpful?