七牛轉碼為m3u8格式,saveas後資源並沒有另存?

來源:互聯網
上載者:User
代碼如下,結果.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,關於這個問題我也會向開發反饋。

  • 相關文章

    聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.