tencent cloud

Feedback

Video Compositing Completion

Last updated: 2022-10-26 17:20:53

    Event Name

    ComposeMediaComplete

    Event Description

    If the application is configured with event notification, after a video is composed, the application backend can get an event notification through "normal callback" or "reliable callback". The content of the event notification is the ComposeMediaTask structure.

    Samples

    Normal callback

    If you choose the normal callback mode, the callback URL will receive an HTTP POST request from VOD, whose content is in the BODY as shown below (the fields with null value are omitted):

    {
      "EventType": "ComposeMediaComplete",
      "ComposeMediaCompleteEvent": {
          "TaskId": "1256768367-ComposeMedia-f5ac8127b3b6b85cdc13f237c6005d8",
          "Status": "FINISH",
          "ErrCode": 0,
          "Message": "SUCCESS",
          "Input": {
              "Tracks": [{
                      "Type": "Video",
                      "TrackItems": [{
                          "Type": "Video",
                          "SourceMedia": "5285485487985271487",
                          "AudioOperations": [{
                              "Type": "Volume",
                              "VolumeParam": {
                                  "Mute": 1
                              }
                          }]
                      }]
                  },
                  {
                      "Type": "Audio",
                      "TrackItems": [{
                              "Type": "Empty",
                              "EmptyItem": {
                                  "Duration": 5
                              }
                          },
                          {
                              "Type": "Audio",
                              "AudioItem": {
                                  "SourceMedia": "5285485487985271488",
                                  "Duration": 15
                              }
                          },
                          {
                              "Type": "Audio",
                              "AudioItem": {
                                  "SourceMedia": "5285485487985271489",
                                  "SourceMediaStartTime": 2,
                                  "Duration": 14
                              }
                          }
                      ]
                  }
              ],
              "Output": {
                  "FileName": "Video composing effect test",
                  "Container": "mp4"
              }
          },
          "Output": {
              "FileType": "mp4",
              "FileId": 5285485487985271490,
              "FileUrl": "http://125676836723.vod2.myqcloud.com/xxx/xxx/xxx.mp4"
          }
      }
    }
    

    Reliable callback

    If you choose the reliable callback mode, after the PullEvents API is called, an HTTP response in the following format will be received (the fields with null value are omitted).

    {
      "Response":{
          "EventSet":[
              {
                  "EventHandle":"EventHandle.N",
                  "ComposeMediaCompleteEvent":{
                      "TaskId":"1256768367-ComposeMedia-f5ac8127b3b6b85cdc13f237c6005d8",
                      "Status":"FINISH",
                      "ErrCode":0,
                      "Message":"SUCCESS",
                      "Input":{
                          "Tracks":[
                              {
                                  "Type":"Video",
                                  "TrackItems":[
                                      {
                                          "Type":"Video",
                                          "SourceMedia":"5285485487985271487",
                                          "AudioOperations":[
                                              {
                                                  "Type":"Volume",
                                                  "VolumeParam":{
                                                      "Mute":1
                                                  }
                                              }
                                          ]
                                      }
                                  ]
                              },
                              {
                                  "Type":"Audio",
                                  "TrackItems":[
                                      {
                                          "Type":"Empty",
                                          "EmptyItem":{
                                              "Duration":5
                                          }
                                      },
                                      {
                                          "Type":"Audio",
                                          "AudioItem":{
                                              "SourceMedia":"5285485487985271488",
                                              "Duration":15
                                          }
                                      },
                                      {
                                          "Type":"Audio",
                                          "AudioItem":{
                                              "SourceMedia":"5285485487985271489",
                                              "SourceMediaStartTime":2,
                                              "Duration":14
                                          }
                                      }
                                  ]
                              }
                          ],
                          "Output":{
                              "FileName":"Video composing effect test",
                              "Container":"mp4"
                          }
                      },
                      "Output":{
                          "FileType":"mp4",
                          "FileId":5285485487985271490,
                          "FileUrl":"http://125676836723.vod2.myqcloud.com/xxx/xxx/xxx.mp4"
                      }
                  }
              }
          ],
          "RequestId":"335bdaa3-db0e-46ce-9946-51941d9cb0f5"
      }
    }
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support