[+] 协议

This commit is contained in:
acgist
2022-11-17 07:06:07 +08:00
parent d636d6b44a
commit e1d497f28e
79 changed files with 1650 additions and 387 deletions

92
docs/FFmpeg.md Normal file
View File

@@ -0,0 +1,92 @@
# FFmpeg
默认使用`ffmpeg-platform`所以不用安装如果使用本地FFmpeg需要自己安装。
## FFmpeg
```
# nasm
wget https://www.nasm.us/pub/nasm/releasebuilds/2.14/nasm-2.14.tar.gz
tar zxvf nasm-2.14.tar.gz
cd nasm-2.14
./configure --prefix=/usr/local/nasm
make -j && make install
# 环境变量
vim /etc/profile
export PATH=$PATH:/usr/local/nasm/bin
source /etc/profile
# yasm
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
tar zxvf yasm-1.3.0.tar.gz
cd yasm-1.3.0
./configure --prefix=/usr/local/yasm
make -j && make install
# 环境变量
vim /etc/profile
export PATH=$PATH:/usr/local/yasm/bin
source /etc/profile
# x264
git clone https://code.videolan.org/videolan/x264.git
cd x264
./configure --prefix=/usr/local/x264 --libdir=/usr/local/lib --includedir=/usr/local/include --enable-shared --enable-static
make -j && make install
# 环境变量
vim /etc/profile
export PATH=$PATH:/usr/local/x264/bin
source /etc/profile
# 编码解码
# acc
https://github.com/mstorsjo/fdk-aac.git
--enable-libfdk_aac
# vpx
https://github.com/webmproject/libvpx.git
--enable-libvpx
# x265
https://bitbucket.org/multicoreware/x265
--enable-libx265
# opus
https://archive.mozilla.org/pub/opus/opus-1.2.1.tar.gz
--enable-libopus
# ffmpeg
wget http://www.ffmpeg.org/releases/ffmpeg-4.3.1.tar.xz
tar xvJf ffmpeg-4.3.1.tar.xz
cd ffmpeg-4.3.1
./configure --prefix=/usr/local/ffmpeg --enable-gpl --enable-shared --enable-libx264
# --enable-cuda --enable-cuvid --enable-nvenc --nvcc=/usr/local/cuda-11.0/bin/nvcc
make -j && make install
# 环境变量
vim /etc/profile
export PATH=$PATH:/usr/local/ffmpeg/bin
source /etc/profile
# lib
vim /etc/ld.so.conf
/usr/local/x264/lib/
/usr/local/ffmpeg/lib/
ldconfig
# 查看版本
ffmpeg -version
# 查看编解码
ffmpeg -codecs
# 格式化文件
ffmpeg -y -i source.mkv -c copy target.mp4
# 查看文件格式
ffprobe -v error -show_streams -print_format json source.mp4
```
## GPU
```
驱动
# cuda
https://developer.nvidia.com/cuda-downloads
# nv-codec-headers
https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
# 验证
nvidia-smi
```

12
docs/LINK.md Normal file
View File

@@ -0,0 +1,12 @@
https://www.jianshu.com/p/fa047d7054eb
https://www.jianshu.com/p/59da3d350488
https://segmentfault.com/a/1190000039782685
https://www.cnblogs.com/bolingcavalry/p/15473808.html
http://www.manoner.com/post/音视频基础/WebRTC核心组件和协议栈/
https://blog.csdn.net/eguid_1/article/details/117277841
https://blog.csdn.net/xiang_6119/article/details/108779678
https://blog.csdn.net/qq_40321119/article/details/108336324
https://blog.csdn.net/ababab12345/article/details/115585378
https://blog.csdn.net/jisuanji111111/article/details/121634199
https://blog.csdn.net/weixin_48638578/article/details/120191152
https://blog.csdn.net/weixin_45565568/article/details/108929438