php源码av,PHP 使用avconcat拼接视频无效

我想实现不同的视频拼接功能,于是用了avconcat接口,结果execute执行后并没有报错,但是,没效果,我不知道是什么原因,请大神指点下,下附代码:

$auth = new Auth($this->accessKey, $this->secretKey);

$bucket = $this->bucket;

//转码是使用的队列名称。

$pipeline = '';

//$key = time().rand(10000,99999).".mp4";

//$key = $_FILES['videoname']['tmp_name'];

$key = '2.mp4';

//转码完成后通知到你的业务服务器。

$notifyUrl = 'http://375dec79.ngrok.com/notify.php';

$pfop = new PersistentFop($auth, $bucket, $pipeline, $notifyUrl);

$encodedUrl1 = $this->base64_urlSafeEncode('http://ojaa3ua92.bkt.clouddn.com/2.mp4');

$encodedUrl2 = $this->base64_urlSafeEncode('http://ojaa3ua92.bkt.clouddn.com/3.mp4');

$fops = 'avconcat/2/format/mp4/'.$encodedUrl1.'/'.$encodedUrl2;

//可以对转码后的文件进行使用saveas参数自定义命名,当然也可以不指定文件会默认命名并保存在当间。

$fops = $fops.'|saveas/'.$this->base64_urlSafeEncode("xxx:123.mp4");

list($id, $err) = $pfop->execute($key, $fops);

echo "合成结果:";

if ($err != null) {

print_r($err);

} else {

echo "PersistentFop Id: $id\n";

}

返回的结果:合成结果:PersistentFop Id: z0.58749bed45a2650cfdb57c80

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值