centos ffmpeg

Kiyor | Created: 09-06-15 06:04:56, Last Update: 07-13-18 12:48:27



wget -N https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz
tar xf ffmpeg-release-64bit-static.tar.xz
mv ffmpeg-4.0.1-64bit-static/ffmpeg /usr/local/bin/

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

cd ~
yum install -y epel-release
yum install -y wget git svn autoconf libtool yasm libass libass-devel libmp4v2 libmp4v2-devel make gcc gcc-c++

svn checkout http://svn.xvid.org/trunk --username anonymous

cd trunk/xvidcore/build/generic/
./bootstrap.sh
./configure
make
make install

cd ~
wget http://downloads.sourceforge.net/faac/faac-1.28.tar.gz
tar xvzf faac-1.28.tar.gz
cd faac-1.28
./configure
make
make install

cd ~
git clone --depth 1 git://github.com/yasm/yasm.git
cd yasm
./autogen.sh
./configure
make
make install

cd ~
git clone --depth 1 git://git.videolan.org/x264.git
cd x264
./configure --enable-static --enable-shared
make
make install

cd ~
git clone --depth 1 git://source.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
./configure --enable-nonfree --enable-libx264 --enable-gpl --enable-pthreads --enable-libfaac --enable-libass --enable-libxvid
make
make install

cd ~
ln -s /usr/local/lib/libx264.so.148 /usr/lib64/libx264.so.148
ln -s /usr/local/lib/libfaac.so.0 /usr/lib64/libfaac.so.0
ln -s /usr/local/lib/libxvidcore.so.4 /usr/lib64/libxvidcore.so.4
docker run -ti -p 4000:22 -p 5000:30000 --name ffmpeg --hostname ffmpeg centos:7 /bin/bash

cd
yum install -y wget
wget http://repository.it4i.cz/mirrors/repoforge/redhat/el7/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
rpm -Uvh rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
wget http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
rpm -Uvh nux-dextop-release-0-1.el7.nux.noarch.rpm
yum -y update
yum install -y ffmpeg

1.

2.

name=${1%.mp4}
ffmpeg -i $1 -ss 00:00:00 -vframes 1 tmp1.png
convert tmp1.png play.png -gravity Center -compose dissolve -composite tmp2.png
convert tmp2.png -resize 25% ${name}.png

rm -rf tmp1.png tmp2.png


Category: none

Tags: centos ffmpeg