明显是链接库没有找到的原因,可我之前已经安装过libx265,这种情况可以使用ldd来查看ffmpeg到底需要链接那些库文件
linux@ubuntu:/usr/local/bin$ ldd `which ffmpeg`
linux-gate.so.1 => (0xb76f7000)
libva.so.1 => /usr/lib/i386-linux-gnu/libva.so.1 (0xb76c3000)
libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xb76a1000)
libxcb-shm.so.0 => /usr/lib/i386-linux-gnu/libxcb-shm.so.0 (0xb769c000)
libxcb-xfixes.so.0 => /usr/lib/i386-linux-gnu/libxcb-xfixes.so.0 (0xb7694000)
省略了其他
关键找到
libx265.so.68 => /usr/local/lib/libx265.so.68 (0xb704a000)
查看libx265.so.68是否存在
file /usr/local/lib/libx265.so.68
linux@ubuntu:/usr/local/bin$ file /usr/local/lib/libx265.so.68
/usr/local/lib/libx265.so.68: ELF 32-bit LSB shared object, Intel 80386, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=8af81a44a04df551b959d95907a4b5a84f981aab, not stripped
这个就让人纳闷了,明明存在却报错,接着回头看看
linux@ubuntu:/home$ ffmpeg
ffmpeg version N-75934-gccd3b3d Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.2 (Ubuntu 4.9.2-10ubuntu13)
configuration: --pkg-config-flags=--static --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
libavutil 55. 3.100 / 55. 3.100
libavcodec 57. 5.100 / 57. 5.100
libavformat 57. 3.100 / 57. 3.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 11.100 / 6. 11.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.100 / 2. 0.100
libpostproc 54. 0.100 / 54. 0.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
神不知鬼不觉的又可以用上了,不知哪里出问题了,这里记录一下