Tous les produits
Search
Centre de documentation

:SubmitTranscodeJob

Dernière mise à jour :Aug 07, 2026

Soumet une tâche de transcodage pour un fichier vidéo ou audio à Intelligent Media Services en spécifiant le fichier source, le format de sortie et les paramètres associés.

Description de l'opération

Testez maintenant

Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.

Test

Autorisation RAM

Le tableau ci-dessous décrit les autorisations nécessaires pour appeler cette API. Vous pouvez les définir dans une politique Resource Access Management (RAM). Les colonnes du tableau sont détaillées ci-dessous :

  • Action : les actions peuvent être utilisées dans l'élément Action des instructions de politique de permissions RAM pour accorder les autorisations nécessaires à l'exécution de l'opération.

  • API : l'API que vous pouvez appeler pour exécuter l'action.

  • Niveau d'accès : le niveau d'accès prédéfini accordé pour chaque API. Valeurs valides : create, list, get, update et delete.

  • Type de ressource : le type de ressource qui prend en charge l'autorisation pour exécuter l'action. Il indique si l'action prend en charge les permissions au niveau de la ressource. La ressource spécifiée doit être compatible avec l'action. Sinon, la politique sera inefficace.

    • Pour les API avec permissions au niveau de la ressource, les types de ressource requis sont marqués d'un astérisque (*). Spécifiez l'Alibaba Cloud Resource Name (ARN) correspondant dans l'élément Resource de la politique.

    • Pour les API sans permissions au niveau de la ressource, la valeur All Resources est affichée. Utilisez un astérisque (*) dans l'élément Resource de la politique.

  • Clé de condition : les clés de condition définies par le service. La clé permet un contrôle granulaire, applicable aux actions seules ou aux actions associées à des ressources spécifiques. En plus des clés de condition propres au service, Alibaba Cloud fournit un ensemble de clés de condition communes applicables à tous les services pris en charge par RAM.

  • Action dépendante : les actions dépendantes requises pour exécuter l'action. Pour mener à bien l'opération, l'utilisateur RAM ou le rôle RAM doit disposer des permissions pour toutes les actions dépendantes.

ice:SubmitTranscodeJob

*All Resource

*

Aucune Aucune

Paramètres de requête

Paramètre

Type

Requis

Description

Exemple

Name

string

Non

Le nom de la tâche.

job-name

InputGroup

array<object>

Oui

Le groupe d'entrées de la tâche. Une entrée unique crée une tâche de transcodage. Plusieurs entrées créent une tâche de fusion de flux audio et vidéo.

job-name

object

Oui

L'entrée de la tâche.

Type

string

Oui

Le type d'objet média.

OSS

Media

string

Oui

La valeur du média.

oss://bucket/path/to/video.mp4

InputUrl

string

Non

Le chemin du flux d'entrée. Ce paramètre ne prend effet que lorsque Type est défini sur Media, ce qui vous permet de spécifier un fichier spécifique sous la ressource média en tant qu'entrée. Le système vérifie si l'inputUrl spécifié existe sous la ressource média.

oss://bucket/path/to/video.mp4

OutputGroup

array<object>

Oui

Le groupe de sortie de la tâche.

user-data

array<object>

Oui

La sortie de la tâche.

Output

object

Oui

La configuration du média de sortie.

Type

string

Oui

Le type d'objet média.

OSS

Media

string

Oui

La valeur du média.

oss://bucket/path/to/video.mp4

OutputUrl

string

Non

Le chemin du flux de sortie.

oss://bucket/path/to/{MediaId}/{JobId}.mp4

ProcessConfig

object

Oui

La configuration du traitement de la tâche.

Transcode

object

Oui

La configuration du transcodage.

TemplateId

string

Oui

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

Non

The override parameters. If specified, these parameters overwrite the corresponding template parameters.

Video

object

Non

The video settings.

Codec

string

Non

The encoding format.

H.264

Profile

string

Non

The encoding profile.

Main

Bitrate

string

Non

The average video bitrate. Valid values: 10 to 50000. Unit: Kbit/s.

3000

Crf

string

Non

The bitrate-quality control factor. Valid values: 0 to 51. Default value: 23 if the encoding format is H.264, or 26 if the encoding format is H.265.

23

Width

string

Non

The width. Valid values: 128 to 4096. Unit: px. Default value: the original width of the video.

1920

Height

string

Non

The height. Valid values: 128 to 4096. Unit: px. Default value: the original height of the video.

1080

Fps

string

Non

The frame rate. Valid values: (0, 60]. Default value: the frame rate of the input file.

25

Gop

string

Non

The maximum number of frames between keyframes. Valid values: 1 to 1080000. Default value: 250.

250

Preset

string

Non

The video encoder preset. Only H.264 supports this parameter.

medium

ScanMode

string

Non

The scan mode.

progressive

PixFmt

string

Non

The video pixel format.

yuv420p

Remove

string

Non

Specifies whether to remove the video stream.

false

Crop

string

Non

The video cropping parameter. Two methods are supported.

1280:800:0:140

Pad

string

Non

The video padding parameter. Format: width:height:left:top. Example: 1280:800:0:140.

1280:800:0:140

LongShortMode

string

Non

Specifies whether to enable landscape and portrait auto-adaptation (long-short side mode).

false

Bufsize

string

Non

The buffer size. Valid values: 1000 to 128000. Default value: 6000. Unit: Kbit/s.

6000

Maxrate

