function weike_pfop() { $auth = new auth(qiniu_access, qiniu_secret); $key = '2-2-1457275914928-wp2pcs使用入门.avi'; // 转码是使用的队列名称 $pipeline = 'weike'; $pfop = new persistentfop($auth, store_bucket, $pipeline); // 要进行转码的转码操作 $fops = avthumb/m3u8/s/640x360/vb/1.25m; // 可以对转码后的文件进行使用saveas参数自定义命名,当然也可以不指定文件会默认命名并保存在当间 $savekey = qiniu\base64_urlsafeencode(video_bucket.':test.m3u8'); $fops = $fops.'|saveas/'.$savekey; list($id, $err) = $pfop->execute($key, $fops); echo \n====> pfop avthumb result: \n; if ($err != null) { var_dump($err); } else { echo persistentfop id: $id\n; }}
回复内容: 代码如下,结果.m3u8文件另存在video_bucket,但是资源切片文件.ts仍旧还在store_bucket,请问怎么解决?
function weike_pfop() { $auth = new auth(qiniu_access, qiniu_secret); $key = '2-2-1457275914928-wp2pcs使用入门.avi'; // 转码是使用的队列名称 $pipeline = 'weike'; $pfop = new persistentfop($auth, store_bucket, $pipeline); // 要进行转码的转码操作 $fops = avthumb/m3u8/s/640x360/vb/1.25m; // 可以对转码后的文件进行使用saveas参数自定义命名,当然也可以不指定文件会默认命名并保存在当间 $savekey = qiniu\base64_urlsafeencode(video_bucket.':test.m3u8'); $fops = $fops.'|saveas/'.$savekey; list($id, $err) = $pfop->execute($key, $fops); echo \n====> pfop avthumb result: \n; if ($err != null) { var_dump($err); } else { echo persistentfop id: $id\n; }}
目前可能只能将m3u8文件另存,建议你将文件都存储在store_bucket,关于这个问题我也会向开发反馈。
