c++ - FFmpeg编译opus错误

标签 c++ compilation ffmpeg

我正在按照本教程使用 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/

相关文章:

c++ - Teensy 的#include <TimeLib.h> 被 Arduino 覆盖了

Java 不会编译我创建的对象

c++ - Eclipse C++编译警告问题

swift - 为什么 Swift 编译时间这么慢?

nginx - 使用 ffmpeg 和 nginx-rtmp 模块将 H264 流转码为 mpeg2

c++ - 如何编写智能生成文件?

c++读取txt到字符串错误

node.js - 为什么 fluent-ffmpeg 不尊重音频比特率?

c++ - 如何读取然后写回一个宽字符串?

ffmpeg - ffmpeg 命令中的 'dash' 选项有什么作用?