ffmpeg的安装与使用
ffmpeg -headers "Referer:https://www.c-span.org/" -i https://m3u8-1.c-spanvideo.org/program/program.554829.234.m3u8 -c copy -bsf:a aac_adtstoasc 123.mp4
centos7上安装ffmpeg
方案一:源码安装
1.官网下载http://ffmpeg.org/download.html
2.
tar -xjvf ffmpeg-5.1.2.tar.xz yum install gcc yum install yasm #源码编译yasm cd ffmpeg-5.1.2 ./configure --enable-shared --prefix=/usr/local/ffmpeg/ffmpeg-5.1.2 make make install
3.修改vim /etc/ld.so.conf.d/ffmpeg.conf,写入:/usr/local/ffmpeg/ffmpeg-5.1.2/lib
4.执行:ldconfig
5.添加到全局变量:
vi /etc/profile
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/local/ffmpeg/ffmpeg-5.1.2/lib/pkgconfig export FFMPEG_HOME=/usr/local/ffmpeg/ffmpeg-5.1.2 export PATH=$PATH:$FFMPEG_HOME
source /etc/profile
参考:https://blog.csdn.net/qq_38499019/article/details/122490377