123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <?php
- require dirname(__FILE__, 2) . '/vendor/autoload.php';
- $secretId = "SECRETID";
- $secretKey = "SECRETKEY";
- $region = "ap-beijing";
- $cosClient = new Qcloud\Cos\Client(
- array(
- 'region' => $region,
- 'scheme' => 'https',
- 'credentials'=> array(
- 'secretId' => $secretId,
- 'secretKey' => $secretKey)));
- try {
-
- $result = $cosClient->updateMediaVideoEnhanceTemplate(array(
- 'Bucket' => 'examplebucket-125000000',
- 'Key' => '',
- 'Tag' => 'VideoEnhance',
- 'Name' => 'TemplateName',
- 'VideoEnhance' => array(
- 'Transcode' => array(
- 'Container' => array(
- 'Format' => 'mp4',
- ),
- 'Video' => array(
- 'Codec' => 'H.264',
- 'Width' => '1280',
- 'Height' => '920',
- 'Fps' => '30',
- ),
- 'Audio' => array(
- 'Codec' => 'aac',
- 'Samplerate' => '44100',
- 'Bitrate' => '128',
- 'Channels' => '4',
- ),
- ),
- 'SuperResolution' => array(
- 'Resolution' => 'sdtohd',
- 'EnableScaleUp' => 'true',
- 'Version' => 'Enhance',
- ),
- 'SDRtoHDR' => array(
- 'HdrMode' => 'HDR10',
- ),
- 'ColorEnhance' => array(
- 'Contrast' => '50',
- 'Correction' => '100',
- 'Saturation' => '100',
- ),
- 'MsSharpen' => array(
- 'SharpenLevel' => '5',
- ),
- 'FrameEnhance' => array(
- 'FrameDoubling' => 'true',
- ),
- ),
- ));
-
- print_r($result);
- } catch (\Exception $e) {
-
- echo($e);
- }
|