string

Non

The peak video bitrate. Valid values: 10 to 50000. Unit: Kbit/s.

9000

AbrMax

string

Non

The ABR maximum bitrate. This parameter is effective only for Narrowband HD 1.0. Valid values: 10 to 50000. Unit: Kbit/s.

6000

Audio

object

Non

The audio settings.

Codec

string

Non

The audio codec format. Valid values: AAC, MP3, VORBIS, and FLAC.

AAC

Profile

string

Non

The audio encoding preset.

aac_low

Samplerate

string

Non

The sample rate. Default value: 44100. Valid values: 22050, 32000, 44100, 48000, and 96000. Unit: Hz.

44100

Bitrate

string

Non

The audio bitrate of the output file. Valid values: 8 to 1000. Unit: Kbit/s. Default value: 128.

128

Channels

string

Non

The number of audio channels.

2

Remove

string

Non

Specifies whether to remove the audio stream.

false

Volume

object

Non

The volume control settings.

Method

string

Non

The volume adjustment method.

auto

IntegratedLoudnessTarget

string

Non

The target loudness.

-6

TruePeak

string

Non

The Peak Volume.

-1

LoudnessRangeTarget

string

Non

The loudness range.

8

Container

object

Non

The container format settings.

Format

string

Non

The container format.

mp4

MuxConfig

object

Non

The muxing settings.

Segment

object

Non

The segment settings.

Duration

string

Non

The segment duration.

10

ForceSegTime

string

Non

The forced segment time point.

2,3

TransConfig

object

Non

The conditional transcoding parameters.

TransMode

string

Non

The video transcoding mode. Valid values:

onepass

IsCheckReso

string

Non

Specifies whether to check the video resolution. Only one of IsCheckReso and IsCheckResoFail can be used. IsCheckResoFail takes higher priority.

true

IsCheckResoFail

string

Non

Specifies whether to check the video resolution. Only one of IsCheckReso and IsCheckResoFail can be used. This parameter takes higher priority.

true

IsCheckVideoBitrate

string

Non

Specifies whether to check the video bitrate. Only one of IsCheckVideoBitrate and IsCheckVideoBitrateFail can be used. IsCheckVideoBitrateFail takes higher priority.

true

IsCheckVideoBitrateFail

string

Non

Specifies whether to check the video bitrate. Only one of IsCheckVideoBitrate and IsCheckVideoBitrateFail can be used. This parameter takes higher priority.

true

IsCheckAudioBitrate

string

Non

Specifies whether to check the audio bitrate. Only one of IsCheckAudioBitrate and IsCheckAudioBitrateFail can be used. IsCheckAudioBitrateFail takes higher priority.

true

IsCheckAudioBitrateFail

string

Non

Specifies whether to check the audio bitrate. Only one of IsCheckAudioBitrate and IsCheckAudioBitrateFail can be used. This parameter takes higher priority.

true

AdjDarMethod

string

Non

The resolution rewriting method. This parameter takes effect only when both Width and Height are specified. It can be used together with LongShortMode.

none

ImageWatermarks

array<object>

Non

La configuration du filigrane d'image.

array<object>

Non

La configuration du filigrane d'image.

TemplateId

string

Oui

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

Non

The override parameters. If specified, these parameters overwrite the corresponding template parameters.

Width

string

Non

The width of the watermark image on the output video.

32

Height

string

Non

The height of the watermark image on the output video.

32

Dx

string

Non

The horizontal offset of the watermark image relative to the output video.

10

Dy

string

Non

The vertical offset of the watermark image relative to the output video.

10

ReferPos

string

Non

The position of the watermark.

TopLeft

Timeline

object

Non

The dynamic watermark display time settings.

Start

string

Non

The time when the watermark starts to appear.

00:00:05

Duration

string

Non

The duration for which the watermark is displayed.

ToEND

File

object

Non

The watermark image file.

Type

string

Non

The media object type.

OSS

Media

string

Non

The media value.

oss://bucket/path/to/video.mp4

TextWatermarks

array<object>

Non

La configuration du filigrane textuel.

array<object>

Non

La configuration du filigrane textuel.

TemplateId

string

Oui

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

Non

The override parameters. If specified, these parameters overwrite the corresponding template parameters.

Content

string

Non

The watermark text. Base64 encoding is not required. The string must be UTF-8 encoded.

Test watermark

FontName

string

Non

The font. Default value: SimSun.

SimSun

FontColor

string

Non

The font color.

#006400

FontAlpha

string

Non

The font transparency.

1.0

Top

string

Non

The top margin of the text.

10

Left

string

Non

The left margin of the text.

10

FontSize

integer

Non

The font size.

16

BorderWidth

integer

Non

The border width.

0

BorderColor

string

Non

The border color.

#006400

Adaptive

string

Non

Specifies whether to adjust the font size based on the output video size. true / false, default: false.

false

Subtitles

array<object>

Non

La configuration de l'incrustation des sous-titres.

array<object>

Non

La configuration de l'incrustation des sous-titres.

TemplateId

string

Oui

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

Non

The override parameters. If specified, these parameters overwrite the corresponding template parameters.

Format

string

Non

The subtitle file format.

vtt

CharEnc

string

Non

The file encoding format.

UTF-8

File

object

Non

The subtitle file.

Type

string

Non

The media object type.

OSS

Media

string

Non

The media value.

oss://bucket/path/to/video.mp4

Encryption

object

Non

