Skip to content

Commit 5dc2774

Browse files
tongyimingmikatong
and
mikatong
authored
fix(vod): [116206298] update vod doc (#2561)
* fix vod doc * update doc --------- Co-authored-by: mikatong <[email protected]>
1 parent 1238773 commit 5dc2774

File tree

6 files changed

+282
-1
lines changed

6 files changed

+282
-1
lines changed

tencentcloud/provider.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,6 +1119,9 @@ Video on Demand(VOD)
11191119
tencentcloud_vod_image_sprite_template
11201120
tencentcloud_vod_super_player_config
11211121
tencentcloud_vod_sub_application
1122+
tencentcloud_vod_sample_snapshot_template
1123+
tencentcloud_vod_transcode_template
1124+
tencentcloud_vod_watermark_template
11221125

11231126
Oceanus
11241127
Data Source

tencentcloud/services/vod/resource_tc_vod_transcode_template.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func ResourceTencentCloudVodTranscodeTemplate() *schema.Resource {
108108
"vcrf": {
109109
Type: schema.TypeInt,
110110
Optional: true,
111-
Description: "The video constant rate factor (CRF). Value range: 1-51.If this parameter is specified, CRF encoding will be used and the bitrate parameter will be ignored.If `Codec` is `H.266`, this parameter is required (`28` is recommended).We dont recommend using this parameter unless you have special requirements.",
111+
Description: "The video constant rate factor (CRF). Value range: 1-51.If this parameter is specified, CRF encoding will be used and the bitrate parameter will be ignored.If `Codec` is `H.266`, this parameter is required (`28` is recommended).We don't recommend using this parameter unless you have special requirements.",
112112
},
113113
"gop": {
114114
Type: schema.TypeInt,
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
subcategory: "Video on Demand(VOD)"
3+
layout: "tencentcloud"
4+
page_title: "TencentCloud: tencentcloud_vod_sample_snapshot_template"
5+
sidebar_current: "docs-tencentcloud-resource-vod_sample_snapshot_template"
6+
description: |-
7+
Provides a resource to create a vod snapshot template
8+
---
9+
10+
# tencentcloud_vod_sample_snapshot_template
11+
12+
Provides a resource to create a vod snapshot template
13+
14+
## Example Usage
15+
16+
```hcl
17+
resource "tencentcloud_vod_sub_application" "sub_application" {
18+
name = "snapshotTemplateSubApplication"
19+
status = "On"
20+
description = "this is sub application"
21+
}
22+
23+
resource "tencentcloud_vod_sample_snapshot_template" "sample_snapshot_template" {
24+
sample_type = "Percent"
25+
sample_interval = 10
26+
sub_app_id = tonumber(split("#", tencentcloud_vod_sub_application.sub_application.id)[1])
27+
name = "testSampleSnapshot"
28+
width = 500
29+
height = 400
30+
resolution_adaptive = "open"
31+
format = "jpg"
32+
comment = "test sample snopshot"
33+
fill_type = "black"
34+
}
35+
```
36+
37+
## Argument Reference
38+
39+
The following arguments are supported:
40+
41+
* `sample_interval` - (Required, Int) Sampling interval. If `SampleType` is `Percent`, sampling will be performed at an interval of the specified percentage. If `SampleType` is `Time`, sampling will be performed at the specified time interval in seconds.
42+
* `sample_type` - (Required, String) Sampled screencapturing type. Valid values: Percent: by percent. Time: by time interval.
43+
* `sub_app_id` - (Required, Int) The VOD [application](https://intl.cloud.tencent.com/document/product/266/14574) ID. For customers who activate VOD service from December 25, 2023, if they want to access resources in a VOD application (whether it's the default application or a newly created one), they must fill in this field with the application ID.
44+
* `comment` - (Optional, String) Template description. Length limit: 256 characters.
45+
* `fill_type` - (Optional, String) Fill type. Fill refers to the way of processing a screenshot when its aspect ratio is different from that of the source video. The following fill types are supported: stretch: stretch. The screenshot will be stretched frame by frame to match the aspect ratio of the source video, which may make the screenshot shorter or longer; black: fill with black. This option retains the aspect ratio of the source video for the screenshot and fills the unmatched area with black color blocks. white: fill with white. This option retains the aspect ratio of the source video for the screenshot and fills the unmatched area with white color blocks. gauss: fill with Gaussian blur. This option retains the aspect ratio of the source video for the screenshot and fills the unmatched area with Gaussian blur.Default value: black.
46+
* `format` - (Optional, String) Image format. Valid values: jpg, png. Default value: jpg.
47+
* `height` - (Optional, Int) Maximum value of the height (or short side) of a screenshot in px. Value range: 0 and [128, 4,096]. If both `Width` and `Height` are 0, the resolution will be the same as that of the source video; If `Width` is 0, but `Height` is not 0, `Width` will be proportionally scaled; If `Width` is not 0, but `Height` is 0, `Height` will be proportionally scaled; If both `Width` and `Height` are not 0, the custom resolution will be used.Default value: 0.
48+
* `name` - (Optional, String) Name of a sampled screencapturing template. Length limit: 64 characters.
49+
* `resolution_adaptive` - (Optional, String) Resolution adaption. Valid values: open: enabled. In this case, `Width` represents the long side of a video, while `Height` the short side; close: disabled. In this case, `Width` represents the width of a video, while `Height` the height.Default value: open.
50+
* `width` - (Optional, Int) Maximum value of the width (or long side) of a screenshot in px. Value range: 0 and [128, 4,096]. If both `Width` and `Height` are 0, the resolution will be the same as that of the source video; If `Width` is 0, but `Height` is not 0, `Width` will be proportionally scaled; If `Width` is not 0, but `Height` is 0, `Height` will be proportionally scaled; If both `Width` and `Height` are not 0, the custom resolution will be used.Default value: 0.
51+
52+
## Attributes Reference
53+
54+
In addition to all arguments above, the following attributes are exported:
55+
56+
* `id` - ID of the resource.
57+
58+
59+
60+
## Import
61+
62+
vod snapshot template can be imported using the id, e.g.
63+
64+
```
65+
terraform import tencentcloud_vod_sample_snapshot_template.sample_snapshot_template $subAppId#$templateId
66+
```
67+
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
subcategory: "Video on Demand(VOD)"
3+
layout: "tencentcloud"
4+
page_title: "TencentCloud: tencentcloud_vod_transcode_template"
5+
sidebar_current: "docs-tencentcloud-resource-vod_transcode_template"
6+
description: |-
7+
Provides a resource to create a vod transcode template
8+
---
9+
10+
# tencentcloud_vod_transcode_template
11+
12+
Provides a resource to create a vod transcode template
13+
14+
## Example Usage
15+
16+
```hcl
17+
resource "tencentcloud_vod_sub_application" "sub_application" {
18+
name = "transcodeTemplateSubApplication"
19+
status = "On"
20+
description = "this is sub application"
21+
}
22+
23+
resource "tencentcloud_vod_transcode_template" "transcode_template" {
24+
container = "mp4"
25+
sub_app_id = tonumber(split("#", tencentcloud_vod_sub_application.sub_application.id)[1])
26+
name = "720pTranscodeTemplate"
27+
comment = "test transcode mp4 720p"
28+
remove_video = 0
29+
remove_audio = 0
30+
video_template {
31+
codec = "libx264"
32+
fps = 26
33+
bitrate = 1000
34+
resolution_adaptive = "open"
35+
width = 0
36+
height = 720
37+
fill_type = "stretch"
38+
vcrf = 1
39+
gop = 250
40+
preserve_hdr_switch = "OFF"
41+
codec_tag = "hvc1"
42+
43+
}
44+
audio_template {
45+
codec = "libfdk_aac"
46+
bitrate = 128
47+
sample_rate = 44100
48+
audio_channel = 2
49+
}
50+
segment_type = "ts"
51+
}
52+
```
53+
54+
## Argument Reference
55+
56+
The following arguments are supported:
57+
58+
* `container` - (Required, String) The container format. Valid values: `mp4`, `flv`, `hls`, `mp3`, `flac`, `ogg`, `m4a`, `wav` ( `mp3`, `flac`, `ogg`, `m4a`, and `wav` are audio file formats).
59+
* `audio_template` - (Optional, List) Audio stream configuration parameter. This field is required when `RemoveAudio` is 0.
60+
* `comment` - (Optional, String) Template description. Length limit: 256 characters.
61+
* `name` - (Optional, String) Transcoding template name. Length limit: 64 characters.
62+
* `remove_audio` - (Optional, Int) Whether to remove audio data. Valid values:0: retain 1: remove Default value: 0.
63+
* `remove_video` - (Optional, Int) Whether to remove video data. Valid values:
64+
- 0: retain
65+
- 1: remove
66+
Default value: 0.
67+
* `segment_type` - (Optional, String) The segment type. This parameter is valid only if `Container` is `hls`. Valid values: `ts`: TS segment; `fmp4`: fMP4 segment Default: `ts`.
68+
* `sub_app_id` - (Optional, Int) The VOD [application](https://intl.cloud.tencent.com/document/product/266/14574) ID. For customers who activate VOD service from December 25, 2023, if they want to access resources in a VOD application (whether it's the default application or a newly created one), they must fill in this field with the application ID.
69+
* `tehd_config` - (Optional, List) TESHD transcoding parameter.
70+
* `video_template` - (Optional, List) Video stream configuration parameter. This field is required when `RemoveVideo` is 0.
71+
72+
The `audio_template` object supports the following:
73+
74+
* `bitrate` - (Required, Int) Audio stream bitrate in Kbps. Value range: 0 and [26, 256].If the value is 0, the bitrate of the audio stream will be the same as that of the original audio.
75+
* `codec` - (Required, String) The audio codec.If `Container` is `mp3`, the valid value is:`libmp3lame`If `Container` is `ogg` or `flac`, the valid value is:`flac`If `Container` is `m4a`, the valid values are:`libfdk_aac``libmp3lame``ac3`If `Container` is `mp4` or `flv`, the valid values are:`libfdk_aac` (Recommended for MP4)`libmp3lame` (Recommended for FLV)`mp2`If `Container` is `hls`, the valid value is:`libfdk_aac`If `Format` is `HLS` or `MPEG-DASH`, the valid value is:`libfdk_aac`If `Container` is `wav`, the valid value is:`pcm16`.
76+
* `sample_rate` - (Required, Int) The audio sample rate. Valid values:`16000` (valid only if `Codec` is `pcm16`)`32000``44100``48000`Unit: Hz.
77+
* `audio_channel` - (Optional, Int) Audio channel system. Valid values:1: mono-channel2: dual-channel6: stereoYou cannot set the sound channel as stereo for media files in container formats for audios (FLAC, OGG, MP3, M4A).Default value: 2.
78+
79+
The `tehd_config` object supports the following:
80+
81+
* `type` - (Required, String) TESHD transcoding type. Valid values: TEHD-100, OFF (default).
82+
* `max_video_bitrate` - (Optional, Int) Maximum bitrate, which is valid when `Type` is `TESHD`.If this parameter is left blank or 0 is entered, there will be no upper limit for bitrate.
83+
84+
The `video_template` object supports the following:
85+
86+
* `bitrate` - (Required, Int) Bitrate of video stream in Kbps. Value range: 0 and [128, 35,000].If the value is 0, the bitrate of the video will be the same as that of the source video.
87+
* `codec` - (Required, String) The video codec. Valid values:libx264: H.264; libx265: H.265; av1: AOMedia Video 1; H.266: H.266. The AOMedia Video 1 and H.266 codecs can only be used for MP4 files. Only CRF is supported for H.266 currently.
88+
* `fps` - (Required, Int) Video frame rate in Hz. Value range: [0,100].If the value is 0, the frame rate will be the same as that of the source video.
89+
* `codec_tag` - (Optional, String) The codec tag. This parameter is valid only if the H.265 codec is used. Valid values:hvc1hev1Default value: hvc1.
90+
* `fill_type` - (Optional, String) Fill type, the way of processing a screenshot when the configured aspect ratio is different from that of the source video. Valid values:stretch: stretches the video image frame by frame to fill the screen. The video image may become squashed or stretched after transcoding.black: fills the uncovered area with black color, without changing the image&#39;s aspect ratio.white: fills the uncovered area with white color, without changing the image&#39;s aspect ratio.gauss: applies Gaussian blur to the uncovered area, without changing the image&#39;s aspect ratio.Default value: black.
91+
* `gop` - (Optional, Int) I-frame interval in frames. Valid values: 0 and 1-100000.When this parameter is set to 0 or left empty, `Gop` will be automatically set.
92+
* `height` - (Optional, Int) The maximum video height (or short side) in pixels. Value range: 0 and [128, 8192].If both `Width` and `Height` are 0, the output resolution will be the same as that of the source video.If `Width` is 0 and `Height` is not, the video width will be proportionally scaled.If `Width` is not 0 and `Height` is, the video height will be proportionally scaled.If neither `Width` nor `Height` is 0, the specified width and height will be used.Default value: 0.
93+
* `preserve_hdr_switch` - (Optional, String) Whether to output an HDR (high dynamic range) video if the source video is HDR. Valid values:ON: If the source video is HDR, output an HDR video; if not, output an SDR (standard dynamic range) video.OFF: Output an SDR video regardless of whether the source video is HDR.Default value: OFF.
94+
* `resolution_adaptive` - (Optional, String) Resolution adaption. Valid values:open: enabled. In this case, `Width` represents the long side of a video, while `Height` the short side;close: disabled. In this case, `Width` represents the width of a video, while `Height` the height.Default value: open.Note: this field may return null, indicating that no valid values can be obtained.
95+
* `vcrf` - (Optional, Int) The video constant rate factor (CRF). Value range: 1-51.If this parameter is specified, CRF encoding will be used and the bitrate parameter will be ignored.If `Codec` is `H.266`, this parameter is required (`28` is recommended).We don't recommend using this parameter unless you have special requirements.
96+
* `width` - (Optional, Int) The maximum video width (or long side) in pixels. Value range: 0 and [128, 8192].If both `Width` and `Height` are 0, the output resolution will be the same as that of the source video.If `Width` is 0 and `Height` is not, the video width will be proportionally scaled.If `Width` is not 0 and `Height` is, the video height will be proportionally scaled.If neither `Width` nor `Height` is 0, the specified width and height will be used.Default value: 0.
97+
98+
## Attributes Reference
99+
100+
In addition to all arguments above, the following attributes are exported:
101+
102+
* `id` - ID of the resource.
103+
104+
105+
106+
## Import
107+
108+
vod transcode template can be imported using the id, e.g.
109+
110+
```
111+
terraform import tencentcloud_vod_transcode_template.transcode_template $subAppId#$templateId
112+
```
113+

0 commit comments

Comments
 (0)