hangdong8765 发表于 2018-1-2 11:05:00

带有x264的ffmpeg编译出现小错误,请指教

我最近在ubuntu上进行带有x264的ffmpeg编译。
x264的编译如下:
./configure --prefix=/usr/local/x264 --enable-shared --enable-static --disable-asm
make
make install
ffmpeg的编译如下:
./configure --prefix=/monchickey/ffmpeg/ --enable-shared --enable-yasm --enable-libx264 --enable-gpl --enable -pthreads
--extra-cflags=-I/usr/local/x264/include --extra-ldflags=-L/usr/local/x264/lib
执行make的时候   报错
libavcodec/libx264.c: In function 'x264_frame' :
libavcodec/libx264.c:282:9 error: 'x264_bit_depth' undeclared(first use in this function)
             if(x264_bit_depth>8)   

libavcodec/libx264.c: In function 'x264_init_static':
libavcodec/libx264.c:892.9 error: 'x264_bit_depth' undeclared(first use in this function)
             if(x264_bit_depth== 8)


我也知道他提示说没有找到x264_bit_depth这个变量, 但是这个是官方库,怎么能出现这种错误呢, 应该是在配置或者编译x264库的时候出现了问题,请大神不吝指教,谢谢。

孙悟空 发表于 2018-1-30 20:12:42

790709592 发表于 2018-1-30 17:26
我git 的,应该是最新版本吧,然后安装报如下错误:
/usr/bin/ld: /usr/local/lib/libmp3lame.a(lame.o): r ...

你这个错误是说这个.a 的格式不是你的系统支持的格式,得不到对应的信息,你可以make distclean;make clean;然后重新编译

孙悟空 发表于 2018-1-2 11:05:55

ffmpeg是什么版本的?

hangdong8765 发表于 2018-1-2 11:49:20

官网上下载的ffmpeg-3.4.1.tar.bz2

孙悟空 发表于 2018-1-2 13:33:16

hangdong8765 发表于 2018-1-2 11:49
官网上下载的ffmpeg-3.4.1.tar.bz2

更换最新git clone版本吧,这期间应该是接口和结构部分稍微有一些变化,后来修复了

avcodec/libx264: fix compilation with x264 builds >= 153

http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=2a111c99a60fdf4fe5eea2b073901630190c6c93

hangdong8765 发表于 2018-1-2 13:54:15

谢谢啦,我刚接触这个东西。 很多地方还不懂

hahaha 发表于 2018-1-11 10:16:56

楼主你好,我也遇到了上面的问题,请问你解决了吗?

cyril1121 发表于 2018-1-30 15:44:39

下载新版本的ffmpeg重新编译即可

790709592 发表于 2018-1-30 17:26:04

我git 的,应该是最新版本吧,然后安装报如下错误:
/usr/bin/ld: /usr/local/lib/libmp3lame.a(lame.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libmp3lame.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** Error 1
求问各位大神怎么解决?

790709592 发表于 2018-1-30 17:26:33

我跟你报的错误,一模一样,请问你解决了吗?

790709592 发表于 2018-1-30 17:36:43

孙悟空 发表于 2018-1-2 13:33
更换最新git clone版本吧,这期间应该是接口和结构部分稍微有一些变化,后来修复了



悟空,这个怎么解决啊,X264 和 ffmpeg 都是git 的最新版。
页: [1] 2
查看完整版本: 带有x264的ffmpeg编译出现小错误,请指教