Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
avcodec_find_encoder(AV_CODEC_ID_H264) 返回空值;
其他答案说使用 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 时启用它。