转自 : http://www.xxlinux.com/bbs/viewthread.php?tid=3873&extra=
最近几位朋友想让我为他们搞一些视频,在手机上没事可以看。那几位的手机高中低档全有,几百到几千元的价位都有,为了通用,首先想到的是单声道的3GP格式
说到3GP转换,不得不提FFmpeg,从它的主页(http://ffmpeg.org/index.html)中了解到
July 24, 2009
FFmpeg has removed support for libamr as of svn revision 19365. It has been replaced with support for libopencore-amr. Naturally the configure options have changed. The libamr options have been removed and there are two new options to take their place:
* --enable-libopencore-amrnb
* --enable-libopencore-amrwb
The reason for this change is that the libamr license was non-free, while libopencore-amr is licensed under an Apache 2 license. The change was discussed at length on the developer mailing list during May, June, and July. This has several effects:
* You may now distribute FFmpeg builds with support for dynamically loading libopencore-amr
* Support for AMR-WB encoding has been removed since libopencore-amr does not support it
呵呵,这是好事,amr 支持采用开源的 opencore-amr,首先安装 opencore-amr,由于时间关系,我并没有为大家建现成的 rpm 包,暂时从源码安装吧,由于是从源码安装,一般的新手不要轻易尝试,等现成的RPM包吧,有时间我会建的。
源码安装一般步骤
./configure
make
su root
make install
此外在 http://ffmpeg.org/shame.html 中也看到了好几个国内的还是很有名的多媒体软件,真脸红呀
ffmpeg 下载方法:
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
安装时
./configure --enable-libopencore-amrnb --enable-libopencore-amrwb
加上 opencore-amr 支持
这两个软件编译时间很长,安装好后你会发现目前关于3gp转换官方给的说明很少。
不过还好有以前的经验,很快把所有的参数都搞清了:
ffmpeg -i 输入文件 -s qcif -acodec libopencore_amrnb -ar 8000 -ac 1 -ab 12.2k -f 3gp -y 输出.3gp
上面这个参数通用性很好,至少我那哥几个的手机全没有问题,其中 qcif 是视频尺寸大小,这是一般手机都能用的大小。
新版的ffmpeg功能很强大,我机中所有的视频格式它全能直接转成3gp,像 avi flv rmvb,很值得一用的。
okuc 于 2012-03-31 19:12:44发表:
学习一下~~~
yiyun_8 于 2012-03-20 15:16:50发表:
新手路过
Aibuwan 于 2009-09-03 00:07:18发表:
这种贴太强了
h_h 于 2009-09-02 17:29:57发表:
谢谢楼主分享,:0w223dc
wangyu 于 2009-09-02 15:34:22发表:
很有价值
雨夜花 于 2009-09-02 13:59:02发表:
人家原创我转的,其实都一样,因为首发不在这,所以说转,呵呵
ty8080 于 2009-09-02 13:16:35发表:
不错,这种贴不管是原创还是转的都应该表扬