所以我尝试在我的Ubuntu Desktop 12.04 SoX中安装,支持mMPa文件的FFMPEG。
我已按照this说明安装FFMPEG,仅安装某些编码器。最后,这是我的设置:
ffmpeg version git-2014-01-17-3ca7085 Copyright (c) 2000-2014 the FFmpeg developers
built on Jan 17 2014 12:36:01 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --prefix=~/ffmpeg_build --extra-cflags=-I~/ffmpeg_build/include --extra-ldflags=-L~/ffmpeg_build/lib --bindir=~/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-nonfree
libavutil 52. 62.100 / 52. 62.100
libavcodec 55. 48.101 / 55. 48.101
libavformat 55. 23.103 / 55. 23.103
libavdevice 55. 5.102 / 55. 5.102
libavfilter 4. 1.100 / 4. 1.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
Hyper fast Audio and Video encoder
然后,我找到了SoX 14.4.1版本并尝试使用这样的FFMPEG支持进行配置:
./configure --with-ffmpeg
但是我收到了这个错误:
checking for FFMPEG... no
checking libavformat/avformat.h usability... no
checking libavformat/avformat.h presence... no
checking for libavformat/avformat.h... no
checking ffmpeg/avformat.h usability... no
checking ffmpeg/avformat.h presence... no
checking for ffmpeg/avformat.h... no
configure: error: in `~/sox-14.4.1':
configure: error: cannot find ffmpeg
See `config.log' for more details
所以我尝试设置PKG_CONFIG_PATH环境变量:
PKG_CONFIG_PATH=~/ffmpeg_build/lib/pkgconfig
./configure --with-ffmpeg
获得:
checking for FFMPEG... yes
checking libavformat/avformat.h usability... yes
checking libavformat/avformat.h presence... yes
checking for libavformat/avformat.h... yes
checking for av_open_input_file in -lavformat... no
configure: error: in `~/sox-14.4.1':
configure: error: cannot find ffmpeg
See `config.log' for more details
检查'config.log'我看到以下错误:
| #define HAVE_LIBAVFORMAT_AVFORMAT_H 1
| /* end confdefs.h. */
|
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char av_open_input_file ();
| int
| main ()
| {
| return av_open_input_file ();
| ;
| return 0;
| }
configure:15862: result: no
configure:15935: error: in `~/sox-14.4.1':
configure:15937: error: cannot find ffmpeg
我在这里缺少什么? THX!