dimanche 17 mai 2020

How to specify a output folder for ffmpeg

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?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire