I'm trying to use FFmpeg to encode files with the iLBC codec, e.g.:
ffmpeg -i audio.wav -ar 8000 -acodec ilbc audio.lbc -y
This worked fine on Windows, however on Mac OS X I'm getting the error Unknown encoder 'ilbc'
.
The official FFmpeg documentation has this to say about libilbc:
Go to https://github.com/dekkers/libilbc and follow the instructions for installing the library. Then pass
--enable-libilbc
to configure to enable it.
I've never compiled a library before so I tried my luck editing the brew recipe, adding these lines where appropriate:
option "with-libilbc", "Enable iLBC library
args << "--enable-libilbc" if build.with? "libilbc"
Then reinstalling ffmpeg with brew install ffmpeg --with-libilbc
. However, that just causes the build to fail and I don't see any message error pertaining to iLBC. My assumption is that the library is simply missing at this point anyway.
Hence my questions:
- How can I compile the libilbc mentioned in the FFmpeg doc for Mac OS X?
- Can I then connect it to brew somehow so as to rebuild ffmpeg with it?
-v
flag fixed that and helped see what the problem was.