0

I am using ffmpeg to convert an audio file to .wav format (Rate -16K, 16 bit, Mono). I want to save the converted audio in a folder but I keep getting this error -

Unable to find a suitable output format for

'/var/www/html/myproject/public/audio'
/var/www/html/myproject/public/audio: Invalid argument

Here is my code:

try{
    $audio = "....audio.ogg"
    $output = public_path().'/audio'; //output folder
    exec("ffmpeg -i {$audio} -ab 16 -ar 16000 -ac 1 {$output}");
}catch(Exception $ex){}

Please what am I doing wrong here?

shekwo
  • 1,411
  • 1
  • 20
  • 50

1 Answers1

0

I solved it by unistalling ffmpeg and installing using sudo apt install ffmpeg instead of snap

shekwo
  • 1,411
  • 1
  • 20
  • 50