All Products
Search
Document Center

ApsaraVideo VOD:ProduceEditingProjectVideo

最終更新日:Dec 19, 2024

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

Operation description

  • Make sure that you understand the billing method and price of ApsaraVideo VOD before you call this operation. You are charged for using the online editing feature. For more information, see Billing .

  • 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 source files that are used in the timeline of an online editing project can be materials directly uploaded to the online project or selected from the media asset library. Only media assets that are in the Normal state can be used in the project.

  • Videos are produced based on ProjectId and Timeline. The following content describes the parameter configurations:

    • You must specify ProjectId or Timeline. If you leave both parameters empty, the video cannot be produced.
    • If you specify Timeline and leave ProjectId empty, the system automatically creates an online editing project based on Timeline and adds the materials specified in the Timeline to the project to produce videos.
    • If you specify ProjectId and leave Timeline empty, the system automatically uses the latest timeline information of the project to produce videos.
    • If you specify both ProjectId and Timeline, the system automatically uses the timeline information that you specified to produce videos and updates the project timeline and materials. You can also specify other parameters to update the corresponding information about the online editing project.
  • You can create up to 100 video tracks, 100 image tracks, and 100 subtitle tracks in a project.

  • The total size of material files cannot exceed 1 TB.

  • The buckets in which the materials reside and where the exported videos are stored must be in the same region as the region where ApsaraVideo VOD is activated.

  • The exported videos must meet the following requirements:

    • The width and height of the video image cannot be less than 128 pixels.
    • The width and height of the video image cannot exceed 4,096 pixels.
    • The width cannot exceed 2,160 pixels.
  • After a video is produced, the video is automatically uploaded to ApsaraVideo VOD. Then, the ProduceMediaComplete and FileUploadComplete event notifications are sent to you. After the produced video is transcoded, the StreamTranscodeComplete and TranscodeComplete event notifications are sent to you.

  • You can add special effects to the video. For more information, see Special effects.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • 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 Key: the condition key that is defined by the cloud service.
  • 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.
OperationAccess levelResource typeCondition keyAssociated operation
vod:ProduceEditingProjectVideocreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ProjectIdstringNo

The ID of the online editing project. You can use one of the following methods to obtain the ID of the online editing project:

  • Log on to the ApsaraVideo VOD console. In the left-side navigation pane, choose Production Center > Video Editing to view the ID of the online editing project.
  • Obtain the value of ProjectId from the response to the AddEditingProject operation.
fb2101bf24b4cb318787dc****
TimelinestringNo

The timeline of the online editing project. The value must be in JSON format. For more information about the parameter 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 video metadata. The value must be in JSON format. For more information about the parameter structure, see MediaMetadata .

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

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

Note StorageLocation is required if you produce videos in a region other than China (Shanghai).
{"TemplateGroupId":"6d11e25ea30a4c465435c74****"}
UserDatastringNo

The custom configurations, such as the callback configuration. The value must be a JSON string. For more information about the parameter structure, see UserData .

Note The callback configurations take effect only after you specify an HTTP URL for receiving callback notifications and select the event types in the ApsaraVideo VOD console.
{"Extend":{"width":1280,"id":"028a8e56b1ebf6bb7afc74****","height":720},"MessageCallback":{"CallbackURL":"https://example.aliyundoc.com/2016-08-15/proxy/httpcallback/testcallback/","CallbackType":"http"}}
AppIdstringNo

The ID of the application. Default value: app-1000000. For more information, see Multi-application service.

app-****

Response parameters

ParameterTypeDescriptionExample
object

The returned result.

RequestIdstring

The ID of the request.

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

The ID of the produced video.

Note
  • This parameter is returned for each request.
  • If a value is returned for this parameter, the video production task is being asynchronously processed.
  • 006204a11bb386bb25491f95f****
    ProjectIdstring

    The ID of the online editing project.

    fb2101bf24b4cb318787dc****
    Note ApsaraVideo 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.

    Examples

    Sample success responses

    JSONformat

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

    Error codes

    For a list of error codes, visit the Service error codes.

    Change history

    Change timeSummary of changesOperation
    2023-11-02The request parameters of the API has changedView Change Details