All Products
Search
Document Center

ApsaraVideo Media Processing:UpdateMedia

Last Updated:Dec 26, 2024

Updates the basic information about a media file.

Operation description

The basic information that you can update by calling this operation includes the title, description, and category of a media file. This operation applies to a full update. You must set all the parameters unless you want to replace the value of a specific parameter with a NULL value.

QPS limit

You can call this operation up to 100 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limit.

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
mts:UpdateMediaupdate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
MediaIdstringYes

The ID of the media file whose basic information you want to update. To obtain the ID of the media file, you can log on to the ApsaraVideo Media Processing (MPS) console and choose Media Management > Media List in the left-side navigation pane.

3e1cd21131a94525be55acf65888****
TitlestringNo

The title of the media file. Multiple character types, such as letters and digits, are supported.

  • If you do not specify this parameter, the value is NULL.
  • The value is encoded in UTF-8 and can be up to 128 bytes in length.
hello
DescriptionstringNo

The description of the media file. Multiple character types, such as letters and digits, are supported.

  • If you do not specify this parameter, the value is NULL.
  • The value is encoded in UTF-8 and can be up to 1,024 bytes in length.
example description
CoverURLstringNo

The URL of the thumbnail. This parameter is used to specify the storage location of the thumbnail. To obtain the URL, you can log on to the MPS console and choose Workflows > Media Buckets in the left-side navigation pane. Alternatively, you can log on to the OSS console and click Buckets in the left-side navigation pane.

  • The value can be up to 3,200 bytes in length.
  • The URL complies with RFC 2396 and is encoded in UTF-8, with reserved characters being percent-encoded. For more information, see URL encoding.
http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com/test****.jpg
CateIdlongNo

The ID of the category to which the media file belongs. The value must be an integer.

  • If you do not specify this parameter, the value is NULL.
  • The value cannot be negative.
1
TagsstringNo

The tags that you want to add to the media file.

  • You can specify up to 16 tags for a media file. Separate multiple tags with commas (,).
  • Each tag can be up to 32 bytes in length.
  • The value is encoded in UTF-8.
tag1,tag2

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The ID of the request.

6A88246F-C91F-42BD-BABE-DB0DF993F960
Mediaobject

The information about the media file.

CreationTimestring

The time when the media file was created.

2016-09-14T08:30:33Z
CateIdlong

The ID of the category to which the media file belongs.

1
Heightstring

The height of the media file.

1080
CensorStatestring

The review state of the media file. Valid values:

  • Initiated: The media file is uploaded but not reviewed.
  • Pass: The media file is uploaded and passes the review.
Initiated
Tagsarray

The information about the tags.

Tagstring

The tags that you want to add to the media file.

tag1,tag2
Bitratestring

The bitrate of the media file.

2659.326
MediaIdstring

The ID of the media file.

3e1cd21131a94525be55acf65888****
Fileobject

The information about the input file.

Statestring

The state of the input file. Valid values:

  • Normal: The input file is normal.
  • Deleted: The input file is deleted.
Normal
URLstring

The name of the OSS bucket in which the input media file is stored.

http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4
PublishStatestring

The publishing state of the media file. Valid values:

  • Initiated: The media file is in the initial state.
  • UnPublish: The media file has not been published, and the playback permission on the OSS object is Private.
  • Published: The media file has been published, and the playback permission on the OSS object is Default.
  • Deleted: The media file is deleted.
Published
Descriptionstring

The description of the media file.

example description
Widthstring

The width of the media file.

1920
Sizestring

The size of the media file.

2647692
CoverURLstring

The URL of the thumbnail.

http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/example-****.jpg
RunIdListarray

The IDs of the media workflow execution instances.

RunIdstring

The IDs of the media workflow execution instances.

{"RunId":["47b42486019c4f688bf144c1a6ba****"]}
Durationstring

The duration of the media file.

7.965000
Fpsstring

The frame rate of the media file.

25.0
Titlestring

The title of the media file.

hello
Formatstring

The format of the media file. Valid values: mov, mp4, m4a, 3gp, 3g2, and mj2.

mov

Examples

Sample success responses

JSONformat

{
  "RequestId": "6A88246F-C91F-42BD-BABE-DB0DF993F960",
  "Media": {
    "CreationTime": "2016-09-14T08:30:33Z",
    "CateId": 1,
    "Height": "1080",
    "CensorState": "Initiated",
    "Tags": {
      "Tag": [
        "tag1,tag2"
      ]
    },
    "Bitrate": "2659.326",
    "MediaId": "3e1cd21131a94525be55acf65888****",
    "File": {
      "State": "Normal",
      "URL": "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4"
    },
    "PublishState": "Published",
    "Description": "example description",
    "Width": "1920",
    "Size": "2647692",
    "CoverURL": "http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/example-****.jpg",
    "RunIdList": {
      "RunId": [
        "{\"RunId\":[\"47b42486019c4f688bf144c1a6ba****\"]}"
      ]
    },
    "Duration": "7.965000",
    "Fps": "25.0",
    "Title": "hello",
    "Format": "mov"
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
No change history