PHP code example of videoswitch / alivideoswitch
1. Go to this page and download the library: Download videoswitch/alivideoswitch library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
videoswitch / alivideoswitch example snippets
use common\services\AliyunVideoTranscode\AliyunClient;
$instance=AliyunClient::GetInstance();
$acsClient=$instance->acsClients();
$acsClient->client();
$file='d3ae5eaf2eaf002d2eef71a53247c68a.mp4';
var_dump($acsClient->mp4SwitchManage('submitJobsRequest',$file));//视频转码
var_dump($acsClient->mp3SwitchManage('submitJobsRequest',$file));//音频转码