Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
ZLMediaKit
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
张翔宇
ZLMediaKit
Commits
50c45d78
Commit
50c45d78
authored
Sep 29, 2021
by
xiongziliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除不必要的文件或代码
parent
146fdf48
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
3 行增加
和
132 行删除
+3
-132
.github/FUNDING.yml
+0
-5
benchmark.md
+0
-40
build_for_linux.sh
+0
-20
build_for_mac.sh
+0
-18
conf/config.ini
+3
-3
server/main.cpp
+0
-46
没有找到文件。
.github/FUNDING.yml
deleted
100644 → 0
查看文件 @
146fdf48
# These are supported funding model platforms
custom
:
[
'
https://www.paypal.me/xiachu'
]
ko_fi
:
xiachu
issuehunt
:
xiongziliang
liberapay
:
xiachu
benchmark.md
deleted
100644 → 0
查看文件 @
146fdf48
# 测试环境
-
系统:Linux core 3.16.0-7-amd64 #1 SMP Debian 3.16.59-1 (2018-10-03) x86_64 GNU/Linux
-
内存:15G
-
CPU:Intel(R) Xeon(R) CPU E3-1220 v5 @ 3.00GHz;4核
-
网络:千兆网卡
-
测试端采用回环网络方式访问服务器
# 测试工具
ZLMeidaKit自带测试程序test_benchmark,其为单进程多线程模型
# 测试服务器
ZLMeidaKit自带测试服务器test_server,支持RTSP/RTMP/HLS服务器;多线程模型。
# 测试媒体流
使用test_server拉取的rtmp流
`rtmp://live.hkstv.hk.lxdns.com/live/hks1`
;然后通过test_server转发代理。
该码流大概300~400Kbit/s左右。
# 测试结果
说明:在cmake构建时,输入
`cmake .. -DCMKAE_BUILD_TYPE=Release`
以编译优化版本。
| 播放器个数(rtmp) | CPU(最大400%) | 内存(VIRT/RES) | 带宽(平均) | 丢包 |
| --- | --- | --- | --- | --- |
| 1000 | 20% | 702M/13M | 40 MByte/s | 无 |
| 2000 | 39% | 702M/18M | 80 MByte/s | 无 |
| 5000 | 92% | 702M/32M | 200 MByte/s | 无 |
| 10000 | 170% | 702M/59M | 400 MByte/s | 无 |
| 播放器个数(rtsp/tcp) | CPU(最大400%) | 内存(VIRT/RES) | 带宽(平均) | 丢包 |
| --- | --- | --- | --- | --- |
| 1000 | 18% | 702M/13M | 42 MByte/s| 无 |
| 2000 | 35% | 702M/19M | 82 MByte/s | 无 |
| 5000 | 80% | 702M/35M | 198 MByte/s | 无 |
| 10000 | 130% | 702M/62M | 405 MByte/s | 无 |
# srs性能对比
| 播放器个数(rtmp) | CPU(最大400%) | 内存(VIRT/RES) | 带宽(平均) | 丢包 |
| --- | --- | --- | --- | --- |
| 1000 | 10% | 310M/53M | 41.17 MByte/s | 无 |
| 2000 | 18% | 604M/117M | 83.86 MByte/s | 无 |
build_for_linux.sh
deleted
100755 → 0
查看文件 @
146fdf48
#!/bin/bash
cd
..
git clone
--depth
=
1 https://github.com/xia-chu/ZLMediaKit.git
cd
ZLMediaKit
git submodule init
git submodule update
sudo
apt-get install cmake
sudo
apt-get install libssl-dev
#sudo apt-get install libsdl-dev
#sudo apt-get install libavcodec-dev
#sudo apt-get install libavutil-dev
mkdir
-p
linux_build
rm
-rf
./build
ln
-s
./linux_build build
cd
linux_build
cmake ..
make
-j4
build_for_mac.sh
deleted
100755 → 0
查看文件 @
146fdf48
#!/bin/bash
cd
..
git clone
--depth
=
1 https://github.com/xia-chu/ZLMediaKit.git
cd
ZLMediaKit
git submodule init
git submodule update
brew install cmake
brew install openssl
brew install sdl
brew install ffmpeg
mkdir
-p
mac_build
rm
-rf
./build
ln
-s
./mac_build build
cd
mac_build
cmake ..
-DOPENSSL_ROOT_DIR
=
/usr/local/Cellar/openssl/1.0.2j/
make
-j4
conf/config.ini
查看文件 @
50c45d78
...
...
@@ -203,7 +203,7 @@ modifyStamp=0
#rtmp服务器监听端口
port
=
1935
#rtmps服务器监听地址
sslport
=
1935
0
sslport
=
0
[rtp]
#音频mtu大小,该参数限制rtp最大字节数,推荐不要超过1400
...
...
@@ -253,11 +253,11 @@ keepAliveSecond=15
#rtsp服务器监听地址
port
=
554
#rtsps服务器监听地址
sslport
=
322
sslport
=
0
[shell]
#调试telnet服务器接受最大bufffer大小
maxReqSize
=
1024
#调试telnet服务器监听端口
port
=
900
0
port
=
0
server/main.cpp
查看文件 @
50c45d78
...
...
@@ -172,45 +172,6 @@ public:
}
};
#if !defined(_WIN32)
static
void
inline
listen_shell_input
(){
cout
<<
"> 欢迎进入命令模式,你可以输入
\"
help
\"
命令获取帮助"
<<
endl
;
cout
<<
"> "
<<
std
::
flush
;
signal
(
SIGTTOU
,
SIG_IGN
);
signal
(
SIGTTIN
,
SIG_IGN
);
SockUtil
::
setNoBlocked
(
STDIN_FILENO
);
auto
oninput
=
[](
int
event
)
{
if
(
event
&
Event_Read
)
{
char
buf
[
1024
];
int
n
=
read
(
STDIN_FILENO
,
buf
,
sizeof
(
buf
));
if
(
n
>
0
)
{
buf
[
n
]
=
'\0'
;
try
{
CMDRegister
::
Instance
()(
buf
);
cout
<<
"> "
<<
std
::
flush
;
}
catch
(
ExitException
&
ex
)
{
InfoL
<<
"ExitException"
;
kill
(
getpid
(),
SIGINT
);
}
catch
(
std
::
exception
&
ex
)
{
cout
<<
ex
.
what
()
<<
endl
;
}
}
else
{
DebugL
<<
get_uv_errmsg
();
EventPollerPool
::
Instance
().
getFirstPoller
()
->
delEvent
(
STDIN_FILENO
);
}
}
if
(
event
&
Event_Error
)
{
WarnL
<<
"Event_Error"
;
EventPollerPool
::
Instance
().
getFirstPoller
()
->
delEvent
(
STDIN_FILENO
);
}
};
EventPollerPool
::
Instance
().
getFirstPoller
()
->
addEvent
(
STDIN_FILENO
,
Event_Read
|
Event_Error
|
Event_LT
,
oninput
);
}
#endif//!defined(_WIN32)
//全局变量,在WebApi中用于保存配置文件用
string
g_ini_file
;
...
...
@@ -369,13 +330,6 @@ int start_main(int argc,char *argv[]) {
installWebHook
();
InfoL
<<
"已启动http hook 接口"
;
#if !defined(_WIN32) && !defined(ANDROID)
if
(
!
bDaemon
)
{
//交互式shell输入
listen_shell_input
();
}
#endif
//设置退出信号处理函数
static
semaphore
sem
;
signal
(
SIGINT
,
[](
int
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论