All Products
Search
Document Center

ApsaraVideo VOD:ProduceEditingProjectVideo

Last Updated:Dec 14, 2022

Produces a video from one or more mezzanine files. You can directly submit mezzanine files by specifying the Timeline parameter. Alternatively, you can submit mezzanine files after you create an online editing project.

Operation Description

  • This operation returns only the submission result of a video production task. When the submission result is returned, video production may still be in progress. After a video production task is submitted, the task is queued in the background for asynchronous processing.
  • The mezzanine files that are referenced in the timeline of an online editing project can be materials from media assets or videos in the media library.
  • Videos are produced based on the ProjectId and Timeline parameters. Take note of the following items when you specify the parameters:
  • You must specify at least one of the ProjectId and Timeline parameters. Otherwise, video production fails.
  • If you specify only the Timeline parameter, the system automatically creates an online editing project with the specified timeline. Then, the system obtains the mezzanine files that are referenced in the timeline and produces a video from the mezzanine files.
  • If you specify only the ProjectId parameter, the system obtains the latest timeline of the specified project and produces a video based on the timeline.
  • If you specify both the ProjectId and Timeline parameters, the system produces a video based on the specified timeline and updates the timeline and mezzanine files for the specified online editing project. If you specify other parameters, the system also updates related settings for the online editing project.
  • You can apply effects to the video to be produced. For more information, see Special effects.

Authorization information

The following table is the authorization information corresponding to the API, which can be found in the RAM permission policy statement.Action Used in the element to grant the RAM user or RAM role permission to call this API. The specific instructions are as follows:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All resources is used in the Resource type column of the operation.
  • Condition keyword: refers to the condition keyword defined by the cloud product itself.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operateaccess levelResource typeconditional keywordAssociation operation
vod:ProduceEditingProjectVideoRead
  • VOD
    acs:vod:*:{#accountId}:*/*
    without
without

Request parameters

ParameterTypeRequiredDescriptionExample
ProjectIdstringNo

The ID of the online editing project.

fb2101bf24b4cb318787dc****
TimelinestringNo

The timeline of the online editing project, in JSON format. For more information about the structure, see Timeline.

{"VideoTracks":[{"VideoTrackClips":[{"MediaId":"cc3308ac59615a54328bc3443****"},{"MediaId":"da87a9cff645cd88bc6d8326e4****"}]}]}
TitlestringNo

The title of the online editing project.

editing project test
DescriptionstringNo

The description of the online editing project.

description test
CoverURLstringNo

The thumbnail URL of the online editing project.

https://example.aliyundoc.com/6AB4D0E1E1C7446888351****.png
MediaMetadatastringNo

The metadata of the produced video, in JSON format. For more information about the structure, see MediaMetadata.

{"Description":"video description","Title":"userData test"}
ProduceConfigstringNo

The configuration of video production, in JSON format. For more information about the structure, see ProduceConfig.

{"TemplateGroupId":"6d11e25ea30a4c465435c74****"}
UserDatastringNo

The custom configuration, such as the callback configuration. The value is a JSON-formatted string. For more information about the structure, see UserData.

NoteTo use the MessageCallback parameter, you must set an HTTP callback URL and select a callback event type in the ApsaraVideo VOD console. Otherwise, the callback configuration does not take effect.
{"Extend":{"width":1280,"id":"028a8e56b1ebf6bb7afc74****","height":720},"MessageCallback":{"CallbackURL":"https://example.aliyundoc.com/2016-08-15/proxy/httpcallback/testcallback/","CallbackType":"http"}}

Response parameters

ParameterTypeDescriptionExample
object

The returned data.

RequestIdstring

The ID of the request.

25818875-5F78-4AF6-D7393642CA58****
MediaIdstring

The ID of the produced video.

Note
  • This operation returns the ID of the produced video in synchronous mode.
  • If this operation returns the MediaId parameter, the video production task is being asynchronously processed.
  • 006204a11bb386bb25491f95f****
    ProjectIdstring

    The ID of the online editing project.

    fb2101bf24b4cb318787dc****
    NoteApsaraVideo VOD sends a FileUploadComplete event notification after video production is complete, which is similar to the action that is performed after video upload. After the produced video is transcoded, ApsaraVideo VOD sends the StreamTranscodeComplete and TranscodeComplete event notifications.

    Example

    Normal return example

    JSONFormat

    {
      "RequestId": "25818875-5F78-4AF6-D7393642CA58****",
      "MediaId": "006204a11bb386bb25491f95f****",
      "ProjectId": "fb2101bf24b4cb318787dc****"
    }

    Error codes

    For a list of error codes, visit the API error center.