代碼如下,結果.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檔案另存在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,關於這個問題我也會向開發反饋。