Problem is, I am trying to convert (through php), a .3gp (or any video format) file to ogg.
When I do not specify -vcodec and -acodec, the video is converted, but does not have any audio.
I had read here and other places that I need to specify -acodec libvorbis, however, when I specify the codec as libvorbis, the conversion fails: video converts to 0byte file.
Basically, I am trying to determine if the codec specified is actually part of the ffmpeg build I am using as a process of narrowing down my issue.
Code that produces full length video without sound:
$srcFile = 'anyvideo.3gp';
$destFile = 'anyvideo.ogg';
$ffmpegPath = 'path/to/ffmpeg.exe';
$ffmpegObj = new ffmpeg_movie($srcFile);
$srcWidth = makeMultipleTwo($ffmpegObj->getFrameWidth());
$srcHeight = makeMultipleTwo($ffmpegObj->getFrameHeight());
$srcFPS = $ffmpegObj->getFrameRate();
$srcAB = intval($ffmpegObj->getAudioBitRate()/1000);
$srcAR = $ffmpegObj->getAudioSampleRate();
$srcLen = $ffmpegObj->getDuration();
exec($ffmpegPath." -i ".$srcFile." -ar ".$srcAR." -s ".$srcWidth."x".$srcHeight." ". $destFile);
And the code that produces 0byte file:
exec($ffmpegPath." -i ".$srcFile." -acodec libvorbis -ar ".$srcAR." -s ".$srcWidth."x".$srcHeight." ".$destFile);
So, my question is, how do I determine the codec's available to ffmpeg using PHP? Can it even be done?
UPDATED - ANSWER BELOW