Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::MPS::TranscodeJob

Última atualização: Jun 27, 2026

Envia um job de transcodificação no ApsaraVideo Media Processing (MPS).

Sintaxe

{
  "Type": "ALIYUN::MPS::TranscodeJob",
  "Properties": {
    "Input": Map,
    "OutputBucket": String,
    "Outputs": List,
    "PipelineId": String,
    "OutputLocation": String
  }
}

Propriedades

Nome da propriedade

Tipo

Obrigatório

Atualize permitida

Descrição

Restrições

Input

Map

Sim

Não

Entrada do job de transcodificação.

Para obter mais informações, consulte Detalhes dos parâmetros.

  • A região do bucket do Object Storage Service (OSS) deve corresponder à região atual do ApsaraVideo Media Processing (MPS).

Nota

Na API do ApsaraVideo Media Processing, codifique o parâmetro Object em URL com base em UTF-8 antes de utilizá-lo.

Exemplo:

{"Bucket":"exampleBucket","Location":"oss-cn-hangzhou","Object":"example.flv","Referer": "The hotlink protection parameters configured in the OSS console"}

OutputBucket

String

Sim

Não

Bucket do OSS que armazena o arquivo de saída.

  • Esta propriedade deve obedecer às regras de nomenclatura de buckets do OSS. Para obter mais informações, consulte Termos.

Outputs

List

Sim

Não

Configurações de saída do job de transcodificação.

Para obter mais informações, consulte Detalhes dos parâmetros.

  • Lista de objetos Output em um array JSON. O máximo permitido é de 30 objetos.

Exemplo:

[{"OutputObject":"exampleOutput.mp4","TemplateId":"6181666213ab41b9bc21da8ff5ff****","WaterMarks":[{"InputFile":{"Bucket":"exampleBucket","Location":"oss-cn-hangzhou","Object":"image_01.png"},"WaterMarkTemplateId":"9b772ce2740d4d55876d8b542d47****"}],"UserData":"testid-001"}]

PipelineId

String

Sim

Não

ID do pipeline do MPS.

Para obter mais informações, consulte Termos.

OutputLocation

String

Não

Não

Região do bucket do OSS onde o arquivo de saída está armazenado.

  • O bucket do OSS deve estar na mesma região do serviço ApsaraVideo Media Processing.

  • O bucket deve atender à definição de Bucket do OSS. Para obter mais informações, consulte Termos.

Valores de retorno

Fn::GetAtt

JobIds: lista de IDs de jobs.

Exemplos

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  OutputBucket:
    Type: String
    Description:
      en: The name of the OSS bucket where the output files are stored.
    Required: true
  Input:
    Type: Json
    Description:
      en: The input configuration of the job. For more information, see Input details.
    Required: true
  Outputs:
    AssociationPropertyMetadata: {}
    AssociationProperty: List[Parameters]
    Type: Json
    Description:
      en: The output configuration of the job. Consists of a list of Output objects, JSON array, with a maximum size of 30.
    Required: true
  PipelineId:
    Type: String
    Description:
      en: The ID of the pipeline.
    Required: true
Resources:
  TranscodeJob:
    Type: ALIYUN::MPS::TranscodeJob
    Properties:
      OutputBucket:
        Ref: OutputBucket
      Input:
        Ref: Input
      Outputs:
        Ref: Outputs
      PipelineId:
        Ref: PipelineId
Outputs:
  JobIds:
    Description: The IDs of the jobs.
    Value:
      Fn::GetAtt:
        - TranscodeJob
        - JobIds
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "OutputBucket": {
      "Type": "String",
      "Description": {
        "en": "The name of the OSS bucket where the output files are stored."
      },
      "Required": true
    },
    "Input": {
      "Type": "Json",
      "Description": {
        "en": "The input configuration of the job. For more information, see Input details."
      },
      "Required": true
    },
    "Outputs": {
      "AssociationPropertyMetadata": {},
      "AssociationProperty": "List[Parameters]",
      "Type": "Json",
      "Description": {
        "en": "The output configuration of the job. Consists of a list of Output objects, JSON array, with a maximum size of 30."
      },
      "Required": true
    },
    "PipelineId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the pipeline."
      },
      "Required": true
    }
  },
  "Resources": {
    "TranscodeJob": {
      "Type": "ALIYUN::MPS::TranscodeJob",
      "Properties": {
        "OutputBucket": {
          "Ref": "OutputBucket"
        },
        "Input": {
          "Ref": "Input"
        },
        "Outputs": {
          "Ref": "Outputs"
        },
        "PipelineId": {
          "Ref": "PipelineId"
        }
      }
    }
  },
  "Outputs": {
    "JobIds": {
      "Description": "The IDs of the jobs.",
      "Value": {
        "Fn::GetAtt": [
          "TranscodeJob",
          "JobIds"
        ]
      }
    }
  }
}