Adds one or more materials to an online editing project.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ice:AddEditingProjectMaterials |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectId |
string |
Yes |
The ID of the online editing project. |
*****b2101cb318c***** |
| MaterialMaps |
string |
Yes |
The material ID. Separate multiple material IDs with commas (,). Each type supports up to 10 material IDs. The following material types are supported:
|
{"video":"*****2e057304fcd9b145c5cafc*****", "image":"****8021a8d493da643c8acd98*****,*****cb6307a4edea614d8b3f3c*****", "liveStream": "[{\"appName\":\"testrecord\",\"domainName\":\"test.alivecdn.com\",\"liveUrl\":\"rtmp://test.alivecdn.com/testrecord/teststream\",\"streamName\":\"teststream\"}]", "editingProject": "*****9b145c5cafc2e057304fcd*****"} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
*****ACB-44F2-5F2D-88D7-1283E70***** |
| ProjectId |
string |
The ID of the online editing project. |
*****67ae06542b9b93e0d1c387***** |
| MediaInfos |
array<object> |
The media assets that meet the specified conditions. |
|
|
array<object> |
|||
| MediaId |
string |
The ID of the media asset. |
*****5cb2e35433198daae94a72***** |
| MediaBasicInfo |
object |
The basic information of the media assets. |
|
| MediaId |
string |
The ID of the media asset. |
*****5cb2e35433198daae94a72***** |
| InputURL |
string |
The URL of the media asset in another service. |
http://bucket.oss-cn-shanghai.aliyuncs.com/file.mp4 |
| MediaType |
string |
The type of the media asset. |
Video |
| BusinessType |
string |
The business type of the media asset. |
general |
| Source |
string |
The source of the media asset. |
oss |
| Title |
string |
The title of the media asset. |
default_title_2020-12-23T03:32:59Z |
| Description |
string |
The description of the media asset. |
sample_description |
| Category |
string |
The category of the media asset. |
audio |
| MediaTags |
string |
The tags of the media asset. |
sample_tag |
| CoverURL |
string |
The thumbnail URL of the media asset. |
http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.png?Expires= |
| UserData |
string |
The user data. |
userData |
| Snapshots |
string |
The snapshots of the media asset. |
null |
| Status |
string |
The status of the media asset. Valid values: - Init - Preparing - PrepareFail - Normal |
Normal |
| TranscodeStatus |
string |
The transcoding status of the media asset. |
Init |
| CreateTime |
string |
The time when the media asset was created. |
2020-12-23T03:32:59Z |
| ModifiedTime |
string |
The time when the media asset was last modified. |
2020-12-23T03:32:59Z |
| DeletedTime |
string |
The time when the media asset was deleted. |
2020-12-23T03:32:59Z |
| SpriteImages |
string |
The sprite of the media asset. |
http://outin-example.oss-cn-shanghai.aliyuncs.com/test.png?Expires= |
| FileInfoList |
array<object> |
FileInfos |
|
|
array<object> |
|||
| FileBasicInfo |
object |
The basic information of the file, including the duration and size. |
|
| FileName |
string |
The file name. |
example.mp4 |
| FileStatus |
string |
The file status. -Uploading -Normal -UploadFail -Disable -Deleted |
Normal |
| FileType |
string |
The file type. |
source_file |
| FileSize |
string |
The file size. Unit: bytes. |
30611502 |
| FileUrl |
string |
The Object Storage Service (OSS) URL of the file. |
http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4?Expires= |
| Region |
string |
The region in which the file resides. |
cn-shanghai |
| FormatName |
string |
The container format. |
mov,mp4,m4a,3gp,3g2,mj2 |
| Duration |
string |
The duration. |
216.206667 |
| Bitrate |
string |
The bitrate. |
1132.68 |
| Width |
string |
The width. |
960 |
| Height |
string |
The height. |
540 |
| LiveMaterials |
array<object> |
The materials associated with the live stream. |
|
|
object |
|||
| AppName |
string |
The application name of the live stream. |
testrecord |
| StreamName |
string |
The name of the live stream. |
teststream |
| DomainName |
string |
The domain name of the live stream. |
test.alivecdn.com |
| LiveUrl |
string |
The URL of the live stream. |
rtmp://test.alivecdn.com/testrecord/teststream |
| ProjectMaterials |
array |
The materials associated with the editing project. A live stream editing project will be associated with a regular editing project after the live streaming ends. |
*****9b145c5cafc2e057304fcd***** |
|
string |
The ID of the regular editing project associated with the live stream editing project. |
*****c38767ae06542b9b93e0d1***** |
Examples
Success response
JSON format
{
"RequestId": "*****ACB-44F2-5F2D-88D7-1283E70*****",
"ProjectId": "*****67ae06542b9b93e0d1c387*****",
"MediaInfos": [
{
"MediaId": "*****5cb2e35433198daae94a72*****",
"MediaBasicInfo": {
"MediaId": "*****5cb2e35433198daae94a72*****",
"InputURL": "http://bucket.oss-cn-shanghai.aliyuncs.com/file.mp4",
"MediaType": "Video",
"BusinessType": "general",
"Source": "oss",
"Title": "default_title_2020-12-23T03:32:59Z",
"Description": "sample_description",
"Category": "audio",
"MediaTags": "sample_tag",
"CoverURL": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.png?Expires=&OSSAccessKeyId=&Signature=&security-token=",
"UserData": "userData",
"Snapshots": "null",
"Status": "Normal",
"TranscodeStatus": "Init",
"CreateTime": "2020-12-23T03:32:59Z",
"ModifiedTime": "2020-12-23T03:32:59Z",
"DeletedTime": "2020-12-23T03:32:59Z",
"SpriteImages": "http://outin-example.oss-cn-shanghai.aliyuncs.com/test.png?Expires=&OSSAccessKeyId=&Signature=&security-token="
},
"FileInfoList": [
{
"FileBasicInfo": {
"FileName": "example.mp4",
"FileStatus": "Normal",
"FileType": "source_file",
"FileSize": "30611502",
"FileUrl": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4?Expires=&OSSAccessKeyId=&Signature=&security-token=",
"Region": "cn-shanghai",
"FormatName": "mov,mp4,m4a,3gp,3g2,mj2",
"Duration": "216.206667",
"Bitrate": "1132.68",
"Width": "960",
"Height": "540"
}
}
]
}
],
"LiveMaterials": [
{
"AppName": "testrecord",
"StreamName": "teststream",
"DomainName": "test.alivecdn.com",
"LiveUrl": "rtmp://test.alivecdn.com/testrecord/teststream"
}
],
"ProjectMaterials": [
"*****c38767ae06542b9b93e0d1*****"
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | The specified parameter \ is not valid. | |
| 404 | ProjectNotFound | The specified project not found |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.