ffmpeg avcodec_find_encoder null - register all depreciated

912 Views Asked by At

avcodec_find_encoder(AV_CODEC_ID_H264) is returning null;

other answers say to use av_register_all or avcodec_register_all which are both now deprecated.

i am using ffmpeg:x64-windows 4.2-8 installed via vcpkg

1

There are 1 best solutions below

0
szatmary On BEST ANSWER

avcodec_register_all Is now automatic, you don’t need to call it any more.

If avcodec_find_encoder(AV_CODEC_ID_H264) is returning null, it means libavcodec was not complied with an h264 encoder. You will need to compile libx264 then enable it while compile it ffmpeg.