2012年1月4日 星期三

Install OpenCV 2.3

54 sudo apt-get remove ffmpeg x264 libx264-dev
55 sudo apt-get update
56 sudo apt-get install build-essential checkinstall git libfaac-dev libjack-jackd2-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libva-dev libvdpau-dev libvorbis-dev libx11-dev libxfixes-dev texi2html yasm zlib1g-dev
57 cd
58 git clone git://git.videolan.org/x264
59 cd x264
60 ./configure --enable-static
61 make
62 sudo checkinstall --pkgname=x264 --pkgversion="3:$(./version.sh | \
awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes --fstrans=no --default
63 sudo apt-get remove libvpx-dev
64 cd
65 git clone http://git.chromium.org/webm/libvpx.git
66 cd libvpx
67 ./configure
68 make
69 sudo checkinstall --pkgname=libvpx --pkgversion="1:$(date +%Y%m%d%H%M)-git" --backup=no --deldoc=yes --fstrans=no --default
70 cd
71 git clone --depth 1 git://source.ffmpeg.org/ffmpeg
72 cd ffmpeg
73 ./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab
74 make
75 sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(date +%Y%m%d%H%M)-git" --backup=no --deldoc=yes --fstrans=no --default
76 hash x264 ffmpeg ffplay ffprobe
77 cd ~/ffmpeg
78 make tools/qt-faststart
79 sudo checkinstall --pkgname=qt-faststart --pkgversion="$(date +%Y%m%d%H%M)-git" --backup=no --deldoc=yes --fstrans=no --default install -Dm755 tools/qt-faststart /usr/local/bin/qt-faststart
80 ffmpeg -i input -acodec libfaac -aq 100 -vcodec libx264 -preset slow -crf 22 output.mp4
81 cd /usr/local/src/
82 ls
83 cd OpenCV-2.3.1/
84 ls
85 cd release/
86 cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_NEW_PYTHON_SUPPORT=ON -D BUILD_EXAMPLES=ON ..
87 make
88 make install

沒有留言: