2、configure makemake install yasm组件
3、configure makemake install open组件
4、执行./configure --enable-libopencore-amrnb --enable-version3makemake install ffmpeg组件
如果报错common.mak:28: *** unterminated call to function `foreach': missing `)'.
表示make版本太低,要求3.81版本,需要安装make到单独的目录
重新make,直接利用新的make进行make,如到指定目录下执行/export/home/zzy/make/latest/bin/make
如果缺少某些包,需要根据具体情况进行环境变量的配置
declare -x LD_LIBRARY_PATH="/usr/local/lib:/export/home/zzy/wav2amr/app/yasm/lib:/export/home/zzy/wav2amr/app/opencore-amr"
wav2amr
ffmpeg -i in/18953100357_18629064137_20110623112310.wav -acodec libopencore_amrnb -y out/18953100357_18629064137_20110623112310.amr
ffmpeg -i 29918757.flv -f 3gp -acodec aac -s 176x144 -ar 16000 -ab 12200 -ac 1 -y -strict experimental amrnb3.3gp
ffmpeg -i 29918757.flv -f 3gp -acodec aac -s 176x144 -y -strict experimental 98.3gp
/usr/include/linux/videodev.h:56: error: syntax error before "ulong"
/usr/include/linux/videodev.h:72: error: syntax error before '}' token
libavdevice/v4l.c: In function `grab_read_header':
libavdevice/v4l.c:76: error: storage size of 'tuner' isn't known
libavdevice/v4l.c:134: error: invalid application of `sizeof' to incomplete type `video_tuner'
libavdevice/v4l.c:141: error: invalid application of `sizeof' to incomplete type `video_tuner'
libavdevice/v4l.c:76: warning: unused variable `tuner'
make: *** [libavdevice/v4l.o] 错误 1
解决办法
将/usr/include/linux/videodev.h中的ulong类型改为 unsigned long 类型,编译还可能报错如下
HTML doc/developer.html
Unknown option: init-file
Try 'texi2html -help' for usage instructions.
make: *** [doc/developer.html] 错误 2
属于文档错误,不必理会 ,直接make install即可。
截图
ffmpeg -i 29918757.flv -ss 1 -s 192*80 -f image2 11.jpg
wav2mp3
lib supporter : libmp3lame
./configure --enable-libopencore-amrnb --enable-version3 --enable-libmp3lame --prefix=/usr/local/ffmpeg
hint:ERROR: libmp3lame >= 3.98.3 not found
download:
http://sourceforge.net/projects/lame/files/latest/download?source=files
优选
./configure --enable-shared
备选
./configure --prefix=/static --disable-shared --enable-static
make
make install
./configure --enable-shared
编译后报错依旧(share编译应不会报错,static编译可能会报错),执行ffmpeg configure 报错依旧,查看config.log 找不到lame.sh,可以采用如下命令指定lame.sh位置
./configure --enable-libopencore-amrnb --enable-version3 --enable-libmp3lame --prefix=/usr/local/ffmpeg --extra-cflags=-I/static/include --extra-ldflags=-L/static/lib
最终
ffmpeg -i 04596677878_13339397677_20101230094147.wav -y -vn -ar 44100 -ac 2 -ab 192 -f mp3 son_final.mp3