1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
#!/bin/sh # # Name: ffmpeg git # Version: 0.01a # Description: ffmpeg git compilation with libvorbis, x264, mp3 lame support # Script_URI: http://www.techno-blog.net # # Author: Nikos ########################### ##### Run some checks ##### ########################### # Check if user is root if [ $(id -u) != "0" ]; then echo "Erreur : Vous devez être root pour utiliser ce script, use sudo sh $0" exit 1 fi ############################################# ##### Set some variables and functions ###### ############################################# # Directory where this script is located BASEDIR="$(dirname $0)" error_out() { echo "Could not ${1}, aborting" exit 1 } wrap() { local ErrorMsg="$1" shift local cmd="$1" shift $cmd "$@" || error_out "$ErrorMsg" } # Install aptitude apt-get install aptitude # Function to install packages install_pkgs() { aptitude -yq=3 install "$@" } # Function to remove packages remove_pkgs() { aptitude -yq=3 remove "$@" } ################################# ##### The magic starts here ##### ################################# # Uninstall Packages wrap "remove libmp3lame-dev ffmpeg yasm" remove_pkgs libmp3lame-dev ffmpeg yasm # Install packages wrap "install some dependancies" install_pkgs quilt libsdl1.2-dev libogg-dev libvorbis-dev liba52-dev libdts-dev libimlib2-dev texi2html libraw1394-dev libdc1394-22-dev libtheora-dev libgsm1-dev libxvidcore-dev libfaac-dev libfaad-dev build-essential git-core checkinstall texi2html libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libx11-dev libxfixes-dev zlib1g-dev nasm # Retrieving x264, libvorbis, mp3lame mkdir ffmpeg_source cd ffmpeg_source wrap "diwnload yasm-1.2.0" wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz tar xzvf yasm-1.2.0.tar.gz cd yasm-1.2.0 wrap "set up yasm" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" wrap "compilation" make wrap "build DEB package" make install make distclean export "PATH=$PATH:$HOME/bin" cd .. wrap "retrieving x264 from git sources" git clone git://git.videolan.org/x264 cd x264 wrap "set up x264 config" ./configure --enable-static --disable-opencl wrap "compilation with 3 cores" make -j3 wrap "build install-lib-dev" make install-lib-dev wrap "build DEB package" checkinstall --pkgname=x264 --default --pkgversion="3:$(./version.sh | awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes cd .. mkdir -p /usr/local/share/doc/lame wrap "download lamemp3 source" wget http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz tar xzvf lame-3.98.4.tar.gz cd lame-3.98.4 wrap "set up lamemp3" ./configure --enable-nasm --disable-shared wrap "compilation" make wrap "build DEB package" checkinstall --pkgname=lame-ffmpeg --pkgversion="3.98.4" --backup=no --default --deldoc=yes cd .. wrap "retrieving libvpx from git sources" git clone http://git.chromium.org/webm/libvpx.git cd libvpx wrap "set up libvpx config" ./configure wrap "compilation with 3 cores" make -j3 wrap "build DEB package" checkinstall --pkgname=libvpx --pkgversion="$(date +%Y%m%d%H%M)-git" --backup=no --default --deldoc=yes cd .. wrap "retrieving ffmpeg from git sources" git clone git://git.videolan.org/ffmpeg cd ffmpeg wrap "set up ffmpeg config" ./configure --enable-gpl --enable-postproc --enable-swscale --enable-pthreads --enable-x11grab --enable-libdc1394 --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvpx --enable-avfilter wrap "compilation with 3 cores" make -j3 wrap "build DEB package" checkinstall --pkgname=ffmpeg --pkgversion="0.6.3-git" --backup=no --deldoc=yes --default hash x264 ffmpeg ffplay ffprobe echo "#############################" echo "##### Mission complete! #####" echo "#############################" |
Categories
- FFMpeg (5)
- Libav (1)
- Google (3)
- iBeacon (1)
- LDAP (3)
- Me (2)
- Network (11)
- OS (149)
- RTMP (4)
- SIP (1)
- Kamailio (1)
- SNMP (1)
- VMware (20)
- VCP考試 (1)
- 伺服器 網站服務 (105)
- 名詞解釋 (4)
- 專案管理 (1)
- 工具軟體 (50)
- Adobe (1)
- FMS (1)
- Cloudera (1)
- Docker (1)
- Eclipse (4)
- Intellij (2)
- OBS (2)
- Office (10)
- Excel (4)
- PowerPoint (5)
- Postman (1)
- Splunk (13)
- Virtualbox (2)
- Visual Studio (2)
- 文字編輯器 (10)
- Sublime Text 2 (6)
- Sublime Text 3 (3)
- Vim (3)
- 連線工具 (1)
- Xshell (1)
- Adobe (1)
- 程式語言 (79)
- CSS (2)
- HTML (2)
- iOS (1)
- Java (30)
- JavaScript (5)
- jQuery (4)
- jsTree (2)
- JSP (3)
- PHP (16)
- Python (7)
- Ruby (1)
- sed (1)
- Shell Script (8)
- Windows Bash Script (1)
- XML (1)
- 資料庫 (37)
- FFMpeg (5)