After you convert an amr recording to an mp3 audio recording, the system prompts that the file is damaged.

Source: Internet
Author: User
{Code ...}
At the beginning, I started to use Qiniu to convert an amr audio file to an mp3 file, using the php sdk. After this program is executed, the 999.mp3 file is generated in the bucket. However, when downloading the file to a local bucket with jplayer, the system prompts that the video cannot be decoded. Open the file directly in the firefox browser and prompt that the file is damaged. Consult experts. The following code is excerpted:
$ Auth = new Auth ($ accessKey, $ secretKey); // the space to be uploaded $ bucket = 'mp3url '; // Convert the executed format $ pfopOps = "avthumb/mp3/AB/64 k/ar/22050"; $ policy = array ('persistentops '=> $ pfopOps, 'persistentpolicyurl' => 'http: // ',); // Generate the upload Token $ token = $ auth-> uploadToken ($ bucket ); // Local path of the file to be uploaded $ filePath = '. /20150504121658533. amr'; // the file name saved after being uploaded to Qiniu $ key = '999.mp3 '; // initialize the UploadManager object and upload the file. $ UploadMgr = new UploadManager (); list ($ ret, $ err) = $ uploadMgr-> putFile ($ token, $ key, $ filePath ); echo "\ n ===> putFile result: \ n"; if ($ err! = Null) {var_dump ($ err);} else {var_dump ($ ret );}

Reply content:
At the beginning, I started to use Qiniu to convert an amr audio file to an mp3 file, using the php sdk. After this program is executed, the 999.mp3 file is generated in the bucket. However, when downloading the file to a local bucket with jplayer, the system prompts that the video cannot be decoded. Open the file directly in the firefox browser and prompt that the file is damaged. Consult experts. The following code is excerpted:
$ Auth = new Auth ($ accessKey, $ secretKey); // the space to be uploaded $ bucket = 'mp3url '; // Convert the executed format $ pfopOps = "avthumb/mp3/AB/64 k/ar/22050"; $ policy = array ('persistentops '=> $ pfopOps, 'persistentpolicyurl' => 'http: // ',); // Generate the upload Token $ token = $ auth-> uploadToken ($ bucket ); // Local path of the file to be uploaded $ filePath = '. /20150504121658533. amr'; // the file name saved after being uploaded to Qiniu $ key = '999.mp3 '; // initialize the UploadManager object and upload the file. $ UploadMgr = new UploadManager (); list ($ ret, $ err) = $ uploadMgr-> putFile ($ token, $ key, $ filePath ); echo "\ n ===> putFile result: \ n"; if ($ err! = Null) {var_dump ($ err);} else {var_dump ($ ret );}

In addition, my amr file is about 5 KB, which is a recording.

Has your problem been solved? I also encountered such a problem. please help me.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.