以下操作自測通過!CentOS系統
這個視頻轉換讓我很是糾結,windows下更糾結!先把Liunx下成功案例公佈一下,供大家參考,歡迎拍磚
部分摘抄自 http://blog.csdn.net/luka2008/article/details/21243499
Codecs
Xvid Codec
Visit the Xvid site to retrieve the latest version of the codec.
1
2
3
4
5
6
7
|
tar
-zxvf xvidcore-1.3.2.tar.gz cd
xvidcore/build/generic ./configure make make
install ldconfig |
Lame Codec
Visit the LAME MP3 Encoder project to obtain their latest version.
1
2
3
4
5
6
7
|
tar
-zxvf
lame-3.98.4.tar.gz cd
lame-3.98.4 ./configure make make
install ldconfig |
Faac Codec
Visit the AudioCoding site for the latest version of the codec.
1
2
3
4
5
6
7
8
|
tar
-zxvf
faac-1.28.tar.gz cd
faac-1.28 ./bootstrap ./configure make make
install ldconfig |
OpenCore AMR Codec
Get the latest version of OpenCore AMR from their repository at SourceForge.
1
2
3
4
5
6
7
|
wgethttp://downloads.sourceforge.net/project/opencore-amr/opencore-amr/0.1.2/opencore-amr-0.1.2.tar.gz tar
-zxvf
opencore-amr-0.1.2.tar.gz cd
opencore-amr-0.1.2 ./configure make make
install ldconfig |
OGG Codec
Visit Xiph.org for the latest version of libogg.
1
2
3
4
5
6
7
|
tar
-zxvflibogg-1.3.0.tar.gz cd
libogg-1.3.0 ./configure make make
install ldconfig |
Vorbis Codec
Visit Xiph.org for the latest version of Vorbis (libvorbis).
1
2
3
4
5
6
7
|
tar
-jxvf libvorbis-1.3.2.tar.bz2 cd
libvorbis-1.3.2 ./configure make make
install ldconfig |
Theora Codec
Visit Theora.org for the latest version of Theora (libtheora).
1
2
3
4
5
6
7
|
tar
-jxvf
libtheora-1.1.1.tar.bz2 cd
libtheora-1.1.1 ./configure make make
install ldconfig |
x264
1
2
3
4
5
6
|
這個不知道在哪下載,如果找不到就娶我的資源裏下載吧點擊打開鏈接下載后里面的包只需要找到你需要的安裝即可)
cd
x264-snapshot-20140502-2245 ./configure
--enable-static make make
install ldconfig cd |
FFMPEG
1
2
3
4
5
6
7
8
9
|
同樣可以去我資源中下載,解壓後,進入目錄執行以下命令點擊打開鏈接(下載后里面的包只需要找到你需要的安裝即可)
--enable-libopencore-amrwb --enable-libfaac --enable-libmp3lame
--enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid
--enable-gpl --enable-postproc --enable-nonfree
make make
install ldconfig |
/usr/sbin/setenforce 0 立刻關閉 SELINUX
/usr/sbin/setenforce 1 立刻啓用 SELINUX
加到系統默認啓動裏面
echo "/usr/sbin/setenforce 0" >> /etc/rc.local
ffmpeg -i 待轉視頻路徑及視屏名稱 -vcodec libx264 -acodec aac -strict -2 -ab 64k -ar 44100 -y
存放視頻路徑+test.mp4 (AAC音頻格式視頻)