【问题标题】:FFmpeg 0.6 fails to build on ubuntu 16.04FFmpeg 0.6 无法在 ubuntu 16.04 上构建
【发布时间】:2016-08-18 10:43:42
【问题描述】:

我正在尝试为我拥有的项目构建 ffmpeg 0.6。我正在使用 Ubuntu 16.04,当我尝试构建它时,我收到以下错误:

In file included from libavcodec/mpegvideo.h:32:0,
              from libavcodec/vaapi_internal.h:30,
              from libavcodec/vaapi_mpeg4.c:23:
libavcodec/get_bits.h: In function ‘skip_bits’:
libavcodec/get_bits.h:387:17: warning: variable ‘re_cache’ set but not used [-Wunused-but-set-variable]
       OPEN_READER(re, s)
                   ^ 
libavcodec/get_bits.h:135:13: note: in definition of macro ‘OPEN_READER’
     int name##_cache= 0;\
         ^
libavcodec/vaapi_mpeg4.c: In function ‘vaapi_mpeg4_start_frame’:
libavcodec/vaapi_mpeg4.c:89:73: error: implicit declaration of function ‘ff_h263_get_gob_height’ [-Werror=implicit-function-declaration]
pic_param->num_macroblocks_in_gob           = s->mb_width * ff_h263_get
                                                            ^
cc1: some warnings being treated as errors
common.mak:40: recipe for target 'libavcodec/vaapi_mpeg4.o' failed
make: *** [libavcodec/vaapi_mpeg4.o] Error 1

我在使用 ffserver.o 文件时遇到了类似的错误,但我在这里下载了这些文件并修复了它:

sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev \
libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev \
libxcb-xfixes0-dev pkg-config texinfo zlib1g-dev

我相信它是类似的。有人有什么想法吗?? 谢谢。

【问题讨论】:

  • 尝试编译 6 年前的 ffmpeg 版本的原因是什么?
  • 正如我在我的论文项目中所说的那样。

标签: ubuntu build ffmpeg


【解决方案1】:

好的,我已经在我的 ubuntu 16.04 上构建了 0.6 版本。

错误implicit declaration of function 表示可以在某些标头中找到某些符号,但该标头不包含在该源文件中。

所以我尝试找到ff_h263_get_gob_height 函数声明:

$ ag ff_h263_get_gob_height

事实证明它是在“libavcodec/h263.h”中声明的。您需要做的就是在libavcodec/vaapi_mpeg4.c 中添加一行:

#include "libavcodec/h263.h"

继续构建时还会出现另一个类似的错误。

另外你必须用--enable-pthreads配置项目,否则链接器会抱怨一些恼人的DSO错误。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-03-25
    • 1970-01-01
    • 2019-06-28
    • 1970-01-01
    • 2023-04-10
    • 2018-06-09
    • 2016-10-06
    • 2016-12-17
    相关资源
    最近更新 更多