La configuration du chiffrement.

EncryptType

string

Non

The encryption type. Valid values:

PrivateEncryption

CipherText

string

Non

The key ciphertext for standard encryption.

MTYi00NDU0LTg5O****

DecryptKeyUri

string

Non

The decryption service URL for standard encryption.

https://sample.com/path?CipherText=MTYi00NDU0LTg5O****

KeyServiceType

string

Non

The key service type for standard encryption. Valid values:

KMS

CombineConfigs

array<object>

Non

La configuration de fusion de flux à entrées multiples.

object

Non

La configuration de fusion de flux.

AudioIndex

string

Oui

The audio stream index.

0 or exclude

VideoIndex

string

Oui

The video stream index.

0 or exclude

Start

number

Non

The start time of the input stream. Default value: 0.

0.0

Duration

number

Non

The duration of the input stream. Default value: the video duration.

20.0

UserData

string

Non

Paramètres personnalisés au format JSON. La valeur peut comporter jusqu'à 512 octets. La configuration d'URL de rappel personnalisée est prise en charge.

user-data

ScheduleConfig

object

Non

Les informations de planification des tâches.

job-name

PipelineId

string

Non

L'identifiant du pipeline.

e37ebee5d98b4781897f6086e89f9c56

Priority

integer

Non

La priorité de la tâche. Une valeur plus élevée indique une priorité plus haute. Valeurs valides : 1 à 10.

5

ClientToken

string

Non

La clé d'idempotence utilisée pour garantir l'idempotence de la requête.

****12e8864746a0a398****

Éléments de réponse

Élément

Type

Description

Exemple

object

RequestId

string

L'identifiant de la requête.

31E30781-9495-5E2D-A84D-759B0A01E262

TranscodeParentJob

object

TranscodeParentJobWithSubJobDTO.

TranscodeJobList

array<object>

La liste des sous-tâches.

array<object>

Les détails de la sous-tâche.

CreateTime

string

The time when the task was created.

2022-01-12T08:49:41Z

Name

string

The task name.

transcode-job

ParentJobId

string

The parent job ID.

8b2198504dd340b7b3c9842a74fc9baa

JobId

string

The subtask ID.

7d6a7e0d4db2457a8d45ff5d43e1bf0a

JobIndex

integer

The index number of the subtask within the entire job.

0

InputGroup

array<object>

The job input group. A single input creates a transcoding job. Multiple inputs create an audio and video stream merging job.

object

The job input.

Type

string

The media object type.

OSS

Media

string

The media value.

oss://bucket/path/to/video.mp4

InputUrl

string

The input stream path. This parameter takes effect only when Type is set to Media, which allows you to specify a specific file under the media asset as the input. The system checks whether the specified inputUrl exists under the media asset.

oss://bucket/path/to/video.mp4

ProcessConfig

object

The transcoding processing configuration.

Transcode

object

The transcoding configuration.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

The override parameters. If specified, these parameters overwrite the corresponding template parameters.

Video

object

The video settings.

Codec

string

The encoding format.

H.264

Profile

string

The encoding profile.

Main

Bitrate

string

The average video bitrate.

3000

Crf

string

The bitrate-quality control factor.

23

Width

string

The width.

1920

Height

string

The height.

1080

Fps

string

The frame rate.

25

Gop

string

The maximum number of frames between keyframes.

250

Preset

string

The video encoder preset. Only H.264 supports this parameter.

medium

ScanMode

string

The scan mode.

progressive

PixFmt

string

The video pixel format.

yuv420p

Remove

string

Specifies whether to remove the video stream.

false

Crop

string

The video cropping setting. Two methods are supported.

1280:800:0:140

Pad

string

The video padding setting.

1280:800:0:140

LongShortMode

string

Specifies whether to enable landscape and portrait auto-adaptation (long-short side mode).

false

Bufsize

string

The buffer size.

6000

Maxrate

string

The peak video bitrate.

9000

AbrMax

string

The maximum ABR bitrate. This parameter is valid only for Narrowband HD 1.0.

6000

Audio

object

The audio settings.

Codec

string

The audio codec format. Valid values: AAC, MP3, VORBIS, and FLAC.

AAC

Profile

string

The audio encoding preset.

aac_low

Samplerate

string

The sample rate.

44100

Bitrate

string

The audio bitrate of the output file.

128

Channels

string

The number of audio channels.

2

Remove

string

Specifies whether to remove the audio stream.

false

Volume

object

The volume control settings.

Method

string

The volume adjustment method.

auto

IntegratedLoudnessTarget

string

The target loudness.

-6

TruePeak

string

The Peak Volume.

-1

LoudnessRangeTarget

string

The loudness range.

8

Container

object

The container format settings.

Format

string

The container format.

mp4

MuxConfig

object

The muxing settings.

Segment

object

The segment settings.

Duration

string

The segment duration.

10

ForceSegTime

string

The forced segment time point.

2,3

TransConfig

object

The conditional transcoding parameters.

TransMode

string

The video transcoding mode. Valid values:

onepass

IsCheckReso

string

Specifies whether to check the video resolution. Only one of IsCheckReso and IsCheckResoFail can be used. IsCheckResoFail takes higher priority.

true

IsCheckResoFail

string

Specifies whether to check the video resolution. Only one of IsCheckReso and IsCheckResoFail can be used. This parameter takes higher priority.

true

IsCheckVideoBitrate

string

