0

I wonder if there is any way to convert the caf files to mp3 files using any api or any other methods for my web application built on php. I don't know this is possible in php or not.

I know i can use pacpl input.caf -to mp3 on my server to make it work but i have shared hosting and i would like to know if there is a way to do it.

Nirmal Ram
  • 1,722
  • 4
  • 25
  • 45

1 Answers1

0

If pacpl input.caf -to mp3 works at bash, why not call it from PHP like so:

shell_exec("pacpl input.caf -to mp3");

You may or may not need to reconfigure the permissions or use sudo in there depending on the host server config.

Phillip Berger
  • 2,317
  • 1
  • 11
  • 30
  • Yes i know that but for that i need to install pacpl on my server and that is not permitted. That's why i am searching for an api which can do this. – Nirmal Ram Mar 09 '13 at 01:59
  • Where is the shared hosting? – Phillip Berger Mar 09 '13 at 02:00
  • I tried this command on my ec2 and it gives me error: Perl Audio Converter - 4.0.5 Converting: [20130623125823.caf] -> [mp3] decode failed with exit status: 256 Total files converted: 0, failed: 1 – Dipak Mishra Jun 25 '13 at 12:09