tencent cloud

Cloud Infinite

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Product Overview
Product Strengths
Use Cases
Feature Overview
Regions and Domains
Specifications and Limits
Billing
Billing Overview
Billing Mode
Billable Items
Free Tier
Payment Overdue
Viewing Bill Details
FAQs
Getting Started
Registering and Logging In
Bind Bucket
Uploading and Processing File
Downloading and Deleting Images
Unbinding Buckets
Using CI via COS
Features
Image Processing
Media Processing
Content Moderation
AI Content Recognition
File Processing
Smart Voice
File processing
User Guide
Overview
Bucket Management
Smart Toolbox
Job and Workflow
Data Monitoring
Usage statistics
Use Cases
Copyright Protection Solutions
Image Processing Practices
Working with API Authorization Policies
Workflow Practices
API Documentation
API Overview
Structure
Common Request Headers
Common Response Headers
Activate Vast Service
Image Processing
AI-Based Content Recognition
Smart Audio
Media Processing
Content Moderation
Document Processing
File Processing
Job and Workflow
Cloud Virus Detection
Error Codes
Request Signature
SDK Documentation
SDK Overview
Android SDK
iOS SDK
COS Android SDK
C SDK
C++ SDK
.NET(C#) SDK
Go SDK
COS iOS SDK
Java SDK
JavaScript SDK
Node.js SDK
PHP SDK
Python SDK
Mini Program SDK
Personal Information Protection Policy for SDK
Security and Compliance
Permission ‍Management
FAQs
Basic Settings
Document Processing
Media Processing
Content Recognition
Smart Audio
Agreements
Service Level Agreement
Contact Us
Glossary

Video Montage Job APIs

PDF
フォーカスモード
フォントサイズ
最終更新日: 2024-03-01 14:43:58

Overview

This document provides an overview of APIs and SDK code samples for submitting a montage job.
API
Description
Submits a video montage job.

Submitting Video Montage Job

Feature description

This API is used to submit a montage job.

Method prototype

public Guzzle\\Service\\Resource\\Model createMediaVideoMontageJobs(array $args = array());

Sample request

Sample 1. Using a template

<?php

require dirname(__FILE__) . '/../vendor/autoload.php';

$secretId = "SECRETID"; //Replace it with the actual `SecretId`, which can be viewed and managed in the CAM console at https://console.tencentcloud.com/cam/capi
$secretKey = "SECRETKEY"; //Replace it with the actual `SecretKey`, which can be viewed and managed in the CAM console at https://console.tencentcloud.com/cam/capi
$region = "ap-beijing"; // Replace it with the actual region, which can be viewed in the console at https://console.tencentcloud.com/cos5/bucket.
$cosClient = new Qcloud\\Cos\\Client(
array(
'region' => $region,
'schema' => 'https', // Protocol, which is `http` by default
'credentials'=> array(
'secretId' => $secretId ,
'secretKey' => $secretKey)));
try {
$result = $cosClient->createMediaVideoMontageJobs(array(
'Bucket' => 'examplebucket-1250000000', // Bucket name in the format of `BucketName-Appid`, which can be viewed in the COS console at https://console.tencentcloud.com/cos5/bucket.
'Tag' => 'VideoMontage',
'QueueId' => 'p81e648af2aeexxxxxxxxxxxxxxxxxxx',
'Input' => array(
'Object' => 'video01.mp4'
),
'Operation' => array(
'TemplateId' => 't1fcc3770199e04737axxxxxxxxxxxxxx',
'Output' => array(
'Region' => $region,
'Bucket' => 'examplebucket-1250000000', // Bucket name in the format of `BucketName-Appid`, which can be viewed in the COS console at https://console.tencentcloud.com/cos5/bucket.
'Object' => 'VideoMontage.mp4',
),
// 'UserData' => 'xxx', // The user information passed through.
// 'JobLevel' => '0', // Job priority. The greater the value, the higher the priority. Valid values: `0`, `1`, `2`. Default value: `0`.
),
'CallBack' => '',
));
// Request succeeded
print_r($result);
} catch (\\Exception $e) {
// Request failed
echo($e);
}

Sample 2. Customizing parameters

<?php

require dirname(__FILE__) . '/../vendor/autoload.php';

$secretId = "SECRETID"; //Replace it with the actual `SecretId`, which can be viewed and managed in the CAM console at https://console.tencentcloud.com/cam/capi
$secretKey = "SECRETKEY"; //Replace it with the actual `SecretKey`, which can be viewed and managed in the CAM console at https://console.tencentcloud.com/cam/capi
$region = "ap-beijing"; // Replace it with the actual region, which can be viewed in the console at https://console.tencentcloud.com/cos5/bucket.
$cosClient = new Qcloud\\Cos\\Client(
array(
'region' => $region,
'schema' => 'https', // Protocol, which is `http` by default
'credentials'=> array(
'secretId' => $secretId ,
'secretKey' => $secretKey)));
try {
$result = $cosClient->createMediaVideoMontageJobs(array(
'Bucket' => 'examplebucket-1250000000', // Bucket name in the format of `BucketName-Appid`, which can be viewed in the COS console at https://console.tencentcloud.com/cos5/bucket.
'Tag' => 'VideoMontage',
'QueueId' => 'p81e648af2aeexxxxxxxxxxxxxxxxxxx',
'Input' => array(
'Object' => 'video01.mp4'
),
'Operation' => array(
'VideoMontage' => array(
'Duration' => '',
'Container' => array(
'Format' => '',
),
'Video' => array(
'Codec' => '',
'Width' => '',
'Height' => '',
'Fps' => '',
'Bitrate' => '',
'Crf' => '',
),
'Audio' => array(
'Codec' => '',
'Samplerate' => '',
'Bitrate' => '',
'Channels' => '',
'Remove' => '',
),
),
'Output' => array(
'Region' => $region,
'Bucket' => 'examplebucket-1250000000', // Bucket name in the format of `BucketName-Appid`, which can be viewed in the COS console at https://console.tencentcloud.com/cos5/bucket.
'Object' => 'VideoMontage.mp4',
),
// 'UserData' => 'xxx', // The user information passed through.
// 'JobLevel' => '0', // Job priority. The greater the value, the higher the priority. Valid values: `0`, `1`, `2`. Default value: `0`.
),
'CallBack' => '',
));
// Request succeeded
print_r($result);
} catch (\\Exception $e) {
// Request failed
echo($e);
}


Parameter description

Request has the following sub-nodes:
Node Name (Keyword)
Parent Node
Description
Type
Required
Tag
Request
Job tag: VideoMontage
String
Yes
Input
Request
Information of the media file to be processed
Container
Yes
Operation
Request
Operation rule
Container
Yes
QueueId
Request
Queue ID of the job
String
Yes
CallBackFormat
Request
Job callback format, which can be JSON or XML (default value). It takes priority over that of the queue.
String
No
CallBackType
Request
Job callback type, which can be Url (default value) or TDMQ. It takes priority over that of the queue.
String
No
CallBack
Request
Job callback address, which takes priority over that of the queue. If it is set to no, no callbacks will be generated at the callback address of the queue.
String
No
CallBackMqConfig
Request
TDMQ configuration for job callback as described in Structure, which is required if CallBackType is TDMQ.
Container
No
Input has the following sub-nodes:
Node Name (Keyword)
Parent Node
Description
Type
Required
Object
Request.Input
Media filename
String
Yes
Operation has the following sub-nodes:
Node Name (Keyword)
Parent Node
Description
Type
Required
VideoMontage
Request.Operation
Video montage template parameter
Container
No
TemplateId
Request.Operation
Template ID
String
No
Output
Request.Operation
Result output address
Container
Yes
UserData
Request.Operation
The user information passed through, which is printable ASCII codes of up to 1,024 in length.
String
No
JobLevel
Request.Operation
Job priority. The greater the value, the higher the priority. Valid values: 0, 1, 2. Default value: 0.
String
No
Note:
TemplateId is used first. If TemplateId is unavailable, VideoMontage is used.
VideoMontage has the following sub-nodes:
Node Name (Keyword)
Parent Node
Description
Type
Required
TimeInterval
Request.Operation.Transcode
Same as Request.TimeInterval in the transcoding template creation API CreateMediaTemplate.
Container
No
Container
Request.Operation.Transcode
Same as Request.Container in the transcoding template creation API CreateMediaTemplate.
Container
No
Video
Request.Operation.Transcode
Same as Request.Video in the transcoding template creation API CreateMediaTemplate.
Container
No
Audio
Request.Operation.Transcode
Same as Request.Audio in the transcoding template creation API CreateMediaTemplate.
Container
No
TransConfig
Request.Operation.Transcode
Same as Request.TransConfig in the transcoding template creation API CreateMediaTemplate.
Container
No
AudioMix
Request.Operation.Transcode
Audio mix parameter as described in Structure.
Container array
No
Output has the following sub-nodes:
Node Name (Keyword)
Parent Node
Description
Type
Required
Region
Request.Operation.Output
Bucket region
String
Yes
Bucket
Request.Operation.Output
Result storage bucket
String
Yes
Object
Request.Operation.Output
Result file name
String
Yes

Sample response

GuzzleHttp\\Command\\Result Object
(
[Body] => GuzzleHttp\\Psr7\\Stream Object
(
[stream:GuzzleHttp\\Psr7\\Stream:private] => Resource id #88
[size:GuzzleHttp\\Psr7\\Stream:private] =>
[seekable:GuzzleHttp\\Psr7\\Stream:private] => 1
[readable:GuzzleHttp\\Psr7\\Stream:private] => 1
[writable:GuzzleHttp\\Psr7\\Stream:private] => 1
[uri:GuzzleHttp\\Psr7\\Stream:private] => php://temp
[customMetadata:GuzzleHttp\\Psr7\\Stream:private] => Array
(
)

)

[RequestId] => NjI2MjIxNDVfHAUOSDHAOIHDOIyMmZkOTQ=
[ContentType] => application/xml
[ContentLength] => 803
[Bucket] => examplebucket-1250000000
[Location] => examplebucket-1250000000.ci.ap-beijing.myqcloud.com/jobs
[Response] => Array
(
[JobsDetail] => Array
(
[Code] => Success
[CreationTime] => 2022-04-22T11:30:13+0800
[EndTime] => -
[Input] => Array
(
[BucketId] => examplebucket-1250000000
[Object] => video01.mp4
[Region] => ap-beijing
)

[JobId] => j85803a96zx7c98z7xc987z9c6eb232
[Message] =>
[Operation] => Array
(
[Output] => Array
(
[Bucket] => examplebucket-1250000000
[Object] => VideoMontage.mp4
[Region] => ap-beijing
)

[TemplateId] => t1fcc3770199e0zx7cz897c9zxc9b
[TemplateName] => video-montage-1
[UserData] => xxx
[JobLevel] => 0
)

[QueueId] => p81e648af2aezx7c9z7xc98zx7c98e086
[StartTime] => -
[State] => Submitted
[Tag] => VideoMontage
)

)

)

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック