tencentcloud-sdk-nodejs-intl-en
Version:
1,627 lines (1,383 loc) • 1.55 MB
JavaScript
/*
* Copyright (c) 2018 Tencent. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
const AbstractModel = require("../../common/abstract_model");
/**
* Intelligent landscape-to-portrait task input type.
* @class
*/
class AiAnalysisTaskHorizontalToVerticalInput extends AbstractModel {
constructor(){
super();
/**
* <p>ID of the horizontal-to-vertical video transformation template.</p>
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.Definition = null;
/**
* <p>Extended parameter.</p>
* @type {string || null}
*/
this.ExtendedParameter = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Definition = 'Definition' in params ? params.Definition : null;
this.ExtendedParameter = 'ExtendedParameter' in params ? params.ExtendedParameter : null;
}
}
/**
* Audio/Video enhancement configuration.
* @class
*/
class EnhanceConfig extends AbstractModel {
constructor(){
super();
/**
* Video enhancement configuration.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {VideoEnhanceConfig || null}
*/
this.VideoEnhance = null;
/**
* The audio enhancement configuration.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {AudioEnhanceConfig || null}
*/
this.AudioEnhance = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.VideoEnhance) {
let obj = new VideoEnhanceConfig();
obj.deserialize(params.VideoEnhance)
this.VideoEnhance = obj;
}
if (params.AudioEnhance) {
let obj = new AudioEnhanceConfig();
obj.deserialize(params.AudioEnhance)
this.AudioEnhance = obj;
}
}
}
/**
* ModifySampleSnapshotTemplate response structure.
* @class
*/
class ModifySampleSnapshotTemplateResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Container format diagnostic result.
* @class
*/
class ContainerDiagnoseResultItem extends AbstractModel {
constructor(){
super();
/**
* Diagnosed exception category. Valid values:
DecodeParamException: decoding parameter exception.
TimeStampException: timestamp exception.
FrameException: frame rate exception.
StreamStatusException: stream status exception.
StreamInfo: stream information exception.
StreamAbnormalCharacteristics: stream characteristics exception.
DecodeException: decoding exception.
HLSRequirements: HLS format exception.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Category = null;
/**
* Diagnosed specific exception type. Valid values:
VideoResolutionChanged: video resolution change.
AudioSampleRateChanged: audio sample rate change.
AudioChannelsChanged: audio channel quantity change.
ParameterSetsChanged: stream parameter set information change.
DarOrSarInvalid: video aspect ratio exception.
TimestampFallback: DTS timestamp rollback.
DtsJitter: DTS jitter too high.
PtsJitter: PTS jitter too high.
AACDurationDeviation: improper AAC frame timestamp interval.
AudioDroppingFrames: audio frame dropping.
VideoDroppingFrames: video frame dropping.
AVTimestampInterleave: improper audio-video interleaving.
PtsLessThanDts: PTS less than DTS for media streams.
ReceiveFpsJitter: significant jitter in the network receive frame rate.
ReceiveFpsTooSmall: network receive video frame rate too low.
FpsJitter: significant jitter in the stream frame rate calculated via PTS.
StreamOpenFailed: stream open failure.
StreamEnd: stream end.
StreamParseFailed: stream parsing failure.
VideoFirstFrameNotIdr: first frame not an IDR frame.
StreamNALUError: NALU start code error.
TsStreamNoAud: no AUD NALU in the H26x stream of MPEG-TS.
AudioStreamLack: no audio stream.
VideoStreamLack: no video stream.
LackAudioRecover: missing audio stream recovery.
LackVideoRecover: missing video stream recovery.
VideoBitrateOutofRange: video stream bitrate (kbps) out of range.
AudioBitrateOutofRange: audio stream bitrate (kbps) out of range.
VideoDecodeFailed: video decoding error.
AudioDecodeFailed: audio decoding error.
AudioOutOfPhase: opposite phase in dual-channel audio.
VideoDuplicatedFrame: duplicate frames in video streams.
AudioDuplicatedFrame: duplicate frames in audio streams.
VideoRotation: video rotation.
TsMultiPrograms: multiple programs in MPEG2-TS streams
Mp4InvalidCodecFourcc: codec FourCC in MP4 not meeting Apple HLS requirements.
HLSBadM3u8Format: invalid M3U8 file.
HLSInvalidMasterM3u8: invalid main M3U8 file.
HLSInvalidMediaM3u8: invalid media M3U8 file.
HLSMasterM3u8Recommended: parameters recommended by standards missing in main M3U8.
HLSMediaM3u8Recommended: parameters recommended by standards missing in media M3U8.
HLSMediaM3u8DiscontinuityExist: EXT-X-DISCONTINUITY in media M3U8.
HLSMediaSegmentsStreamNumChange: changed number of streams in segments.
HLSMediaSegmentsPTSJitterDeviation: PTS jumps between segments without EXT-X-DISCONTINUITY.
HLSMediaSegmentsDTSJitterDeviation: DTS jumps between segments without EXT-X-DISCONTINUITY.
TimecodeTrackExist: TMCD track in MP4.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Type = null;
/**
* Diagnosed exception level. Valid values:
Fatal: affecting subsequent playback and parsing.
Error: may affect playback.
Warning: potential risk, which may not necessarily affect playback.
Notice: important stream information.
Info: general stream information.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.SeverityLevel = null;
/**
* Timestamp of warning, in the format of 2022-12-25T13:14:16Z.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<string> || null}
*/
this.DateTimeSet = null;
/**
* Timestamp.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<number> || null}
*/
this.TimestampSet = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Category = 'Category' in params ? params.Category : null;
this.Type = 'Type' in params ? params.Type : null;
this.SeverityLevel = 'SeverityLevel' in params ? params.SeverityLevel : null;
this.DateTimeSet = 'DateTimeSet' in params ? params.DateTimeSet : null;
this.TimestampSet = 'TimestampSet' in params ? params.TimestampSet : null;
}
}
/**
* ModifyWatermarkTemplate request structure.
* @class
*/
class ModifyWatermarkTemplateRequest extends AbstractModel {
constructor(){
super();
/**
* Unique ID of a watermarking template.
* @type {number || null}
*/
this.Definition = null;
/**
* Watermarking template name. Length limit: 64 characters.
* @type {string || null}
*/
this.Name = null;
/**
* Template description. Length limit: 256 characters.
* @type {string || null}
*/
this.Comment = null;
/**
* Origin position. Valid values:
<li>TopLeft: The origin of coordinates is in the top-left corner of the video, and the origin of the watermark is in the top-left corner of the image or text;</li>
<li>TopRight: The origin of coordinates is in the top-right corner of the video, and the origin of the watermark is in the top-right corner of the image or text;</li>
<li>BottomLeft: The origin of coordinates is in the bottom-left corner of the video, and the origin of the watermark is in the bottom-left corner of the image or text;</li>
<li>BottomRight: The origin of coordinates is in the bottom-right corner of the video, and the origin of the watermark is in the bottom-right corner of the image or text.</li>
* @type {string || null}
*/
this.CoordinateOrigin = null;
/**
* The horizontal position of the origin of the watermark relative to the origin of coordinates of the video. % and px formats are supported:
<li>If the string ends in %, the `XPos` of the watermark will be the specified percentage of the video width; for example, `10%` means that `XPos` is 10% of the video width;</li>
<li>If the string ends in px, the `XPos` of the watermark will be the specified px; for example, `100px` means that `XPos` is 100 px.</li>
* @type {string || null}
*/
this.XPos = null;
/**
* The vertical position of the origin of the watermark relative to the origin of coordinates of the video. % and px formats are supported:
<li>If the string ends in %, the `YPos` of the watermark will be the specified percentage of the video height; for example, `10%` means that `YPos` is 10% of the video height;</li>
<li>If the string ends in px, the `YPos` of the watermark will be the specified px; for example, `100px` means that `YPos` is 100 px.</li>
* @type {string || null}
*/
this.YPos = null;
/**
* Image watermarking template. This field is valid only for image watermarking templates.
* @type {ImageWatermarkInputForUpdate || null}
*/
this.ImageTemplate = null;
/**
* Text watermarking template. This field is valid only for text watermarking templates.
* @type {TextWatermarkTemplateInputForUpdate || null}
*/
this.TextTemplate = null;
/**
* SVG watermarking template. This field is required when `Type` is `svg` and is invalid when `Type` is `image` or `text`.
* @type {SvgWatermarkInputForUpdate || null}
*/
this.SvgTemplate = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Definition = 'Definition' in params ? params.Definition : null;
this.Name = 'Name' in params ? params.Name : null;
this.Comment = 'Comment' in params ? params.Comment : null;
this.CoordinateOrigin = 'CoordinateOrigin' in params ? params.CoordinateOrigin : null;
this.XPos = 'XPos' in params ? params.XPos : null;
this.YPos = 'YPos' in params ? params.YPos : null;
if (params.ImageTemplate) {
let obj = new ImageWatermarkInputForUpdate();
obj.deserialize(params.ImageTemplate)
this.ImageTemplate = obj;
}
if (params.TextTemplate) {
let obj = new TextWatermarkTemplateInputForUpdate();
obj.deserialize(params.TextTemplate)
this.TextTemplate = obj;
}
if (params.SvgTemplate) {
let obj = new SvgWatermarkInputForUpdate();
obj.deserialize(params.SvgTemplate)
this.SvgTemplate = obj;
}
}
}
/**
* Full speech recognition segment.
* @class
*/
class AiRecognitionTaskAsrFullTextSegmentItem extends AbstractModel {
constructor(){
super();
/**
* <p>Confidence of the recognized segment. Value range: 0–100.</p>
* @type {number || null}
*/
this.Confidence = null;
/**
* <p>Start time offset of the recognized segment, in seconds.</p>
* @type {number || null}
*/
this.StartTimeOffset = null;
/**
* <p>End time offset of the recognized segment, in seconds.</p>
* @type {number || null}
*/
this.EndTimeOffset = null;
/**
* <p>Recognized text.</p>
* @type {string || null}
*/
this.Text = null;
/**
* <p>Word timestamp information.</p>
* @type {Array.<WordResult> || null}
*/
this.Wordlist = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Confidence = 'Confidence' in params ? params.Confidence : null;
this.StartTimeOffset = 'StartTimeOffset' in params ? params.StartTimeOffset : null;
this.EndTimeOffset = 'EndTimeOffset' in params ? params.EndTimeOffset : null;
this.Text = 'Text' in params ? params.Text : null;
if (params.Wordlist) {
this.Wordlist = new Array();
for (let z in params.Wordlist) {
let obj = new WordResult();
obj.deserialize(params.Wordlist[z]);
this.Wordlist.push(obj);
}
}
}
}
/**
* Control parameter of a custom text audit task.
* @class
*/
class UserDefineOcrTextReviewTemplateInfoForUpdate extends AbstractModel {
constructor(){
super();
/**
* Switch of a custom text audit task. Valid values:
<li>ON: Enables a custom text audit task;</li>
<li>OFF: Disables a custom text audit task.</li>
* @type {string || null}
*/
this.Switch = null;
/**
* Custom text filter tag. If an audit result contains the selected tag, it will be returned; if the filter tag is empty, all audit results will be returned. To use the tag filtering feature, you need to add the corresponding tag when adding materials for custom text keywords.
There can be up to 10 tags, each with a length limit of 16 characters.
* @type {Array.<string> || null}
*/
this.LabelSet = null;
/**
* Threshold score for violation. If this score is reached or exceeded during intelligent audit, it will be deemed that a suspected violation has occurred. Value range: 0-100.
* @type {number || null}
*/
this.BlockConfidence = null;
/**
* Threshold score for human audit. If this score is reached or exceeded during intelligent audit, human audit will be considered necessary. Value range: 0-100.
* @type {number || null}
*/
this.ReviewConfidence = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Switch = 'Switch' in params ? params.Switch : null;
this.LabelSet = 'LabelSet' in params ? params.LabelSet : null;
this.BlockConfidence = 'BlockConfidence' in params ? params.BlockConfidence : null;
this.ReviewConfidence = 'ReviewConfidence' in params ? params.ReviewConfidence : null;
}
}
/**
* Frame interpolation configuration.
* @class
*/
class FrameRateConfig extends AbstractModel {
constructor(){
super();
/**
* Whether to enable the feature. Valid values:
<li>ON</li>
<li>OFF</li>
Default value: ON.
* @type {string || null}
*/
this.Switch = null;
/**
* The frame rate (Hz). Value range: [0, 100].
Default value: 0.
Note: For transcoding, this parameter will overwrite `Fps` of `VideoTemplate`.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.Fps = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Switch = 'Switch' in params ? params.Switch : null;
this.Fps = 'Fps' in params ? params.Fps : null;
}
}
/**
* ExtractBlindWatermark request structure.
* @class
*/
class ExtractBlindWatermarkRequest extends AbstractModel {
constructor(){
super();
/**
* Digital watermark type. Valid values: <li>blind-basic: basic copyright digital watermark;</li> <li>blind-abseq: ab sequence copyright digital watermark.</li>
* @type {string || null}
*/
this.Type = null;
/**
* File input information for the Media Processing Service (MPS) task.
* @type {MediaInputInfo || null}
*/
this.InputInfo = null;
/**
* Event notification information of the task. If it is left unspecified, it indicates that no event notification is obtained.
* @type {TaskNotifyConfig || null}
*/
this.TaskNotifyConfig = null;
/**
* Configuration of the digital watermark extraction task.
* @type {ExtractBlindWatermarkTaskConfig || null}
*/
this.ExtractBlindWatermarkConfig = null;
/**
* Resource ID. Ensure that the corresponding resource is enabled. The default value is the primary resource ID of the account.
* @type {string || null}
*/
this.ResourceId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Type = 'Type' in params ? params.Type : null;
if (params.InputInfo) {
let obj = new MediaInputInfo();
obj.deserialize(params.InputInfo)
this.InputInfo = obj;
}
if (params.TaskNotifyConfig) {
let obj = new TaskNotifyConfig();
obj.deserialize(params.TaskNotifyConfig)
this.TaskNotifyConfig = obj;
}
if (params.ExtractBlindWatermarkConfig) {
let obj = new ExtractBlindWatermarkTaskConfig();
obj.deserialize(params.ExtractBlindWatermarkConfig)
this.ExtractBlindWatermarkConfig = obj;
}
this.ResourceId = 'ResourceId' in params ? params.ResourceId : null;
}
}
/**
* CreateAiDramaTask request structure.
* @class
*/
class CreateAiDramaTaskRequest extends AbstractModel {
constructor(){
super();
/**
* <p>ai comic input</p>
* @type {AiDramaInput || null}
*/
this.Input = null;
/**
* <p>User cos information</p>
* @type {VideoDramaCosInfo || null}
*/
this.CosInfo = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.Input) {
let obj = new AiDramaInput();
obj.deserialize(params.Input)
this.Input = obj;
}
if (params.CosInfo) {
let obj = new VideoDramaCosInfo();
obj.deserialize(params.CosInfo)
this.CosInfo = obj;
}
}
}
/**
* Video (audio) recognition result.
* @class
*/
class AiAnalysisTaskVideoComprehensionResult extends AbstractModel {
constructor(){
super();
/**
* Task status. Valid values: `PROCESSING`, `SUCCESS`, and `FAIL`.
* @type {string || null}
*/
this.Status = null;
/**
* Error code. 0: successful; other values: failed.
* @type {number || null}
*/
this.ErrCode = null;
/**
* Error message.
* @type {string || null}
*/
this.Message = null;
/**
* Input file for video (audio) recognition.
* @type {AiAnalysisTaskVideoComprehensionInput || null}
*/
this.Input = null;
/**
* Output file for video (audio) recognition.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {AiAnalysisTaskVideoComprehensionOutput || null}
*/
this.Output = null;
/**
* Error code. A null string indicates that the task is successful, while other values indicate that the task has failed. For valid values, see the list of MPS error codes.
* @type {string || null}
*/
this.ErrCodeExt = null;
/**
* Task progress
* @type {number || null}
*/
this.Progress = null;
/**
* Starting time of task execution, in ISO date and time format.
* @type {string || null}
*/
this.BeginProcessTime = null;
/**
* Completion time of task execution, in ISO date and time format.
* @type {string || null}
*/
this.FinishTime = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Status = 'Status' in params ? params.Status : null;
this.ErrCode = 'ErrCode' in params ? params.ErrCode : null;
this.Message = 'Message' in params ? params.Message : null;
if (params.Input) {
let obj = new AiAnalysisTaskVideoComprehensionInput();
obj.deserialize(params.Input)
this.Input = obj;
}
if (params.Output) {
let obj = new AiAnalysisTaskVideoComprehensionOutput();
obj.deserialize(params.Output)
this.Output = obj;
}
this.ErrCodeExt = 'ErrCodeExt' in params ? params.ErrCodeExt : null;
this.Progress = 'Progress' in params ? params.Progress : null;
this.BeginProcessTime = 'BeginProcessTime' in params ? params.BeginProcessTime : null;
this.FinishTime = 'FinishTime' in params ? params.FinishTime : null;
}
}
/**
* Custom specification parameters for video processing, which are used to override corresponding parameters in templates.
* @class
*/
class OverrideTranscodeParameter extends AbstractModel {
constructor(){
super();
/**
* Container format. Valid values: mp4, flv, hls, mp3, flac, ogg, and m4a; mp3, flac, ogg, and m4a are formats of audio files.
* @type {string || null}
*/
this.Container = null;
/**
* Whether to remove video data. Valid values:
<li>0: retain</li>
<li>1: remove</li>
* @type {number || null}
*/
this.RemoveVideo = null;
/**
* Whether to remove audio data. Valid values:
<li>0: retain</li>
<li>1: remove</li>
* @type {number || null}
*/
this.RemoveAudio = null;
/**
* Video stream configuration parameter.
* @type {VideoTemplateInfoForUpdate || null}
*/
this.VideoTemplate = null;
/**
* Audio stream configuration parameter.
* @type {AudioTemplateInfoForUpdate || null}
*/
this.AudioTemplate = null;
/**
* The TSC transcoding parameters.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {TEHDConfigForUpdate || null}
*/
this.TEHDConfig = null;
/**
* Subtitle stream configuration parameter.
* @type {SubtitleTemplate || null}
*/
this.SubtitleTemplate = null;
/**
* Specifies the external audio track parameter.
* @type {Array.<MediaInputInfo> || null}
*/
this.AddonAudioStream = null;
/**
* Extension field for transcoding.
* @type {string || null}
*/
this.StdExtInfo = null;
/**
* Subtitle file to be inserted.
* @type {Array.<AddOnSubtitle> || null}
*/
this.AddOnSubtitles = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Container = 'Container' in params ? params.Container : null;
this.RemoveVideo = 'RemoveVideo' in params ? params.RemoveVideo : null;
this.RemoveAudio = 'RemoveAudio' in params ? params.RemoveAudio : null;
if (params.VideoTemplate) {
let obj = new VideoTemplateInfoForUpdate();
obj.deserialize(params.VideoTemplate)
this.VideoTemplate = obj;
}
if (params.AudioTemplate) {
let obj = new AudioTemplateInfoForUpdate();
obj.deserialize(params.AudioTemplate)
this.AudioTemplate = obj;
}
if (params.TEHDConfig) {
let obj = new TEHDConfigForUpdate();
obj.deserialize(params.TEHDConfig)
this.TEHDConfig = obj;
}
if (params.SubtitleTemplate) {
let obj = new SubtitleTemplate();
obj.deserialize(params.SubtitleTemplate)
this.SubtitleTemplate = obj;
}
if (params.AddonAudioStream) {
this.AddonAudioStream = new Array();
for (let z in params.AddonAudioStream) {
let obj = new MediaInputInfo();
obj.deserialize(params.AddonAudioStream[z]);
this.AddonAudioStream.push(obj);
}
}
this.StdExtInfo = 'StdExtInfo' in params ? params.StdExtInfo : null;
if (params.AddOnSubtitles) {
this.AddOnSubtitles = new Array();
for (let z in params.AddOnSubtitles) {
let obj = new AddOnSubtitle();
obj.deserialize(params.AddOnSubtitles[z]);
this.AddOnSubtitles.push(obj);
}
}
}
}
/**
* Input type of intelligent categorization task
* @class
*/
class AiAnalysisTaskClassificationInput extends AbstractModel {
constructor(){
super();
/**
* <p>ID of the intelligent video classification template.</p>
* @type {number || null}
*/
this.Definition = null;
/**
* <p>Extended parameter.</p>
* @type {string || null}
*/
this.ExtendedParameter = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Definition = 'Definition' in params ? params.Definition : null;
this.ExtendedParameter = 'ExtendedParameter' in params ? params.ExtendedParameter : null;
}
}
/**
* Input parameter of an SVG watermarking template
* @class
*/
class SvgWatermarkInput extends AbstractModel {
constructor(){
super();
/**
* Watermark width, which supports six formats of px, %, W%, H%, S%, and L%:
<li>If the string ends in px, the `Width` of the watermark will be in px; for example, `100px` means that `Width` is 100 px; if `0px` is entered
and `Height` is not `0px`, the watermark width will be proportionally scaled based on the source SVG image; if `0px` is entered for both `Width` and `Height`, the watermark width will be the width of the source SVG image;</li>
<li>If the string ends in `W%`, the `Width` of the watermark will be the specified percentage of the video width; for example, `10W%` means that `Width` is 10% of the video width;</li>
<li>If the string ends in `H%`, the `Width` of the watermark will be the specified percentage of the video height; for example, `10H%` means that `Width` is 10% of the video height;</li>
<li>If the string ends in `S%`, the `Width` of the watermark will be the specified percentage of the short side of the video; for example, `10S%` means that `Width` is 10% of the short side of the video;</li>
<li>If the string ends in `L%`, the `Width` of the watermark will be the specified percentage of the long side of the video; for example, `10L%` means that `Width` is 10% of the long side of the video;</li>
<li>If the string ends in %, the meaning is the same as `W%`.</li>
Default value: 10W%.
* @type {string || null}
*/
this.Width = null;
/**
* Watermark height, which supports six formats of px, %, W%, H%, S%, and L%:
<li>If the string ends in px, the `Height` of the watermark will be in px; for example, `100px` means that `Height` is 100 px; if `0px` is entered
and `Width` is not `0px`, the watermark height will be proportionally scaled based on the source SVG image; if `0px` is entered for both `Width` and `Height`, the watermark height will be the height of the source SVG image;</li>
<li>If the string ends in `W%`, the `Height` of the watermark will be the specified percentage of the video width; for example, `10W%` means that `Height` is 10% of the video width;</li>
<li>If the string ends in `H%`, the `Height` of the watermark will be the specified percentage of the video height; for example, `10H%` means that `Height` is 10% of the video height;</li>
<li>If the string ends in `S%`, the `Height` of the watermark will be the specified percentage of the short side of the video; for example, `10S%` means that `Height` is 10% of the short side of the video;</li>
<li>If the string ends in `L%`, the `Height` of the watermark will be the specified percentage of the long side of the video; for example, `10L%` means that `Height` is 10% of the long side of the video;</li>
<li>If the string ends in %, the meaning is the same as `H%`.</li>
Default value: 0 px.
* @type {string || null}
*/
this.Height = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Width = 'Width' in params ? params.Width : null;
this.Height = 'Height' in params ? params.Height : null;
}
}
/**
* Smart subtitle task result for live stream.
* @class
*/
class LiveStreamAiSmartSubtitleResultInfo extends AbstractModel {
constructor(){
super();
/**
* Live stream smart subtitling task result list.
* @type {Array.<LiveSmartSubtitleResult> || null}
*/
this.SmartSubtitleResult = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.SmartSubtitleResult) {
this.SmartSubtitleResult = new Array();
for (let z in params.SmartSubtitleResult) {
let obj = new LiveSmartSubtitleResult();
obj.deserialize(params.SmartSubtitleResult[z]);
this.SmartSubtitleResult.push(obj);
}
}
}
}
/**
* CreateTranscodeTemplate request structure.
* @class
*/
class CreateTranscodeTemplateRequest extends AbstractModel {
constructor(){
super();
/**
* <p>Container format. Valid values: mp4, flv, hls, ts, webm, mkv, mxf, mov, mp3, flac, ogg, m4a, and wav. Among them, mp3, flac, ogg, m4a, and wav are for audio-only files.</p>
* @type {string || null}
*/
this.Container = null;
/**
* <p>Transcoding template name. Length limit: 64 characters.</p>
* @type {string || null}
*/
this.Name = null;
/**
* <p>Transcoding template description. Length limit: 256 characters.</p>
* @type {string || null}
*/
this.Comment = null;
/**
* <p>Indicates whether to remove video data. Valid values:</p><li>0: Data is reserved.</li><li>1: Data is removed.</li>Default value: 0.
* @type {number || null}
*/
this.RemoveVideo = null;
/**
* <p>Indicates whether to remove audio data. Valid values:</p><li>0: Data is reserved.</li><li>1: Data is removed.</li>Default value: 0.
* @type {number || null}
*/
this.RemoveAudio = null;
/**
* <p>Video stream configuration parameters. This field is required when RemoveVideo is 0.</p>
* @type {VideoTemplateInfo || null}
*/
this.VideoTemplate = null;
/**
* <p>Audio stream configuration parameters. This field is required when RemoveAudio is 0.</p>
* @type {AudioTemplateInfo || null}
*/
this.AudioTemplate = null;
/**
* <p>Top Speed Codec transcoding parameters.</p>
* @type {TEHDConfig || null}
*/
this.TEHDConfig = null;
/**
* <p>Audio/video enhancement configurations.</p>
* @type {EnhanceConfig || null}
*/
this.EnhanceConfig = null;
/**
* <p>Extended parameter, which is a serialized JSON string.</p>
* @type {string || null}
*/
this.StdExtInfo = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Container = 'Container' in params ? params.Container : null;
this.Name = 'Name' in params ? params.Name : null;
this.Comment = 'Comment' in params ? params.Comment : null;
this.RemoveVideo = 'RemoveVideo' in params ? params.RemoveVideo : null;
this.RemoveAudio = 'RemoveAudio' in params ? params.RemoveAudio : null;
if (params.VideoTemplate) {
let obj = new VideoTemplateInfo();
obj.deserialize(params.VideoTemplate)
this.VideoTemplate = obj;
}
if (params.AudioTemplate) {
let obj = new AudioTemplateInfo();
obj.deserialize(params.AudioTemplate)
this.AudioTemplate = obj;
}
if (params.TEHDConfig) {
let obj = new TEHDConfig();
obj.deserialize(params.TEHDConfig)
this.TEHDConfig = obj;
}
if (params.EnhanceConfig) {
let obj = new EnhanceConfig();
obj.deserialize(params.EnhanceConfig)
this.EnhanceConfig = obj;
}
this.StdExtInfo = 'StdExtInfo' in params ? params.StdExtInfo : null;
}
}
/**
* ProcessLiveStream response structure.
* @class
*/
class ProcessLiveStreamResponse extends AbstractModel {
constructor(){
super();
/**
* <p>Task ID.</p>
* @type {string || null}
*/
this.TaskId = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TaskId = 'TaskId' in params ? params.TaskId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Live stream media quality inspection result.
* @class
*/
class LiveStreamAiQualityControlResultInfo extends AbstractModel {
constructor(){
super();
/**
* Content quality inspection result list.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<QualityControlResult> || null}
*/
this.QualityControlResults = null;
/**
*
* @type {Array.<DiagnoseResult> || null}
*/
this.DiagnoseResults = null;
/**
* Content quality inspection result list.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<QualityControlResult> || null}
*/
this.QualityControlResultSet = null;
/**
* Format diagnostic result list.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<DiagnoseResult> || null}
*/
this.DiagnoseResultSet = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.QualityControlResults) {
this.QualityControlResults = new Array();
for (let z in params.QualityControlResults) {
let obj = new QualityControlResult();
obj.deserialize(params.QualityControlResults[z]);
this.QualityControlResults.push(obj);
}
}
if (params.DiagnoseResults) {
this.DiagnoseResults = new Array();
for (let z in params.DiagnoseResults) {
let obj = new DiagnoseResult();
obj.deserialize(params.DiagnoseResults[z]);
this.DiagnoseResults.push(obj);
}
}
if (params.QualityControlResultSet) {
this.QualityControlResultSet = new Array();
for (let z in params.QualityControlResultSet) {
let obj = new QualityControlResult();
obj.deserialize(params.QualityControlResultSet[z]);
this.QualityControlResultSet.push(obj);
}
}
if (params.DiagnoseResultSet) {
this.DiagnoseResultSet = new Array();
for (let z in params.DiagnoseResultSet) {
let obj = new DiagnoseResult();
obj.deserialize(params.DiagnoseResultSet[z]);
this.DiagnoseResultSet.push(obj);
}
}
}
}
/**
* The information of intelligently generated highlight segments.
* @class
*/
class MediaAiAnalysisHighlightItem extends AbstractModel {
constructor(){
super();
/**
* The URL of the highlight segments.
* @type {string || null}
*/
this.HighlightPath = null;
/**
* The URL of the thumbnail.
* @type {string || null}
*/
this.CovImgPath = null;
/**
* The confidence score. Value range: 0-100.
* @type {number || null}
*/
this.Confidence = null;
/**
* The duration of the highlights.
* @type {number || null}
*/
this.Duration = null;
/**
* A list of the highlight segments.
* @type {Array.<HighlightSegmentItem> || null}
*/
this.SegmentSet = null;
/**
* Intelligent highlight address.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.HighlightUrl = null;
/**
* Intelligent highlight cover address.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.CovImgUrl = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.HighlightPath = 'HighlightPath' in params ? params.HighlightPath : null;
this.CovImgPath = 'CovImgPath' in params ? params.CovImgPath : null;
this.Confidence = 'Confidence' in params ? params.Confidence : null;
this.Duration = 'Duration' in params ? params.Duration : null;
if (params.SegmentSet) {
this.SegmentSet = new Array();
for (let z in params.SegmentSet) {
let obj = new HighlightSegmentItem();
obj.deserialize(params.SegmentSet[z]);
this.SegmentSet.push(obj);
}
}
this.HighlightUrl = 'HighlightUrl' in params ? params.HighlightUrl : null;
this.CovImgUrl = 'CovImgUrl' in params ? params.CovImgUrl : null;
}
}
/**
* DeleteLiveRecordTemplate request structure.
* @class
*/
class DeleteLiveRecordTemplateRequest extends AbstractModel {
constructor(){
super();
/**
* Unique identifier of the recording template.
* @type {number || null}
*/
this.Definition = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Definition = 'Definition' in params ? params.Definition : null;
}
}
/**
* DescribeAnimatedGraphicsTemplates request structure.
* @class
*/
class DescribeAnimatedGraphicsTemplatesRequest extends AbstractModel {
constructor(){
super();
/**
* Unique ID filter of animated image generating templates. Array length limit: 100.
* @type {Array.<number> || null}
*/
this.Definitions = null;
/**
* Paging offset. Default value: 0.
* @type {number || null}
*/
this.Offset = null;
/**
* Number of returned entries. Default value: 10. Maximum value: 100.
* @type {number || null}
*/
this.Limit = null;
/**
* Template type filter. Valid values:
<li>Preset: Preset template;</li>
<li>Custom: Custom template.</li>
* @type {string || null}
*/
this.Type = null;
/**
* Filter condition for animated image generating template identifiers, with a length limit of 64 characters.
* @type {string || null}
*/
this.Name = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Definitions = 'Definitions' in params ? params.Definitions : null;
this.Offset = 'Offset' in params ? params.Offset : null;
this.Limit = 'Limit' in params ? params.Limit : null;
this.Type = 'Type' in params ? params.Type : null;
this.Name = 'Name' in params ? params.Name : null;
}
}
/**
* Extract video digital watermark task information.
* @class
*/
class ExtractBlindWatermarkTask extends AbstractModel {
constructor(){
super();
/**
* Media processing task ID.
* @type {string || null}
*/
this.TaskId = null;
/**
* Task flow status. valid values:.
<Li>WAITING: waiting.</li>.
<Li>PROCESSING: processing.</li>.
<li>FINISH: completed</li>
* @type {string || null}
*/
this.Status = null;
/**
* Error code. `0` indicates success. other values indicate failure.
* @type {number || null}
*/
this.ErrCode = null;
/**
* Error message.
* @type {string || null}
*/
this.Message = null;
/**
* Target file information for media processing.
* @type {MediaInputInfo || null}
*/
this.InputInfo = null;
/**
* Specifies the digital watermark type. valid values: <li>blind-basic: basic version copyright digital watermark;</li> <li>blind-ab: ab copyright digital watermark.</li>.
* @type {string || null}
*/
this.Type = null;
/**
* Indicates whether a watermark is detected. if this parameter is true, the Result field will return the watermark extraction Result. if this parameter is false, the Result field will not return.
* @type {boolean || null}
*/
this.IsDetected = null;
/**
* Fetched watermark content. this field will not be returned when no detection.
* @type {string || null}
*/
this.Result = null;
/**
* Extracts the digital watermark configuration.
* @type {ExtractBlindWatermarkTaskConfig || null}
*/
this.ExtractBlindWatermarkConfig = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TaskId = 'TaskId' in params ? params.TaskId : null;
this.Status = 'Status' in params ? params.Status : null;
this.ErrCode = 'ErrCode' in params ? params.ErrCode : null;
this.Message = 'Message' in params ? params.Message : null;
if (params.InputInfo) {
let obj = new MediaInputInfo();
obj.deserialize(params.InputInfo)
this.InputInfo = obj;
}
this.Type = 'Type' in params ? params.Type : null;
this.IsDetected = 'IsDetected' in params ? params.IsDetected : null;
this.Result = 'Result' in params ? params.Result : null;
if (params.ExtractBlindWatermarkConfig) {
let obj = new ExtractBlindWatermarkTaskConfig();
obj.deserialize(params.ExtractBlindWatermarkConfig)
this.ExtractBlindWatermarkConfig = obj;
}
}
}
/**
* Result type of ASR-based prohibited information detection in speech task in content audit
* @class
*/
class AiReviewTaskProhibitedAsrResult extends AbstractModel {
constructor(){
super();
/**
* Task status. Valid values: PROCESSING, SUCCESS, FAIL.
* @type {string || null}
*/
this.Status = null;
/**
* The error code. An empty string indicates the task is successful; any other value returned indicates the task failed. For details, see [Error Codes](https://intl.cloud.tencent.com/document/product/1041/40249).
* @type {string || null}
*/
this.ErrCodeExt = null;
/**
* Error code. 0: success; other values: failure.
<li>40000: invalid input parameter. Please check it;</li>
<li>60000: invalid source file (e.g., video data is corrupted). Please check whether the source file is normal;</li>
<li>70000: internal service error. Please try again.</li>
* @type {number || null}
*/
this.ErrCode = null;
/**
* Error message.
* @type {string || null}
*/
this.Message = null;
/**
* Input of ASR-based prohibited information detection in speech task in content audit
* @type {AiReviewProhibitedAsrTaskInput || null}
*/
this.Input = null;
/**
* Output of ASR-based prohibited information detection in speech task in content audit
* @type {AiReviewProhibitedAsrTaskOutput || null}
*/
this.Output = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Status = 'Status' in params ? params.Status : null;
this.ErrCodeExt = 'ErrCodeExt' in params ? params.ErrCodeExt : null;
this.ErrCode = 'ErrCode' in params ? params.ErrCode : null;
this.Message = 'Message' in params ? params.Message : null;
if (params.Input) {
let obj = new AiReviewProhibitedAsrTaskInput();
obj.deserialize(params.Input)
this.Input = obj;
}
if (params.Output) {
let obj = new AiReviewProhibitedAsrTaskOutput();
obj.deserialize(params.Output)
this.Output = obj;
}
}
}
/**
* Details of an adaptive bitrate streaming template
* @class
*/
class AdaptiveDynamicStreamingTemplate extends AbstractModel {
constructor(){
super();
/**
* Unique ID of an adaptive bitrate streaming template.
* @type {number || null}
*/
this.Definition = null;
/**
* Template type. Valid values:
<li>Preset: preset template;</li>
<li>Custom: custom template.</li>
* @type {string || null}
*/
this.Type = null;
/**
* Name of an adaptive bitrate streaming template.
* @type {string || null}
*/
this.Name = null;
/**
* Description of an adaptive bitrate streaming template.
* @type {string || null}
*/
this.Comment = null;
/**
* Adaptive bitrate streaming format. Valid values:
<li>HLS;</li>
<li>MPEG-DASH.</li>
* @type {string || null}
*/
this.Format = null;
/**
* Parameter information of input streams for transcoding to adaptive bitrate streaming. Up to 10 streams can be input.
* @type {Array.<AdaptiveStreamTemplate> || null}
*/
this.StreamInfos = null;
/**
* Whether to prohibit transcoding from low bitrate to high bitrate. Valid values:
<li>0: no,</li>
<li>1: yes.</li>
* @type {number || null}
*/
this.DisableHigherVideoBitrate = null;
/**
* Whether to prohibit transcoding from low resolution to high resolution. Valid values:
<li>0: no,</li>
<li>1: yes.</li>
* @type {number || null}
*/
this.DisableHigherVideoResolution = null;
/**
* Creation time of template in [ISO date format](https://intl.cloud.tencent.com/document/product/266/11732?from_cn_redirect=1#I).
* @type {string || null}
*/
this.CreateTime = null;
/**
* Last modified time of template in [ISO date format](https://intl.cloud.tencent.com/document/product/266/11732?from_cn_redirect=1#I).
* @type {string || null}
*/
this.UpdateTime = null;
/**
* Whether it is an audio-only template. 0: video template. 1: audio-only template.Note: This field may return null, indicating t