Search code examples
ffmpegh.264encoderavcodec

ffmpeg avcodec_find_encoder null - register all depreciated


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


Solution

  • 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.