Specifies whether to check the video bitrate. Only one of IsCheckVideoBitrate and IsCheckVideoBitrateFail can be used. IsCheckVideoBitrateFail takes higher priority.

true

IsCheckVideoBitrateFail

string

Specifies whether to check the video bitrate. Only one of IsCheckVideoBitrate and IsCheckVideoBitrateFail can be used. This parameter takes higher priority.

true

IsCheckAudioBitrate

string

Specifies whether to check the audio bitrate. Only one of IsCheckAudioBitrate and IsCheckAudioBitrateFail can be used. IsCheckAudioBitrateFail takes higher priority.

true

IsCheckAudioBitrateFail

string

Specifies whether to check the audio bitrate. Only one of IsCheckAudioBitrate and IsCheckAudioBitrateFail can be used. This parameter takes higher priority.

true

AdjDarMethod

string

The resolution rewriting method. This parameter takes effect only when both Width and Height are specified. It can be used together with LongShortMode.

none

ImageWatermarks

array<object>

The image watermark configuration.

array<object>

The image watermark configuration.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

The override parameters. If specified, these parameters overwrite the corresponding template parameters.

Width

string

The width of the watermark image on the output video.

32

Height

string

The height of the watermark image on the output video.

32

Dx

string

The horizontal offset of the watermark image relative to the output video.

10

Dy

string

The vertical offset of the watermark image relative to the output video.

10

ReferPos

string

The position of the watermark.

TopLeft

Timeline

object

The dynamic watermark display time settings.

Start

string

The time when the watermark starts to appear.

00:00:05

Duration

string

The duration for which the watermark is displayed.

ToEND

File

object

The watermark image file.

Type

string

The media object type.

OSS

Media

string

The media value.

oss://bucket/path/to/video.mp4

TextWatermarks

array<object>

The text watermark configuration.

array<object>

The text watermark configuration.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

The override parameters. If specified, these parameters override the corresponding parameters in the template.

Content

string

The watermark text. Base64 encoding is not required. The string must be UTF-8 encoded.

Test watermark

FontName

string

The font. Default value: SimSun.

SimSun

FontColor

string

The font color.

#006400

FontAlpha

string

The font transparency.

1.0

Top

string

The top margin of the text.

10

Left

string

The left margin of the text.

10

FontSize

integer

The font size.

16

BorderWidth

integer

The border width.

0

BorderColor

string

The border color.

#006400

Adaptive

string

Specifies whether to adjust the font size based on the output video size. true / false, default: false.

false

Subtitles

array<object>

The subtitle burn-in configuration.

array<object>

The subtitle burn-in configuration.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

The override parameters. If specified, these parameters overwrite the corresponding template parameters.

Format

string

The subtitle file format.

vtt

CharEnc

string

The file encoding format.

UTF-8

File

object

The subtitle file.

Type

string

The media object type.

OSS

Media

string

The media value.

oss://bucket/path/to/video.mp4

Encryption

object

The encryption configuration.

EncryptType

string

The encryption type.

PrivateEncryption

CipherText

string

The key ciphertext for standard encryption.

MTYi00NDU0LTg5O****

DecryptKeyUri

string

The decryption service URL for standard encryption.

https://sample.com/path?CipherText=MTYi00NDU0LTg5O****

KeyServiceType

string

The key service type. Currently, only KMS and Base64 are supported.

KMS

CombineConfigs

array<object>

The multi-input stream merging configuration.

object

The stream merging configuration.

AudioIndex

string

The audio stream index.

0 or exclude

VideoIndex

string

The video stream index.

0 or exclude

Start

number

The start time of the input stream. Default value: 0.

0.0

Duration

number

The duration of the input stream. Default value: the video duration.

20.0

Output

object

The output media configuration.

Type

string

The media object type.

OSS

Media

string

The media value.

oss://bucket/path/to/video.mp4

OutputUrl

string

The output stream path.

oss://bucket/path/to/{MediaId}/{JobId}.mp4

UserData

string

The user data.

user-data

ScheduleConfig

object

The task scheduling information.

PipelineId

string

The pipeline ID.

e37ebee5d98b4781897f6086e89f9c56

Priority

integer

The task priority. A larger value indicates a higher priority. Valid values: 1 to 10.

5

Status

string

The transcoding job status.

Init

OutFileMeta

object

The media information of the output video generated by the job.

FileBasicInfo

object

The basic file information.

MediaId

string

The media asset ID.

73e07de0f77171eca3fc7035d0b26402

FileName

string

The file name.

file.m3u8

FileStatus

string

The file status.

Normal

FileType

string

The file type. Valid values: source_file, transcode_file.

source_file

FileSize

string

The file size. Unit: bytes.

31737

FileUrl

string

The file URL.

http://bucket.oss-cn-shanghai.aliyuncs.com/path/to/file.m3u8

Region

string

The region where the file is stored.

cn-shanghai

FormatName

string

The video format name.

hls,applehttp

Duration

string

The video duration. Unit: seconds.

403.039999

Bitrate

string

The video bitrate.

888.563

Width

string

The width.

848

Height

string

The height.

478

AudioStreamInfoList

array<object>

The audio stream information.

object

The audio stream information.

Index

string

The stream index.

1

CodecName

string

The encoding format.

aac

CodecLongName

string

The codec format name.

AAC (Advanced Audio Coding)

CodecTimeBase

string

The codec time base.

1/44100

CodecTagString

string

The codec tag string.

[15][0][0][0]

