我使用这个命令来转换flv to 3gp
ffmpeg -y -i in.flv -ar 8000 -b:a 12.20k -ac 1 -s 176x144 out.3gp它带来了这个错误
Encoder (codec amr_nb) not found for output stream #0:1我在yum上搜索过yum包,但没有找到。
我在CentOS 7上
ffmpeg -version
ffmpeg version 2.6.8 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394 --enable-libfaac --enable-nonfree --enable-libfdk-aac --enable-nonfree --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
libavutil 54. 20.100 / 54. 20.100
libavcodec 56. 26.100 / 56. 26.100
libavformat 56. 25.101 / 56. 25.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.102 / 5. 11.102
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100我不知道少了什么。
编辑:
我遵循了https://s3bubble.com/installing-ffmpeg-on-centos-6-6-in-usrlocalbin/ +alijandro的建议。
发布于 2017-03-22 11:14:30
安装在系统中的ffmpeg不支持编码器amr-nb,这是3gp格式的默认编码器。
看看是否可以在编码器列表中找到
$ ffmpeg -encoders |grep amr_nb你可以试试
-vcodec h263 -acodec aacamr-nb支持构建ffmpeg- get opencore source from here [https://sourceforge.net/projects/opencore-amr](https://sourceforge.net/projects/opencore-amr)
- compile the source and install to `/path/to/opencore-amr`
- get the source of ffmpeg
- configure ffmpeg with the options $./A11$./A11-启用-libopencore-amrnb\-启用-libopencore-amrwb\-启用-version3 3\.A11\-A11=“-L/path/to/opencore-amr/lib”.#多个配置选项
-编译并安装ffmpeg,那么您的命令就可以工作了
https://stackoverflow.com/questions/42948873
复制相似问题