[FFmpeg-user] Specifying a codec by name

Sreenath BH bhsreenath at gmail.com
Tue Mar 15 10:48:22 CET 2016

Hi All,

We have built ffmpeg with both nvidia codec and libx264. They both
have the same codec ID of
AV_CODEC_ID_H264, but have different names, nvenc_h264 and libx264.

We want to use the same ffmpeg libraries to load either the nvidia or
the libx264 codec in our program.

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?


More information about the ffmpeg-user mailing list