0

I have been coding with PHP for a while now and have used things like FFMPEG on Windows XAMPP without any problems. Now however i have been trying to run the FFMPEG commandline on my Godaddy hosting account with PHP as i wanted to make a web based project but cannot get it working.

On windows with ffmpeg.exe and sound.wav in the same directory this works:

WavToMP3.php

<?php

exec("ffmpeg.exe -i sound.wav -ar 44100 -ac 2 -c:a libmp3lame -b:a 320k sound.mp3");

?>

Yet it does not run on Godaddy, i know they use linux though so i tried this:

http://download1.rpmfusion.org/free/fedora/releases/25/Everything/x86_64/os/repoview/ffmpeg-compat.html

I downloaded:

http://download1.rpmfusion.org/free/fedora/releases/25/Everything/x86_64/os/Packages/f/ffmpeg-compat-0.6.7-9.fc25.i686.rpm

Then in the script i changed "ffmpeg.exe" to just "ffmpeg" but it still did not work.

I have no idea about running linux commandlines as i have only ever used Windows in the past.

What are the instructions needed that can get the above PHP code or a modified version to generate a .mp3 file using my Godaddy hosting account?

zeddex
  • 1,260
  • 5
  • 21
  • 38
  • 2
    It seems perfectly plausible that Godaddy would not have ffmpeg installed. – lonesomeday Dec 20 '16 at 14:45
  • You need to install ffmpeg on the server. Depending on the setup you may have to specify full path to ffmpeg binary. Something like `/usr/local/bin/ffmpeg`. But you should worry about that after you install ffmpeg on the server. – Dexa Dec 20 '16 at 14:46
  • Thanks, how would you install it on the server though? I did look for a linux command prompt in the cpanel but could not find one. – zeddex Dec 20 '16 at 14:54
  • 1
    To see if ffmpeg is on the box create a script to output the location of ffmpeg if it is installed: `` . If you get no output then it is not installed (or you do not have access to it ). – Christopher Brunsdon Dec 20 '16 at 15:02
  • It seems there is none installed. Can you manually install it or is that something godaddy would not allow? – zeddex Dec 20 '16 at 15:09
  • Open a ticket with godaddy and ask them directly, there customer support is really good and should be able to either get that installed or tell you why you cant have it on their server. Worse comes to worst you'll have to move provider but make sure to ask what services they offer before buying! – Kenziiee Flavius Dec 20 '16 at 15:11
  • Well i ended up posting on the forum, i did look to open a ticket but it seems they no longer offer that: https://wptavern.com/godaddy-removes-ticketing-and-email-support-in-favor-of-phone-and-live-chat – zeddex Dec 20 '16 at 22:09

0 Answers0