全部產品
Search
文件中心

Intelligent Media Services:AddEditingProjectMaterials - 增加剪輯工程關聯素材

更新時間:Mar 21, 2026

將一個或多個素材添加到剪輯工程中。

調試

您可以在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

媒資 識別碼

*****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

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情