CodecTag

string

The codec tag.

0x000f

SampleFmt

string

The sample format.

fltp

SampleRate

string

The sample rate. Unit: Hz.

44100

Channels

string

The number of audio channels.

2

ChannelLayout

string

The channel layout.

stereo

Timebase

string

The time base.

1/90000

StartTime

string

The start time.

1.473556

Duration

string

The duration. Unit: seconds.

403.039989

Bitrate

string

The bitrate.

0.f

Lang

string

The language.

cn

VideoStreamInfoList

array<object>

The video stream information.

object

The video stream information.

Index

string

The stream index.

0

Codec_name

string

The encoding format.

h264

Codec_long_name

string

The codec format name.

H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10

Profile

string

The codec profile.

High

Codec_time_base

string

The codec time base.

1/50

Codec_tag_string

string

The codec tag string.

[27][0][0][0]

Codec_tag

string

The codec tag.

0x001b

Width

string

The width.

848

Height

string

The height.

478

Has_b_frames

string

Indicates whether the video contains B-frames.

2

Sar

string

The sample aspect ratio (SAR).

478:477

Dar

string

The display aspect ratio (DAR).

16:9

PixFmt

string

The pixel format.

yuv420p

Level

string

The codec level.

31

Fps

string

The frame rate.

25.0

Avg_fps

string

The average frame rate.

25.0

Time_base

string

The time base.

1/90000

Start_time

string

The start time.

1.473556

Duration

string

The duration. Unit: seconds.

403.039989

Bit_rate

string

The bitrate.

888.563

NumFrames

string

The total number of frames.

10040

Lang

string

The language.

cn

Rotate

string

The video rotation angle.

0

SubmitResultJson

object

The job submission result.

{}

SubmitTime

string

The job submission time.

2022-01-12T08:49:41Z

FinishTime

string

The job completion time.

2022-01-12T08:49:41Z

RequestId

string

The request ID returned when the job was submitted.

31E30781-9495-5E2D-A84D-759B0A01E262

CreateTime

string

L'heure de création de la tâche. L'heure est au format yyyy-MM-ddTHH:mm:ssZ.

2022-01-12T08:49:41Z

Name

string

Le nom de la tâche.

transcode-job

RequestId

string

L'identifiant de la requête renvoyé lors de la soumission de la tâche.

31E30781-9495-5E2D-A84D-759B0A01E262

ParentJobId

string

L'identifiant de la tâche parente.

8b2198504dd340b7b3c9842a74fc9baa

JobCount

integer

Le nombre de sous-tâches.

1

Status

string

L'état de la tâche. Valeurs valides :

  • Success : Une fois toutes les sous-tâches terminées, la tâche est considérée comme réussie si au moins une sous-tâche a réussi.

  • Fail : Toutes les sous-tâches ont échoué.

Success

TriggerSource

string

La source de la tâche. Valeurs valides :

  • API : API.

  • WorkFlow : workflow.

  • Console : console.

API

Percent

integer

Le pourcentage d'avancement de la tâche.

0

SubmitTime

string

L'heure de soumission de la tâche. L'heure est au format yyyy-MM-ddTHH:mm:ssZ.

2022-01-12T08:49:41Z

FinishTime

string

L'heure de fin de la tâche. L'heure est au format yyyy-MM-ddTHH:mm:ssZ.

2022-01-12T08:49:41Z

InputGroup

array<object>

Le groupe d'entrées de la tâche. Une entrée unique crée une tâche de transcodage. Plusieurs entrées créent une tâche de fusion de flux audio et vidéo.

object

L'entrée de la tâche.

Type

string

The media object type.

OSS

Media

string

The media value.

oss://bucket/path/to/video.mp4

OutputGroup

array<object>

Le groupe de sortie de la tâche.

array<object>

La sortie de la tâche.

Output

object

The output media configuration.

Type

string

The media object type.

OSS

Media

string

The media value.

oss://bucket/path/to/video.mp4

ProcessConfig

object

The task processing configuration.

Transcode

object

The transcoding configuration.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

The override parameters. If specified, these parameters overwrite the corresponding template parameters.

Video

object

The video settings.

Codec

string

The encoding format.

H.264

Profile

string

The encoding profile.

Main

Bitrate

string

The average video bitrate.

3000

Crf

string

The bitrate-quality control factor.

23

Width

string

The width.

1920

Height

string

The height.

1080

Fps

string

The frame rate.

25

Gop

string

The maximum number of frames between keyframes.

250

Preset

string

The video encoder preset. Only H.264 supports this parameter.

medium

ScanMode

string

The scan mode.

progressive

PixFmt

string

The video pixel format.

yuv420p

Remove

string

Specifies whether to remove the video stream.

false

Crop

string

The video cropping settings.

1280:800:0:140

Pad

string

The video padding (black border) settings.

1280:800:0:140

LongShortMode

string

Specifies whether to enable landscape and portrait auto-adaptation (long-short side mode).

false

Bufsize

string

The buffer size.

6000

Maxrate

string

The peak video bitrate.

9000

AbrMax

string

The maximum ABR bitrate. This parameter is valid only for Narrowband HD 1.0.

6000

Audio

object

The audio settings.

Codec

string

The audio codec format. Valid values: AAC, MP3, VORBIS, and FLAC.

AAC

Profile

string

The audio encoding preset.

aac_low

Samplerate

string

The sample rate.

44100

Bitrate

string

