gpt4 book ai didi

c++ - FFmpeg编译opus错误

转载 作者:行者123 更新时间:2023-11-28 00:13:15 27 4
gpt4 key购买 nike

我正在按照本教程使用 Microsoft 的编译器静态构建 FFmpeg(不需要 DLL):http://cristobaldobranco.github.io/blog/2015/01/20/compiling-ffmpeg-with-windows-tools/

然而,我在尝试编译时遇到了麻烦:

#pragma comment (lib, "libavformat.a")
#define __STDC_CONSTANT_MACROS

extern "C" {
#include <libavformat/avformat.h>
}

int main() {
av_register_all();
return 0;
}

它似乎能够找到头文件和库文件,但我收到关于 opus 的奇怪错误:

Opus error

这是我的 MSYS 命令:

cd C:/Libs/ffmpeg
./configure --toolchain=msvc --arch=x86 --prefix=build/ --disable-network
make
make install

如何消除这些错误?

最佳答案

Opus 使用了一些重采样功能,因此在链接 libavcodec.a(在 libavformat.a 中使用)时需要链接 libswresample.a。

关于c++ - FFmpeg编译opus错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31909032/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com