ffmpeg - 在 macos 上编译 opencv 错误 - libavformat 错误

标签 ffmpeg opencsv

我尝试在两台 Mac 中编译 OpenCSV,但都出现错误。错误如下:

Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.cpp.o
use of undeclared identifier 'avformat_find_stream_info'; 
did you mean 'av_find_stream_info'?
/usr/local/include/libavformat/avformat.h:1168:5: note: 'av_find_stream_info' declared here int av_find_stream_info(AVFormatContext *ic);

/usr/local/include 中的 libavformat 与 ffmpeg 一起安装。 ffmpeg是0.8.5版本

有人有同样的问题吗?

最佳答案

我基本上编辑了modules/highgui/src/cap_ffmpeg_impl.hpp中的代码

#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 3, 0)
    avformat_find_stream_info(ic, NULL);
#else
    av_find_stream_info(ic);
#endif

#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 3, 0)
    av_find_stream_info(ic);
    //avformat_find_stream_info(ic, NULL);
#else
    av_find_stream_info(ic);
#endif

就这样解决了。到目前为止没有任何问题。

关于ffmpeg - 在 macos 上编译 opencv 错误 - libavformat 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11563564/

相关文章:

ubuntu - 使用 ffmpeg 创建定格动画 - 渲染时出错

arrays - 在 pngs 上循环运行 ffmpeg 以提高效率?

java - 如何创建动态对象列表

java - 无法使用 OpenCSV 将 JavaBeans 写入 CSV

java - 使用 openCSV 忽略 CSV 值 + 将 CSV 文件中的 int 值存储在单独的二维数组元素中

java - 需要通用方法来读取 csv 文件

c# - 在 C# 中使用 ffmpeg.exe 将 MPG 转换为 AVI

php - 如何将视频转换为所有可能的编解码器?

c# - 将图像写入 Process.StandardInput.BaseStream 的更快方法

java - OpenCSV 从最后一行和特定列获取值