赞
踩
ps: 从笔记中迁移至blog
Windows 基于win10
Linux 基于CentOS 7.6
https://ffmpeg.org/download.html
echo %PATH%
setx /m PATH "%PATH%;F:\dev_tools\ffmpeg\bin"
ffmpeg -version
查询所有设备
ffmpeg -list_devices true -f dshow -i dummy
查询具体设备信息, 如:摄像头
ffmpeg -f dshow -list_options true -i video="Integrated Camera"
wget https://johnvansickle.com/ffmpeg/release-source/ffmpeg-4.1.tar.xz
ps: 如果需要安装x264 ,请跳过该步骤 直接安装yasm 和nasm
tar -Jxvf ffmpeg-4.1.tar.xz
cd ffmpeg-4.1
sudo ./configure --prefix=/usr/local/ffmpeg
sudo make & make install
yum install yasm
rpm -ivh epel-release-7-13.noarch.rpm
rpm -ivh yasm-1.2.0-4.el7.x86_64.rpm
yasm --version
sudo vi /etc/profile
export FFMEPG=/usr/local/ffmpeg
export PATH=${FFMEPG}/bin:${PATH}
source /etc/profile
yum install build-essential nasm
wget https://www.nasm.us/pub/nasm/releasebuilds/2.13.03/nasm-2.13.03.tar.gz
tar -zxvf nasm-2.13.03.tar.gz
cd nasm-2.13.03/
sudo ./configure --prefix=/usr/local/nasm && make
sudo make install
export PATH=/usr/local/nasm/bin:${PATH}
nasm -v
git clone https://code.videolan.org/videolan/x264.git
cd x264
./configure --prefix=/usr/softinstall/x264/ --includedir=/usr/local/include --libdir=/usr/local/x264/lib --enable-shared --enable-static --disable-asm
make&& make install
./configure --prefix=/usr/local/ffmpeg --enable-gpl --enable-shared --enable-libx264
make clean
make && make install
export PATH=/usr/local/ffmpeg/bin:${PATH}
vi /etc/ld.so.conf
/usr/local/x264/lib
/usr/local/ffmpeg/lib
sudo ldconfig
解决报错:
ffmpeg: error while loading shared libraries: libavdevice.so.58: cannot open shared object file: No such file or directory
ffmpeg -i rtsp://admin:12345@192.168.101.243 -c:a libfaac -ar 44100 -ab 48k -c:v libx264 -f flv rtmp://127.0.0.1:31935/live/video11
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。