AddEditingProjectMaterials - 增加剪辑工程关联素材

将一个或多个素材添加到剪辑工程中。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
ProjectIdstring

云剪辑工程ID

*****b2101cb318c*****
MaterialMapsstring

素材ID,多个素材以逗号(,)分隔;每种类型最多支持10个素材ID

  • "video": 视频
  • "audio": 音频
  • "image": 图片
  • "liveStream": 直播流
  • "editingProject": 剪辑工程
{"video":"*****2e057304fcd9b145c5cafc*****", "image":"****8021a8d493da643c8acd98*****,*****cb6307a4edea614d8b3f3c*****", "liveStream": "[{\"appName\":\"testrecord\",\"domainName\":\"test.alivecdn.com\",\"liveUrl\":\"rtmp://test.alivecdn.com/testrecord/teststream\",\"streamName\":\"teststream\"}]", "editingProject": "*****9b145c5cafc2e057304fcd*****"}

返回参数

名称类型描述示例值
object

Schema of Response

RequestIdstring

请求ID

*****ACB-44F2-5F2D-88D7-1283E70*****
ProjectIdstring

云剪辑项目ID

*****67ae06542b9b93e0d1c387*****
MediaInfosarray

符合要求的媒资集合

object
MediaIdstring

媒资ID

*****5cb2e35433198daae94a72*****
MediaBasicInfoobject

媒资基础信息

MediaIdstring

媒资ID号

*****5cb2e35433198daae94a72*****
InputURLstring

待注册的媒资在相应系统中的地址

http://bucket.oss-cn-shanghai.aliyuncs.com/file.mp4
MediaTypestring

媒资媒体类型

Video
BusinessTypestring

媒资业务类型

general
Sourcestring

来源

oss
Titlestring

标题

default_title_2020-12-23T03:32:59Z
Descriptionstring

内容描述

sample_description
Categorystring

分类

audio
MediaTagsstring

标签

sample_tag
CoverURLstring

封面地址

http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.png?Expires=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>
UserDatastring

用户数据

userData
Snapshotsstring

截图

null
Statusstring

媒资状态

-Init

-Preparing

-PrepareFail

-Normal

Normal
TranscodeStatusstring

转码状态

Init
CreateTimestring

媒资创建时间

2020-12-23T03:32:59Z
ModifiedTimestring

媒资修改时间

2020-12-23T03:32:59Z
DeletedTimestring

媒资删除时间

2020-12-23T03:32:59Z
SpriteImagesstring

雪碧图

http://outin-example.oss-cn-shanghai.aliyuncs.com/test.png?Expires=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>
FileInfoListarray

FileInfos

object
FileBasicInfoobject

文件基础信息,包含时长,大小等

FileNamestring

文件名

example.mp4
FileStatusstring

文件状态

-Uploading

-Normal

-UploadFail

-Disable

-Deleted

Normal
FileTypestring

文件类型

source_file
FileSizestring

文件大小(字节)

30611502
FileUrlstring

文件OSS地址

http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4?Expires=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>
Regionstring

文件存储区域

cn-shanghai
FormatNamestring

封装格式

mov,mp4,m4a,3gp,3g2,mj2
Durationstring

时长

216.206667
Bitratestring

码率

1132.68
Widthstring

960
Heightstring

540
LiveMaterialsarray

直播流关联素材

object
AppNamestring

直播播流应用名

testrecord
StreamNamestring

直播播流流名

teststream
DomainNamestring

直播播流域名

test.alivecdn.com
LiveUrlstring

直播流地址

rtmp://test.alivecdn.com/testrecord/teststream
ProjectMaterialsarray

剪辑工程关联素材。直播工程在直播结束后会关联到一个普通剪辑工程

*****9b145c5cafc2e057304fcd*****
string

直播剪辑工程关联的普通剪辑工程ID

*****c38767ae06542b9b93e0d1*****

示例

正常返回示例

JSON格式

{
  "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=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>",
        "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=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>"
      },
      "FileInfoList": [
        {
          "FileBasicInfo": {
            "FileName": "example.mp4",
            "FileStatus": "Normal",
            "FileType": "source_file",
            "FileSize": "30611502",
            "FileUrl": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4?Expires=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>",
            "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": "*****9b145c5cafc2e057304fcd*****"
}

错误码

Http code错误码错误信息
400InvalidParameterThe specified parameter \ is not valid.
404ProjectNotFoundThe specified project not found

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2021-03-31OpenAPI 错误码发生变更、 OpenAPI 返回结构发生变更
变更项变更内容
错误码OpenAPI 错误码发生变更
    删除错误码:400
    删除错误码:404
出参OpenAPI 返回结构发生变更
阿里云首页 智能媒体生产 相关技术圈