The audio bitrate of the output file.

128

Channels

string

The number of audio channels.

2

Remove

string

Specifies whether to remove the audio stream.

false

Volume

object

The volume control settings.

Method

string

The volume adjustment method.

auto

IntegratedLoudnessTarget

string

The target loudness.

-6

TruePeak

string

The Peak Volume.

-1

LoudnessRangeTarget

string

The loudness range.

8

Container

object

The container format settings.

Format

string

The container format.

mp4

MuxConfig

object

The muxing settings.

Segment

object

The segment settings.

Duration

string

The segment duration.

10

ForceSegTime

string

The forced segment time point.

2,3

TransConfig

object

The conditional transcoding parameters.

TransMode

string

The video transcoding mode. Valid values:

onepass

IsCheckReso

string

Specifies whether to check the video resolution. Only one of IsCheckReso and IsCheckResoFail can be used. IsCheckResoFail takes higher priority.

true

IsCheckResoFail

string

Specifies whether to check the video resolution. Only one of IsCheckReso and IsCheckResoFail can be used. This parameter takes higher priority.

true

IsCheckVideoBitrate

string

Specifies whether to check the video bitrate. Only one of IsCheckVideoBitrate and IsCheckVideoBitrateFail can be used. IsCheckVideoBitrateFail takes higher priority.

true

IsCheckVideoBitrateFail

string

Specifies whether to check the video bitrate. Only one of IsCheckVideoBitrate and IsCheckVideoBitrateFail can be used. This parameter takes higher priority.

true

IsCheckAudioBitrate

string

Specifies whether to check the audio bitrate. Only one of IsCheckAudioBitrate and IsCheckAudioBitrateFail can be used. IsCheckAudioBitrateFail takes higher priority.

true

IsCheckAudioBitrateFail

string

Specifies whether to check the audio bitrate. Only one of IsCheckAudioBitrate and IsCheckAudioBitrateFail can be used. This parameter takes higher priority.

true

AdjDarMethod

string

The resolution rewriting method. This parameter takes effect only when both Width and Height are specified. It can be used together with LongShortMode.

none

ImageWatermarks

array<object>

The image watermark configuration.

array<object>

The image watermark configuration.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

The override parameters. If specified, these parameters overwrite the corresponding template parameters.

Width

string

The width of the watermark image on the output video.

32

Height

string

The height of the watermark image on the output video.

32

Dx

string

The horizontal offset of the watermark image relative to the output video.

10

Dy

string

The vertical offset of the watermark image relative to the output video.

10

ReferPos

string

The position of the watermark.

TopLeft

Timeline

object

The dynamic watermark display time settings.

Start

string

The time when the watermark starts to appear.

00:00:05

Duration

string

The duration for which the watermark is displayed.

ToEND

File

object

The watermark image file.

Type

string

The media object type.

OSS

Media

string

The media value.

oss://bucket/path/to/video.mp4

TextWatermarks

array<object>

The text watermark configuration.

array<object>

The text watermark configuration.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

The override parameters. If specified, these parameters overwrite the corresponding template parameters.

Content

string

The watermark text. Base64 encoding is not required. The string must be UTF-8 encoded.

Test watermark

FontName

string

The font. Default value: SimSun.

SimSun

FontColor

string

The font color.

#006400

FontAlpha

string

The font transparency.

1.0

Top

string

The top margin of the text.

10

Left

string

The left margin of the text.

10

FontSize

integer

The font size.

16

BorderWidth

integer

The border width.

0

BorderColor

string

The border color.

#006400

Adaptive

string

Adjusts the font size based on the output video size.

false

Subtitles

array<object>

The subtitle burn-in configuration.

array<object>

The subtitle burn-in configuration.

TemplateId

string

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410

OverwriteParams

object

The override parameters. If specified, these parameters overwrite the corresponding template parameters.

Format

string

The subtitle file format.

vtt

CharEnc

string

The file encoding format.

UTF-8

File

object

The subtitle file.

Type

string

The media object type.

OSS

Media

string

The media value.

oss://bucket/path/to/video.mp4

Encryption

object

The encryption configuration.

EncryptType

string

The encryption type.

PrivateEncryption

CipherText

string

The key ciphertext for standard encryption.

MTYi00NDU0LTg5O****

DecryptKeyUri

string

The decryption service URL for standard encryption.

https://sample.com/path?CipherText=MTYi00NDU0LTg5O****

KeyServiceType

string

The key service type. Currently, only KMS and Base64 are supported.

KMS

CombineConfigs

array<object>

The multi-input stream merging configuration.

object

The multi-input stream merging configuration.

AudioIndex

string

The audio stream index.

0 or exclude

VideoIndex

string

The video stream index.

0 or exclude

Start

number

The start time of the input stream. Default value: 0.

0.0

Duration

number

The duration of the input stream. Default value: the video duration.

20.0

UserData

string

Les données utilisateur.

user-data

ScheduleConfig

object

La configuration de la planification des tâches.

PipelineId

string

The pipeline ID.

e37ebee5d98b4781897f6086e89f9c56

Priority

integer

The task priority. A larger value indicates a higher priority. Valid values: 1 to 10.

5

Exemples

JSON format

