美洲杯波胆_美洲杯波胆赔率
做最好的网站
来自 计算机教程 2020-01-02 01:50 的文章
当前位置: 美洲杯波胆 > 计算机教程 > 正文

ffmpeg安装

centos6.7安装opencv-2.4.9

一、整个过程分三步

1.安装centos基本安装包

2.安装ffmpeg相关依赖包及ffmpeg

3.安装opencv

二、具体步骤

  1. 安装centos基本安装包

yum install glibc gcc gcc-c autoconfautomake libtool git make nasm pkgconfig

yum install SDL-devel a52dec a52dec-develalsa-lib-devel

yum install freetype-devel giflib gsmgsm-devel imlib2 imlib2-devel lame lame-devel libICE-devel libSM-devellibX11-devel

yum install libXau-devel libXdmcp-devellibXext-devel libXrandr-devel libXrender-devel libXt-devel

yum install mesa-libGL-develmesa-libGLU-devel xorg-x11-proto-devel zlib-devel

yum install ncurses-devel

yum install libdc1394 libdc1394-devel

yum install amrnb-devel amrwb-developencore-amr-devel

yum groupinstall "Development tools”

yum install bzip2-devel

yum install openssl-devel

yum install ncurses-devel

yum install sqlite-devel

yum install gtk*

yum installgtk -devel libjpeg-devel libtiff-devel jasper-devel libpng-devel cmake

yum install git gtk2-devel numpy pythonpython-pip python-devel gstreamer-plugins-base-devel libv4l

yum install cloog-ppl gmp-deve

yum install gimp-devel gimp-devel-toolsgimp-libs gimp libavc1394 libavc1394-devel libdc1394 libdc1394-devel libraw1394libraw1394-devel

  1. 安装ffmpeg相关依赖包

yum install xvid4conf xvidcore-develxvidcore libogg libogg-devel liboggz liboggz-deve log4c log4cpluslog4cplus-devel log4cpp libvorbislibvorbis-devel

yum install vorbis-tools libtheora libtheora-devel theora-tools faacfaac-devel faad2 faad2-devel lame twolame-devel twolame flamerobin toolameopus-devel opus libvpx-devel libvpx

yum install libvpx-utils mplayermplayer-gui mplayer-tools mencoder flvtool2.noarch

  1. 安装ffmpeg

(1) wgethttps://www.ffmpeg.org/releases/ffmpeg-2.8.tar.gz

(2) tar zxvf ffmpeg-2.8.tar.gz

(3) cd ffmpeg-2.8

(4) PKG_CONFIG_PATH=/usr/local/ffmpeg_build/lib/pkgconfig

export PKG_CONFIG_PATH

(5)./configure ----prefix="/usr/local/ffmpeg_build"--extra-cflags="-I/usr/local/ffmpeg_build/include"--extra-ldflags="-L/usr/local/ffmpeg_build/lib"--bindir="/usr/local/bin"

--extra-libs=-ldl--enablel-shared --enable-gpl

./configure–prefix=”usr/local/ffmpeg_build” –extra-cflags="-I/usr/local/ffmpeg_build/include"--extra-ldflags="-L/usr/local/ffmpeg_build/lib" --bindir="/usr/local/bin"--extra-libs=-ldl --enablel-shared --enable-gpl

(6) make–j8

(7) makeinstall

(8) cd/etc/bashrc

在最后两行添加

exportPKG_CONFIG_PATH=/usr/local/ffmpeg_build/lib/pkgconfig:$PKG_CONFIG_PATH

exportLD_LIBRARY_PATH=/usr/local/ffmpeg_build/lib:$LD_LIBRARY_PATH

(9)在终端输入ffmpeg

图片 1

4.安装opencv

(1) unzip opencv-2.4.9.zip

(2) cd opencv-2.4.9.zip

(3) mkdir build

(4) cmake –D CMAKE_BUILD_TYPE=RELEASE–D CMAKE_INSTALL_PREFIX=./build/ ../opencv-2.4.9

(5) make –j8

(6) make install

(7)在终端输入

exportLD_LIBRARY_PATH=/usr/local/opencv-2.4.9/build/lib/:$LD_LIBRARY_PATH

或执行vim /etc/ld.so.conf

在文件最后添加

/usr/local/opencv-2.4.9/lib

在终端输入ldconfig

(8) 执行命令:

cp/usr/local/opencv-2.4.9/lib/pkgconfig/opencv.pc /usr/lib64/pkgconfig/

将/usr/local/opencv-2.4.9/lib/pkgconfig/opencv.pc复制到/usr/lib64/pkgconfig/中

后记:

由于以前开发是在windows上使用opencv,目前因项目需要,开始由windows转到linux服务器上使用Opencv,虽然centos上安装opencv非常简单,却折腾了本人好几天,主要原因是用CvCapture中的相关函数无法获取是否而致,究其因,还是与部分与视频有关的相关安装包没有安装而致,最终少了哪些视频相关安装包,也没有来及探个究竟。以后有时间再具体探究吧。

参考:

1.http://wiki.razuna.com/display/ecp/FFMpeg Installation on CentOS and RedHat;

2.https://wuliangx.wordpress.com/2014/11/05/playing-the-video-example-in-oreilly-learning-opencv-with-centos-6-5/;

3.http://wanwentao.blog.51cto.com/2406488/435867;

  1. http://blog.csdn.net/guojieaix/article/details/44064213

http://www.bkjia.com/Linuxjc/1061758.htmlwww.bkjia.comtruehttp://www.bkjia.com/Linuxjc/1061758.htmlTechArticlecentos6.7安装opencv-2.4.9 一、整个过程分三步 1.安装centos基本安装包 2.安装ffmpeg相关依赖包及ffmpeg 3.安装opencv 二、具体步骤 1. 安装centos基本安...

安装ffmpeg所需要的包

yum install autoconf automake gcc gcc-c git libtool make nasm pkgconfig zlib-devel

创建存放ffmpeg源代码包的目录

mkdir ~/ffmpeg_sources

安装Yasm

cd ~/ffmpeg_sources

git clone --depth 1 git://github.com/yasm/yasm.git

cd yasm

autoreconf -fiv

./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"

make

make install

make distclean

安装libx264

cd ~/ffmpeg_sources

git clone --depth 1 git://git.videolan.org/x264

cd x264

./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static

make

make install

make distclean

安装libfdk_aac

cd ~/ffmpeg_sources

git clone --depth 1 git://git.code.sf.net/p/opencore-amr/fdk-aac

cd fdk-aac

autoreconf -fiv

./configure --prefix="$HOME/ffmpeg_build" --disable-shared

make

make install

make distclean

安装libmp3lame

cd ~/ffmpeg_sources

curl -L -O http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz

tar xzvf lame-3.99.5.tar.gz

cd lame-3.99.5

./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --disable-shared --enable-nasm

make

make install

make distclean

本文由美洲杯波胆发布于计算机教程,转载请注明出处:ffmpeg安装

关键词: