api
api copied to clipboard
mp3 to wav API creates alway 13MB files
Hello, I'm using the sound_convert API but whaterver I pass to the API, it only creates files with size of 13MB (they are truncated). I've tried with many files to get Wav from mp3 or WMA from mp3. There's no difference on the file output, always around 13MB. I've tried to save the file on the server itself or locally on my computer, even if the operation is "succesful" the file is not complete. Is there any limitation applied to the file size? However uncompressed files are usaually more bigger than 13MB. This is the Curl code I'm using:
$link = 'http://api.rest7.com/v1/sound_convert.php?url=http://' . urlencode($file_MP3) . '&format=wav';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $link);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$json_wav = json_decode(curl_exec($ch));
curl_close($ch);
if ($json_wav->success == 1) {
$wave = file_get_contents($json_wav->file);
file_put_contents($dir_WAV . str_pad($tr, 2, '0', STR_PAD_LEFT) . ' ' . $song->title . '.wav', $wave);
}
*/
} else {
if ($status == '404') echo 'File' . $file_MP3 . ' Not Found';
}
}