{
  "RequestId": "31E30781-9495-5E2D-A84D-759B0A01E262",
  "TranscodeParentJob": {
    "TranscodeJobList": [
      {
        "CreateTime": "2022-01-12T08:49:41Z",
        "Name": "transcode-job",
        "ParentJobId": "8b2198504dd340b7b3c9842a74fc9baa",
        "JobId": "7d6a7e0d4db2457a8d45ff5d43e1bf0a",
        "JobIndex": 0,
        "InputGroup": [
          {
            "Type": "OSS",
            "Media": "oss://bucket/path/to/video.mp4",
            "InputUrl": "oss://bucket/path/to/video.mp4\n"
          }
        ],
        "ProcessConfig": {
          "Transcode": {
            "TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
            "OverwriteParams": {
              "Video": {
                "Codec": "H.264",
                "Profile": "Main",
                "Bitrate": "3000",
                "Crf": "23",
                "Width": "1920",
                "Height": "1080",
                "Fps": "25",
                "Gop": "250",
                "Preset": "medium",
                "ScanMode": "progressive",
                "PixFmt": "yuv420p",
                "Remove": "false",
                "Crop": "1280:800:0:140",
                "Pad": "1280:800:0:140",
                "LongShortMode": "false",
                "Bufsize": "6000",
                "Maxrate": "9000",
                "AbrMax": "6000"
              },
              "Audio": {
                "Codec": "AAC",
                "Profile": "aac_low",
                "Samplerate": "44100",
                "Bitrate": "128",
                "Channels": "2",
                "Remove": "false",
                "Volume": {
                  "Method": "auto",
                  "IntegratedLoudnessTarget": "-6",
                  "TruePeak": "-1",
                  "LoudnessRangeTarget": "8"
                }
              },
              "Container": {
                "Format": "mp4"
              },
              "MuxConfig": {
                "Segment": {
                  "Duration": "10",
                  "ForceSegTime": "2,3"
                }
              },
              "TransConfig": {
                "TransMode": "onepass",
                "IsCheckReso": "true",
                "IsCheckResoFail": "true",
                "IsCheckVideoBitrate": "true",
                "IsCheckVideoBitrateFail": "true",
                "IsCheckAudioBitrate": "true",
                "IsCheckAudioBitrateFail": "true",
                "AdjDarMethod": "none"
              }
            }
          },
          "ImageWatermarks": [
            {
              "TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
              "OverwriteParams": {
                "Width": "32",
                "Height": "32",
                "Dx": "10",
                "Dy": "10",
                "ReferPos": "TopLeft",
                "Timeline": {
                  "Start": "00:00:05",
                  "Duration": "ToEND"
                },
                "File": {
                  "Type": "OSS",
                  "Media": "oss://bucket/path/to/video.mp4"
                }
              }
            }
          ],
          "TextWatermarks": [
            {
              "TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
              "OverwriteParams": {
                "Content": "Test watermark",
                "FontName": "SimSun",
                "FontColor": "#006400",
                "FontAlpha": "1.0",
                "Top": "10",
                "Left": "10",
                "FontSize": 16,
                "BorderWidth": 0,
                "BorderColor": "#006400",
                "Adaptive": "false"
              }
            }
          ],
          "Subtitles": [
            {
              "TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
              "OverwriteParams": {
                "Format": "vtt",
                "CharEnc": "UTF-8",
                "File": {
                  "Type": "OSS",
                  "Media": "oss://bucket/path/to/video.mp4"
                }
              }
            }
          ],
          "Encryption": {
            "EncryptType": "PrivateEncryption",
            "CipherText": "MTYi00NDU0LTg5O****",
            "DecryptKeyUri": "https://sample.com/path?CipherText=MTYi00NDU0LTg5O****",
            "KeyServiceType": "KMS"
          },
          "CombineConfigs": [
            {
              "AudioIndex": "0 or exclude",
              "VideoIndex": "0 or exclude",
              "Start": 0,
              "Duration": 20
            }
          ]
        },
        "Output": {
          "Type": "OSS",
          "Media": "oss://bucket/path/to/video.mp4",
          "OutputUrl": "oss://bucket/path/to/{MediaId}/{JobId}.mp4\n"
        },
        "UserData": "user-data",
        "ScheduleConfig": {
          "PipelineId": "e37ebee5d98b4781897f6086e89f9c56",
          "Priority": 5
        },
        "Status": "Init",
        "OutFileMeta": {
          "FileBasicInfo": {
            "MediaId": "73e07de0f77171eca3fc7035d0b26402",
            "FileName": "file.m3u8",
            "FileStatus": "Normal",
            "FileType": "source_file",
            "FileSize": "31737",
            "FileUrl": "http://bucket.oss-cn-shanghai.aliyuncs.com/path/to/file.m3u8",
            "Region": "cn-shanghai",
            "FormatName": "hls,applehttp",
            "Duration": "403.039999",
            "Bitrate": "888.563",
            "Width": "848",
            "Height": "478"
          },
          "AudioStreamInfoList": [
            {
              "Index": "1",
              "CodecName": "aac",
              "CodecLongName": "AAC (Advanced Audio Coding)",
              "CodecTimeBase": "1/44100",
              "CodecTagString": "[15][0][0][0]",
              "CodecTag": "0x000f",
              "SampleFmt": "fltp",
              "SampleRate": "44100",
              "Channels": "2",
              "ChannelLayout": "stereo",
              "Timebase": "1/90000",
              "StartTime": "1.473556",
              "Duration": "403.039989",
              "Bitrate": "0.f",
              "Lang": "cn"
            }
          ],
          "VideoStreamInfoList": [
            {
              "Index": "0",
              "Codec_name": "h264",
              "Codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
              "Profile": "High",
              "Codec_time_base": "1/50",
              "Codec_tag_string": "[27][0][0][0]",
              "Codec_tag": "0x001b",
              "Width": "848",
              "Height": "478",
              "Has_b_frames": "2",
              "Sar": "478:477",
              "Dar": "16:9",
              "PixFmt": "yuv420p",
              "Level": "31",
              "Fps": "25.0",
              "Avg_fps": "25.0",
              "Time_base": "1/90000",
              "Start_time": "1.473556",
              "Duration": "403.039989",
              "Bit_rate": "888.563",
              "NumFrames": "10040",
              "Lang": "cn",
              "Rotate": "0"
            }
          ]
        },
        "SubmitResultJson": {},
        "SubmitTime": "2022-01-12T08:49:41Z",
        "FinishTime": "2022-01-12T08:49:41Z",
        "RequestId": "31E30781-9495-5E2D-A84D-759B0A01E262"
      }
    ],
    "CreateTime": "2022-01-12T08:49:41Z",
    "Name": "transcode-job",
    "RequestId": "31E30781-9495-5E2D-A84D-759B0A01E262",
    "ParentJobId": "8b2198504dd340b7b3c9842a74fc9baa",
    "JobCount": 1,
    "Status": "Success",
    "TriggerSource": "API",
    "Percent": 0,
    "SubmitTime": "2022-01-12T08:49:41Z",
    "FinishTime": "2022-01-12T08:49:41Z",
    "InputGroup": [
      {
        "Type": "OSS",
        "Media": "oss://bucket/path/to/video.mp4"
      }
    ],
    "OutputGroup": [
      {
        "Output": {
          "Type": "OSS",
          "Media": "oss://bucket/path/to/video.mp4"
        },
        "ProcessConfig": {
          "Transcode": {
            "TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
            "OverwriteParams": {
              "Video": {
                "Codec": "H.264",
                "Profile": "Main",
                "Bitrate": "3000",
                "Crf": "23",
                "Width": "1920",
                "Height": "1080",
                "Fps": "25",
                "Gop": "250",
                "Preset": "medium",
                "ScanMode": "progressive",
                "PixFmt": "yuv420p",
                "Remove": "false",
                "Crop": "1280:800:0:140",
                "Pad": "1280:800:0:140",
                "LongShortMode": "false",
                "Bufsize": "6000",
                "Maxrate": "9000",
                "AbrMax": "6000"
              },
              "Audio": {
                "Codec": "AAC",
                "Profile": "aac_low",
                "Samplerate": "44100",
                "Bitrate": "128",
                "Channels": "2",
                "Remove": "false",
                "Volume": {
                  "Method": "auto",
                  "IntegratedLoudnessTarget": "-6",
                  "TruePeak": "-1",
                  "LoudnessRangeTarget": "8"
                }
              },
              "Container": {
                "Format": "mp4"
              },
              "MuxConfig": {
                "Segment": {
                  "Duration": "10",
                  "ForceSegTime": "2,3"
                }
              },
              "TransConfig": {
                "TransMode": "onepass",
                "IsCheckReso": "true",
                "IsCheckResoFail": "true",
                "IsCheckVideoBitrate": "true",
                "IsCheckVideoBitrateFail": "true",
                "IsCheckAudioBitrate": "true",
                "IsCheckAudioBitrateFail": "true",
                "AdjDarMethod": "none"
              }
            }
          },
          "ImageWatermarks": [
            {
              "TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
              "OverwriteParams": {
                "Width": "32",
                "Height": "32",
                "Dx": "10",
                "Dy": "10",
                "ReferPos": "TopLeft",
                "Timeline": {
                  "Start": "00:00:05",
                  "Duration": "ToEND"
                },
                "File": {
                  "Type": "OSS",
                  "Media": "oss://bucket/path/to/video.mp4"
                }
              }
            }
          ],
          "TextWatermarks": [
            {
              "TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
              "OverwriteParams": {
                "Content": "Test watermark",
                "FontName": "SimSun",
                "FontColor": "#006400",
                "FontAlpha": "1.0",
                "Top": "10",
                "Left": "10",
                "FontSize": 16,
                "BorderWidth": 0,
                "BorderColor": "#006400",
                "Adaptive": "false"
              }
            }
          ],
          "Subtitles": [
            {
              "TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
              "OverwriteParams": {
                "Format": "vtt",
                "CharEnc": "UTF-8",
                "File": {
                  "Type": "OSS",
                  "Media": "oss://bucket/path/to/video.mp4"
                }
              }
            }
          ],
          "Encryption": {
            "EncryptType": "PrivateEncryption",
            "CipherText": "MTYi00NDU0LTg5O****",
            "DecryptKeyUri": "https://sample.com/path?CipherText=MTYi00NDU0LTg5O****",
            "KeyServiceType": "KMS"
          },
          "CombineConfigs": [
            {
              "AudioIndex": "0 or exclude",
              "VideoIndex": "0 or exclude",
              "Start": 0,
              "Duration": 20
            }
          ]
        }
      }
    ],
    "UserData": "user-data",
    "ScheduleConfig": {
      "PipelineId": "e37ebee5d98b4781897f6086e89f9c56",
      "Priority": 5
    }
  }
}

Codes d'erreur

Consultez Codes d'erreur pour la liste complète.

Notes de version

Consultez Notes de version pour la liste complète.