|
@ -23,9 +23,59 @@ I帧间隔:视频帧率*2 |
|
|
SVC:关闭 |
|
|
SVC:关闭 |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
## 修改 ffmpeg 参数(需要重新编译) |
|
|
|
|
|
``` |
|
|
|
|
|
# https://blog.csdn.net/my_name_is_learn/article/details/107408551 |
|
|
|
|
|
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg |
|
|
|
|
|
# or |
|
|
|
|
|
git clone -b release/5.0 https://github.com/FFmpeg/FFmpeg ffmpeg |
|
|
|
|
|
cd ffmpeg |
|
|
|
|
|
|
|
|
|
|
|
# 修改 udp.c 内的 UDP_MAX_PKT_SIZE 大小x10 |
|
|
|
|
|
#define UDP_MAX_PKT_SIZE (65536 * 10) |
|
|
|
|
|
|
|
|
|
|
|
mkdir build |
|
|
|
|
|
cd build |
|
|
|
|
|
sudo apt install yasm |
|
|
|
|
|
../configure |
|
|
|
|
|
make -j4 |
|
|
|
|
|
sudo make install |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
## jemalloc |
|
|
|
|
|
``` |
|
|
|
|
|
# https://github.com/jemalloc/jemalloc |
|
|
|
|
|
# https://github.com/aerospike/jemalloc/blob/master/INSTALL |
|
|
|
|
|
|
|
|
|
|
|
wget https://github.com/jemalloc/jemalloc/releases/download/5.3.0/jemalloc-5.3.0.tar.bz2 |
|
|
|
|
|
tar -xvf jemalloc-5.3.0.tar.bz2 |
|
|
|
|
|
cd jemalloc-5.3.0/ |
|
|
|
|
|
sudo apt -y install autogen autoconf |
|
|
|
|
|
./autogen.sh |
|
|
|
|
|
make -j4 |
|
|
|
|
|
sudo make install |
|
|
|
|
|
sudo ldconfig |
|
|
|
|
|
ldconfig -v | grep jemalloc |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
## 调整 ZLMediaKit 参数 |
|
|
## 调整 ZLMediaKit 参数 |
|
|
``` |
|
|
``` |
|
|
# 调试过程使用 Debug 版本,正式使用最好使用 Release 版本 |
|
|
git clone https://github.com/ZLMediaKit/ZLMediaKit |
|
|
|
|
|
cd ZLMediaKit |
|
|
|
|
|
git submodule update --init |
|
|
|
|
|
sudo apt install -y build-essential cmake |
|
|
|
|
|
mkdir build-debug build-release |
|
|
|
|
|
cd build-debug |
|
|
|
|
|
# 调试过程使用 Debug 版本,正式使用最好使用 Release 版本(默认 Debug) |
|
|
|
|
|
cmake -DCMKAE_BUILD_TYPE=Debug .. |
|
|
|
|
|
cmake -DCMKAE_BUILD_TYPE=Release .. |
|
|
|
|
|
# or |
|
|
|
|
|
vim CMakeLists.txt |
|
|
|
|
|
SET(CMAKE_BUILD_TYPE "Debug”) |
|
|
|
|
|
SET(CMAKE_BUILD_TYPE "Release") |
|
|
|
|
|
cmake .. |
|
|
|
|
|
make -j4 |
|
|
|
|
|
|
|
|
[api] |
|
|
[api] |
|
|
apiDebug=1 => 0 |
|
|
apiDebug=1 => 0 |
|
|
|
|
|
|
|
@ -71,12 +121,6 @@ reboot |
|
|
ulimit -a |
|
|
ulimit -a |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
## 修改 ffmpeg 参数(需要重新编译) |
|
|
|
|
|
``` |
|
|
|
|
|
# 修改 udp.c 内的 UDP_MAX_PKT_SIZE 大小x10 |
|
|
|
|
|
#define UDP_MAX_PKT_SIZE (65536 * 10) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
# 调试工具 |
|
|
# 调试工具 |
|
|
``` |
|
|
``` |
|
|
# 安装调试工具 |
|
|
# 安装调试工具 |
|
@ -100,5 +144,9 @@ cat /proc/net/snmp | grep -w Udp |
|
|
# 网络抓包 |
|
|
# 网络抓包 |
|
|
tcpdump #https://blog.csdn.net/weixin_36338224/article/details/107035214 |
|
|
tcpdump #https://blog.csdn.net/weixin_36338224/article/details/107035214 |
|
|
wireshark |
|
|
wireshark |
|
|
|
|
|
|
|
|
|
|
|
# 性能测试 |
|
|
|
|
|
# https://github.com/zlmediakit/ZLMediaKit/wiki/Benchmark |
|
|
|
|
|
|
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|