2012-06-27 75 views

回答

19

我終於找到了

1)如何建立一個目錄avconv源

mkdir avconv-source 

2)下載並安裝的x264庫

cd ~/avconv-source 
git clone git://git.videolan.org/x264.git x264 
cd x264 
sudo ./configure --enable-static 
sudo make 
sudo make install 

3)下載avconv來源

cd ~/avconv-source 
git clone git://git.libav.org/libav.git avconv 
cd avconv 
sudo ./configure 
sudo ./configure --enable-gpl --enable-libx264 
sudo make 
sudo make install 

現在你可以執行

avconv -i test.mov -c:v libx264 -c:a copy test.mp4 
+0

當運行'須藤的./configure --enable-GPL --enable-libx264'收到錯誤:'avconv - 源極/ avconv/libavcodec的/ libx264.c:412:未定義參照「x264_encoder_open_125 '' – JJD

+1

@JJD您可能同時安裝了兩個不同版本的x264(這包括libx264-dev軟件包)。嘗試設置LD_LIBRARY_PATH到libx264應該是的目錄,從http://stackoverflow.com/questions/11838456/undefined-reference-to-x264-encoder-open-125 – Kugutsumen

+0

得到這個答案謝謝。我遵循了[如何在Ubuntu Precise上安裝FFmpeg]的指南(http://delicious.com/redirect?url=http%3A//ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide),它對我有用。我使用這個命令:'ffmpeg -i in.mts -vcodec libx264 -filter:v yadif -s hd1080 -ab 128k -strict -2 -threads 0。/ out_x264.mp4' – JJD

9

這對我在Ubuntu 12.04  偉大的工作,但它抱怨彙編失蹤。

最低版本是yasm-1.2.0。 如果你真的想編譯沒有asm,使用--disable-asm進行配置。

感謝HOWTO: Install and use the latest FFmpeg and x264,我也做了以下事情,而且超出了這個範圍。

sudo apt-get install build-essential checkinstall 

sudo apt-get build-dep yasm 

wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz && \ 
tar -xf yasm-1.2.0.tar.gz && cd yasm-1.2.0 && ./configure 

make 

sudo checkinstall --pakdir "$HOME/Desktop" --pkgname yasm --pkgversion 1.2.0 \ 
--backup=no --default 
9

這在Ubuntu 13.04和Ubuntu 12.04.3 LTS上適用於我。

apt-get install libavcodec-extra-53 
+0

對我很好。 – Olivier

+3

這是Ubuntu 14.04上的['libavcodec-extra-54'](http://packages.ubuntu.com/trusty/libavcodec-extra-54)。 – Keelan

相關問題