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

更新时间:
复制 MD 格式

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

调试

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

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

ice:AddEditingProjectMaterials

*全部资源

*

请求参数

名称

类型

必填

描述

示例值

ProjectId

string

云剪辑工程 ID

*****b2101cb318c*****

MaterialMaps

string

素材 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

RequestId

string

请求 ID

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

ProjectId

string

云剪辑项目 ID

*****67ae06542b9b93e0d1c387*****

MediaInfos

array<object>

符合要求的媒资集合

array<object>

MediaId

string

媒资 ID

*****5cb2e35433198daae94a72*****

MediaBasicInfo

object

媒资基础信息

MediaId

string

媒资 ID 号

*****5cb2e35433198daae94a72*****

InputURL

string

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

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

MediaType

string

媒资媒体类型

Video

BusinessType

string

媒资业务类型

general

Source

string

来源

oss

Title

string

标题

default_title_2020-12-23T03:32:59Z

Description

string

内容描述

sample_description

Category

string

分类

audio

MediaTags

string

标签

sample_tag

CoverURL

string

封面地址

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

UserData

string

用户数据

userData

Snapshots

string

截图

null

Status

string

媒资状态

  • Init

  • Preparing

  • PrepareFail

  • Normal

Normal

TranscodeStatus

string

转码状态

Init

CreateTime

string

媒资创建时间

2020-12-23T03:32:59Z

ModifiedTime

string

媒资修改时间

2020-12-23T03:32:59Z

DeletedTime

string

媒资删除时间

2020-12-23T03:32:59Z

SpriteImages

string

雪碧图

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

FileInfoList

array<object>

FileInfos

array<object>

FileBasicInfo

object

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

FileName

string

文件名

example.mp4

FileStatus

string

文件状态

  • Uploading

  • Normal

  • UploadFail

  • Disable

  • Deleted

Normal

FileType

string

文件类型

source_file

FileSize

string

文件大小(字节)

30611502

FileUrl

string

文件 OSS 地址

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

Region

string

文件存储区域

cn-shanghai

FormatName

string

封装格式

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

Duration

string

时长

216.206667

Bitrate

string

码率

1132.68

Width

string

960

Height

string

540

LiveMaterials

array<object>

直播流关联素材

object

AppName

string

直播播流应用名

testrecord

StreamName

string

直播播流流名

teststream

DomainName

string

直播播流域名

test.alivecdn.com

LiveUrl

string

直播流地址

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

ProjectMaterials

array

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

*****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=&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*****"
  ]
}

错误码

HTTP status code

错误码

错误信息

描述

400 InvalidParameter The specified parameter \ is not valid.
404 ProjectNotFound The specified project not found

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

变更历史

更多信息,参考变更详情