|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的好朋友们!以下装置步调基础来自官网,做个条记以便利本人今后检察
http://trac.ffmpeg.org/wiki/CompilationGuide
1.装置依附包
[python]viewplaincopyprint?
- <spanstyle="font-size:14px;">yuminstallautoconfautomakegccgcc-c++gitlibtoolmakenasmpkgconfigzlib-devel</span>
- <spanstyle="font-size:14px;">yuminstallautoconfautomakegccgcc-c++gitlibtoolmakenasmpkgconfigzlib-devel</span>
复制代码 2.新建文件夹寄存源码
3.编译&装置
Yasm
Yasmisanassemblerusedbyx264andFFmpeg.
[python]viewplaincopyprint?
- cd~/ffmpeg_sources
- curl-Ohttp://www.ckuyun.com/projects/yasm/releases/yasm-1.2.0.tar.gz
- tarxzvfyasm-1.2.0.tar.gz
- cdyasm-1.2.0
- ./configure--prefix="$HOME/ffmpeg_build"--bindir="$HOME/bin"
- make
- makeinstall
- makedistclean
- export"PATH=$PATH:$HOME/bin"
- cd~/ffmpeg_sourcescurl-Ohttp://www.ckuyun.com/projects/yasm/releases/yasm-1.2.0.tar.gztarxzvfyasm-1.2.0.tar.gzcdyasm-1.2.0./configure--prefix="$HOME/ffmpeg_build"--bindir="$HOME/bin"makemakeinstallmakedistcleanexport"PATH=$PATH:$HOME/bin"
复制代码
libx264
H.264videoencoder.
[python]viewplaincopyprint?
- cd~/ffmpeg_sources
- gitclone--depth1git://git.videolan.org/x264
- cdx264
- ./configure--prefix="$HOME/ffmpeg_build"--bindir="$HOME/bin"--enable-static
- make
- makeinstall
- makedistclean
- cd~/ffmpeg_sourcesgitclone--depth1git://git.videolan.org/x264cdx264./configure--prefix="$HOME/ffmpeg_build"--bindir="$HOME/bin"--enable-staticmakemakeinstallmakedistclean
复制代码 libfdk_aac
AACaudioencoder.
[python]viewplaincopyprint?
- cd~/ffmpeg_sources
- gitclone--depth1git://git.code.sf.net/p/opencore-amr/fdk-aac
- cdfdk-aac
- autoreconf-fiv
- ./configure--prefix="$HOME/ffmpeg_build"--disable-shared
- make
- makeinstall
- makedistclean
- cd~/ffmpeg_sourcesgitclone--depth1git://git.code.sf.net/p/opencore-amr/fdk-aaccdfdk-aacautoreconf-fiv./configure--prefix="$HOME/ffmpeg_build"--disable-sharedmakemakeinstallmakedistclean
复制代码 libmp3lame
Opusaudiodecoderandencoder.
[python]viewplaincopyprint?
- cd~/ffmpeg_sources
- curl-Ohttp://downloads.xiph.org/releases/opus/opus-1.1.tar.gz
- tarxzvfopus-1.1.tar.gz
- cdopus-1.1
- ./configure--prefix="$HOME/ffmpeg_build"--disable-shared
- make
- makeinstall
- makedistclean
- cd~/ffmpeg_sourcescurl-Ohttp://downloads.xiph.org/releases/opus/opus-1.1.tar.gztarxzvfopus-1.1.tar.gzcdopus-1.1./configure--prefix="$HOME/ffmpeg_build"--disable-sharedmakemakeinstallmakedistclean
复制代码
libogg
Oggbitstreamlibrary.Requiredbylibtheoraandlibvorbis.
[python]viewplaincopyprint?
- cd~/ffmpeg_sources
- curl-Ohttp://downloads.xiph.org/releases/ogg/libogg-1.3.1.tar.gz
- tarxzvflibogg-1.3.1.tar.gz
- cdlibogg-1.3.1
- ./configure--prefix="$HOME/ffmpeg_build"--disable-shared
- make
- makeinstall
- makedistclean
- cd~/ffmpeg_sourcescurl-Ohttp://downloads.xiph.org/releases/ogg/libogg-1.3.1.tar.gztarxzvflibogg-1.3.1.tar.gzcdlibogg-1.3.1./configure--prefix="$HOME/ffmpeg_build"--disable-sharedmakemakeinstallmakedistclean
复制代码
libvorbis
Vorbisaudioencoder.Requireslibogg.
[python]viewplaincopyprint?
- cd~/ffmpeg_sources
- curl-Ohttp://downloads.xiph.org/releases/vorbis/libvorbis-1.3.4.tar.gz
- tarxzvflibvorbis-1.3.4.tar.gz
- cdlibvorbis-1.3.4
- ./configure--prefix="$HOME/ffmpeg_build"--with-ogg="$HOME/ffmpeg_build"--disable-shared
- make
- makeinstall
- makedistclean
- cd~/ffmpeg_sourcescurl-Ohttp://downloads.xiph.org/releases/vorbis/libvorbis-1.3.4.tar.gztarxzvflibvorbis-1.3.4.tar.gzcdlibvorbis-1.3.4./configure--prefix="$HOME/ffmpeg_build"--with-ogg="$HOME/ffmpeg_build"--disable-sharedmakemakeinstallmakedistclean
复制代码
libvpx
VP8/VP9videoencoder.
[python]viewplaincopyprint?
- cd~/ffmpeg_sources
- gitclone--depth1https://chromium.谷歌source.com/webm/libvpx.git
- cdlibvpx
- ./configure--prefix="$HOME/ffmpeg_build"--disable-examples
- make
- makeinstall
- makeclean
- cd~/ffmpeg_sourcesgitclone--depth1https://chromium.谷歌source.com/webm/libvpx.gitcdlibvpx./configure--prefix="$HOME/ffmpeg_build"--disable-examplesmakemakeinstallmakeclean
复制代码 注重:因为国际比来没法会见Google以是libvpx没法gitclone,此时能够往别处下载:http://yunpan.cn/QhNk5tDqQV3MM会见暗码45f6
FFmpeg
- cd~/ffmpeg_sourcesgitclone--depth1git://source.ffmpeg.org/ffmpegcdffmpegPKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"exportPKG_CONFIG_PATH./configure--prefix="$HOME/ffmpeg_build"--extra-cflags="-I$HOME/ffmpeg_build/include"--extra-ldflags="-L$HOME/ffmpeg_build/lib"--bindir="$HOME/bin"--extra-libs=-ldl--enable-gpl--enable-nonfree--enable-libfdk_aac--enable-libmp3lame--enable-libopus--enable-libvorbis--enable-libvpx--enable-libx264makemakeinstallmakedistcleanhash-r.~/.bash_profile
复制代码 装置停止检察版本:
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的小伙伴们! |
|