[FFmpeg-user] Specifying a codec by name

Moritz Barsnick barsnick at gmx.net
Tue Mar 15 12:27:48 CET 2016


On Tue, Mar 15, 2016 at 15:18:22 +0530, Sreenath BH wrote:
> We want to use the same ffmpeg libraries to load either the nvidia or
> the libx264 codec in our program.

For the use of the libraries, please refer to the libav-user list:

> However, the function avcodec_open2 takes the codec ID as the argument.
> How do I specify the codec to be used by its name, instead of the codec ID?

Well, if I read the documentation of that function, it clearly says:

"The functions avcodec_find_decoder_by_name(),
avcodec_find_encoder_by_name(), avcodec_find_decoder() and
avcodec_find_encoder() provide an easy way for retrieving a codec."

I know nothing more than that, sorry. :-)


More information about the ffmpeg-user mailing list