ffmpeg avcodec_find_encoder null - 注册所有折旧

ffmpeg avcodec_find_encoder null - register all depreciated

avcodec_find_encoder(AV_CODEC_ID_H264) 正在返回 null;

其他答案说使用 av_register_all 或 avcodec_register_all 现在都已弃用。

我正在使用通过 vcpkg 安装的 ffmpeg:x64-windows 4.2-8

avcodec_register_all现在是自动的,你不需要再调用它了。

如果 avcodec_find_encoder(AV_CODEC_ID_H264) 返回 null,这意味着 libavcodec 不符合 h264 编码器。您将需要编译 libx264,然后在编译 ffmpeg 时启用它。