|
| 1 | +--- |
| 2 | +subcategory: "Media Processing Service(MPS)" |
| 3 | +layout: "tencentcloud" |
| 4 | +page_title: "TencentCloud: tencentcloud_mps_transcode_template" |
| 5 | +sidebar_current: "docs-tencentcloud-resource-mps_transcode_template" |
| 6 | +description: |- |
| 7 | + Provides a resource to create a mps transcode_template |
| 8 | +--- |
| 9 | + |
| 10 | +# tencentcloud_mps_transcode_template |
| 11 | + |
| 12 | +Provides a resource to create a mps transcode_template |
| 13 | + |
| 14 | +## Example Usage |
| 15 | + |
| 16 | +```hcl |
| 17 | +resource "tencentcloud_mps_transcode_template" "transcode_template" { |
| 18 | + container = "mp4" |
| 19 | + name = "tf_transcode_template" |
| 20 | + remove_audio = 0 |
| 21 | + remove_video = 0 |
| 22 | +
|
| 23 | + audio_template { |
| 24 | + audio_channel = 2 |
| 25 | + bitrate = 27 |
| 26 | + codec = "libfdk_aac" |
| 27 | + sample_rate = 32000 |
| 28 | + } |
| 29 | +
|
| 30 | + video_template { |
| 31 | + bitrate = 130 |
| 32 | + codec = "libx264" |
| 33 | + fill_type = "black" |
| 34 | + fps = 20 |
| 35 | + gop = 0 |
| 36 | + height = 4096 |
| 37 | + resolution_adaptive = "close" |
| 38 | + vcrf = 0 |
| 39 | + width = 128 |
| 40 | + } |
| 41 | +} |
| 42 | +``` |
| 43 | + |
| 44 | +## Argument Reference |
| 45 | + |
| 46 | +The following arguments are supported: |
| 47 | + |
| 48 | +* `container` - (Required, String) Encapsulation format, optional values: mp4, flv, hls, mp3, flac, ogg, m4a. Among them, mp3, flac, ogg, m4a are pure audio files. |
| 49 | +* `audio_template` - (Optional, List) Audio stream configuration parameters, when RemoveAudio is 0, this field is required. |
| 50 | +* `comment` - (Optional, String) Template description information, length limit: 256 characters. |
| 51 | +* `enhance_config` - (Optional, List) Audio and video enhancement configuration. |
| 52 | +* `name` - (Optional, String) Transcoding template name, length limit: 64 characters. |
| 53 | +* `remove_audio` - (Optional, Int) Whether to remove audio data, value:0: reserved.1: remove.Default: 0. |
| 54 | +* `remove_video` - (Optional, Int) Whether to remove video data, value:0: reserved.1: remove.Default: 0. |
| 55 | +* `tehd_config` - (Optional, List) Ultra-fast HD transcoding parameters. |
| 56 | +* `video_template` - (Optional, List) Video stream configuration parameters, when RemoveVideo is 0, this field is required. |
| 57 | + |
| 58 | +The `artifact_repair` object supports the following: |
| 59 | + |
| 60 | +* `switch` - (Optional, String) Capability configuration switch, optional value: ON/OFF.Default value: ON. |
| 61 | +* `type` - (Optional, String) Type, optional value: weak/strong.Default value: weak.Note: This field may return null, indicating that no valid value can be obtained. |
| 62 | + |
| 63 | +The `audio_template` object supports the following: |
| 64 | + |
| 65 | +* `bitrate` - (Required, Int) Bit rate of the audio stream, value range: 0 and [26, 256], unit: kbps.When the value is 0, it means that the audio bit rate is consistent with the original audio. |
| 66 | +* `codec` - (Required, String) Encoding format of frequency stream.When the outer parameter Container is mp3, the optional value is:libmp3lame.When the outer parameter Container is ogg or flac, the optional value is:flac.When the outer parameter Container is m4a, the optional value is:libfdk_aac.libmp3lame.ac3.When the outer parameter Container is mp4 or flv, the optional value is:libfdk_aac: more suitable for mp4.libmp3lame: more suitable for flv.When the outer parameter Container is hls, the optional value is:libfdk_aac.libmp3lame. |
| 67 | +* `sample_rate` - (Required, Int) Sampling rate of audio stream, optional value.32000.44100.48000.Unit: Hz. |
| 68 | +* `audio_channel` - (Optional, Int) Audio channel mode, optional values:`1: single channel.2: Dual channel.6: Stereo.When the package format of the media is an audio format (flac, ogg, mp3, m4a), the number of channels is not allowed to be set to stereo.Default: 2. |
| 69 | + |
| 70 | +The `color_enhance` object supports the following: |
| 71 | + |
| 72 | +* `switch` - (Optional, String) Capability configuration switch, optional value: ON/OFF.Default value: ON. |
| 73 | +* `type` - (Optional, String) Type, optional value: weak/normal/strong.Default value: weak.Note: This field may return null, indicating that no valid value can be obtained. |
| 74 | + |
| 75 | +The `denoise` object supports the following: |
| 76 | + |
| 77 | +* `switch` - (Optional, String) Capability configuration switch, optional value: ON/OFF.Default value: ON. |
| 78 | +* `type` - (Optional, String) Type, optional value: weak/strong.Default value: weak.Note: This field may return null, indicating that no valid value can be obtained. |
| 79 | + |
| 80 | +The `enhance_config` object supports the following: |
| 81 | + |
| 82 | +* `video_enhance` - (Optional, List) Video Enhancement Configuration.Note: This field may return null, indicating that no valid value can be obtained. |
| 83 | + |
| 84 | +The `face_enhance` object supports the following: |
| 85 | + |
| 86 | +* `intensity` - (Optional, Float64) Intensity, value range: 0.0~1.0.Default value: 0.0.Note: This field may return null, indicating that no valid value can be obtained. |
| 87 | +* `switch` - (Optional, String) Capability configuration switch, optional value: ON/OFF.Default value: ON. |
| 88 | + |
| 89 | +The `frame_rate` object supports the following: |
| 90 | + |
| 91 | +* `fps` - (Optional, Int) Frame rate, value range: [0, 100], unit: Hz.Default value: 0.Note: For transcoding, this parameter will override the Fps inside the VideoTemplate.Note: This field may return null, indicating that no valid value can be obtained. |
| 92 | +* `switch` - (Optional, String) Capability configuration switch, optional value: ON/OFF.Default value: ON. |
| 93 | + |
| 94 | +The `hdr` object supports the following: |
| 95 | + |
| 96 | +* `switch` - (Optional, String) Capability configuration switch, optional value: ON/OFF.Default value: ON. |
| 97 | +* `type` - (Optional, String) Type, optional value: HDR10/HLG.Default value: HDR10.Note: The encoding method of video needs to be libx265.Note: Video encoding bit depth is 10.Note: This field may return null, indicating that no valid value can be obtained. |
| 98 | + |
| 99 | +The `image_quality_enhance` object supports the following: |
| 100 | + |
| 101 | +* `switch` - (Optional, String) Capability configuration switch, optional value: ON/OFF.Default value: ON. |
| 102 | +* `type` - (Optional, String) Type, optional value: weak/normal/strong.Default value: weak.Note: This field may return null, indicating that no valid value can be obtained. |
| 103 | + |
| 104 | +The `low_light_enhance` object supports the following: |
| 105 | + |
| 106 | +* `switch` - (Optional, String) Capability configuration switch, optional value: ON/OFF.Default value: ON. |
| 107 | +* `type` - (Optional, String) Type, optional value: normal.Default value: normal.Note: This field may return null, indicating that no valid value can be obtained. |
| 108 | + |
| 109 | +The `scratch_repair` object supports the following: |
| 110 | + |
| 111 | +* `intensity` - (Optional, Float64) Intensity, value range: 0.0~1.0.Default value: 0.0.Note: This field may return null, indicating that no valid value can be obtained. |
| 112 | +* `switch` - (Optional, String) Capability configuration switch, optional value: ON/OFF.Default value: ON. |
| 113 | + |
| 114 | +The `sharp_enhance` object supports the following: |
| 115 | + |
| 116 | +* `intensity` - (Optional, Float64) Intensity, value range: 0.0~1.0.Default value: 0.0.Note: This field may return null, indicating that no valid value can be obtained. |
| 117 | +* `switch` - (Optional, String) Capability configuration switch, optional value: ON/OFF.Default value: ON. |
| 118 | + |
| 119 | +The `super_resolution` object supports the following: |
| 120 | + |
| 121 | +* `size` - (Optional, Int) Super resolution multiple, optional value:2: currently only supports 2x super resolution.Default value: 2.Note: This field may return null, indicating that no valid value can be obtained. |
| 122 | +* `switch` - (Optional, String) Capability configuration switch, optional value: ON/OFF.Default value: ON. |
| 123 | +* `type` - (Optional, String) Type, optional value:lq: super-resolution for low-definition video with more noise.hq: super resolution for high-definition video.Default value: lq.Note: This field may return null, indicating that no valid value can be obtained. |
| 124 | + |
| 125 | +The `tehd_config` object supports the following: |
| 126 | + |
| 127 | +* `type` - (Required, String) Extremely high-definition type, optional value:TEHD-100: Extreme HD-100.Not filling means that the ultra-fast high-definition is not enabled. |
| 128 | +* `max_video_bitrate` - (Optional, Int) The upper limit of the video bit rate, which is valid when the Type specifies the ultra-fast HD type.Do not fill in or fill in 0 means that there is no upper limit on the video bit rate. |
| 129 | + |
| 130 | +The `video_enhance` object supports the following: |
| 131 | + |
| 132 | +* `artifact_repair` - (Optional, List) De-artifact (glitch) configuration.Note: This field may return null, indicating that no valid value can be obtained. |
| 133 | +* `color_enhance` - (Optional, List) Color Enhancement Configuration.Note: This field may return null, indicating that no valid value can be obtained. |
| 134 | +* `denoise` - (Optional, List) Video Noise Reduction Configuration.Note: This field may return null, indicating that no valid value can be obtained. |
| 135 | +* `face_enhance` - (Optional, List) Face Enhancement Configuration.Note: This field may return null, indicating that no valid value can be obtained. |
| 136 | +* `frame_rate` - (Optional, List) Interpolation frame rate configuration.Note: This field may return null, indicating that no valid value can be obtained. |
| 137 | +* `hdr` - (Optional, List) HDR configuration.Note: This field may return null, indicating that no valid value can be obtained. |
| 138 | +* `image_quality_enhance` - (Optional, List) Comprehensive Enhanced Configuration.Note: This field may return null, indicating that no valid value can be obtained. |
| 139 | +* `low_light_enhance` - (Optional, List) Low Light Enhancement Configuration.Note: This field may return null, indicating that no valid value can be obtained. |
| 140 | +* `scratch_repair` - (Optional, List) De-scratch configuration.Note: This field may return null, indicating that no valid value can be obtained. |
| 141 | +* `sharp_enhance` - (Optional, List) Detail Enhancement Configuration.Note: This field may return null, indicating that no valid value can be obtained. |
| 142 | +* `super_resolution` - (Optional, List) Super resolution configuration.Note: This field may return null, indicating that no valid value can be obtained. |
| 143 | + |
| 144 | +The `video_template` object supports the following: |
| 145 | + |
| 146 | +* `bitrate` - (Required, Int) Bit rate of the video stream, value range: 0 and [128, 35000], unit: kbps.When the value is 0, it means that the video bit rate is consistent with the original video. |
| 147 | +* `codec` - (Required, String) Encoding format of the video stream, optional value:libx264: H.264 encoding.libx265: H.265 encoding.av1: AOMedia Video 1 encoding.Note: Currently H.265 encoding must specify a resolution, and it needs to be within 640*480.Note: av1 encoded containers currently only support mp4. |
| 148 | +* `fps` - (Required, Int) Video frame rate, value range: [0, 100], unit: Hz.When the value is 0, it means that the frame rate is consistent with the original video.Note: The value range for adaptive code rate is [0, 60]. |
| 149 | +* `fill_type` - (Optional, String) Filling method, when the aspect ratio of the video stream configuration is inconsistent with the aspect ratio of the original video, the processing method for transcoding is filling. Optional filling method:stretch: Stretch, stretch each frame to fill the entire screen, which may cause the transcoded video to be squashed or stretched.black: Leave black, keep the aspect ratio of the video unchanged, and fill the rest of the edge with black.white: Leave blank, keep the aspect ratio of the video unchanged, and fill the rest of the edge with white.gauss: Gaussian blur, keep the aspect ratio of the video unchanged, and fill the rest of the edge with Gaussian blur.Default: black.Note: Adaptive stream only supports stretch, black. |
| 150 | +* `gop` - (Optional, Int) The interval between keyframe I frames, value range: 0 and [1, 100000], unit: number of frames.When filling 0 or not filling, the system will automatically set the gop length. |
| 151 | +* `height` - (Optional, Int) The maximum value of video stream height (or short side), value range: 0 and [128, 4096], unit: px.When Width and Height are both 0, the resolution is the same.When Width is 0 and Height is not 0, Width is scaled proportionally.When Width is not 0 and Height is 0, Height is scaled proportionally.When both Width and Height are not 0, the resolution is specified by the user.Default: 0. |
| 152 | +* `resolution_adaptive` - (Optional, String) Adaptive resolution, optional values:```open: open, at this time, Width represents the long side of the video, Height represents the short side of the video.close: close, at this time, Width represents the width of the video, and Height represents the height of the video.Default: open.Note: In adaptive mode, Width cannot be smaller than Height. |
| 153 | +* `vcrf` - (Optional, Int) Video constant bit rate control factor, the value range is [1, 51].If this parameter is specified, the code rate control method of CRF will be used for transcoding (the video code rate will no longer take effect).If there is no special requirement, it is not recommended to specify this parameter. |
| 154 | +* `width` - (Optional, Int) The maximum value of video stream width (or long side), value range: 0 and [128, 4096], unit: px.When Width and Height are both 0, the resolution is the same.When Width is 0 and Height is not 0, Width is scaled proportionally.When Width is not 0 and Height is 0, Height is scaled proportionally.When both Width and Height are not 0, the resolution is specified by the user.Default: 0. |
| 155 | + |
| 156 | +## Attributes Reference |
| 157 | + |
| 158 | +In addition to all arguments above, the following attributes are exported: |
| 159 | + |
| 160 | +* `id` - ID of the resource. |
| 161 | + |
| 162 | + |
| 163 | + |
| 164 | +## Import |
| 165 | + |
| 166 | +mps transcode_template can be imported using the id, e.g. |
| 167 | + |
| 168 | +``` |
| 169 | +terraform import tencentcloud_mps_transcode_template.transcode_template transcode_template_id |
| 170 | +``` |
| 171 | + |
0 commit comments