Reputation: 5699
The FFmpeg I am using is fine, because it works if I use AV_CODEC_ID_PCM_U8 and some the other CODEC with avcodec_find_encoder and avcodec_find_decoder.
Anybody knows why the finder coder functions always return NULL with AV_CODEC_ID_OPUS?
Upvotes: 0
Views: 1585
Reputation: 9793
Once your ffmpeg lib has --enable-libopus
you may also use
avcodec_find_decoder_by_name("libopus")
and avcodec_find_encoder_by_name("libopus")
Upvotes: 0
Reputation: 11789
You need to check three things:
fmpeg
compiled with opus decodec? What does ffmpeg -decoders | grep libopus
say?av_register_all
?libopus is not compiled in by default:
ffmpeg-2.1.3> ./configure --help | grep opus
--enable-libopus enable Opus decoding via libopus [no]
so you need to specify --enable-libopus
(and of course have libopus in your toolchain)
Upvotes: 2