DoubleLi

qq: 517712484 wx: ldbgliet

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
  4737 随笔 :: 2 文章 :: 542 评论 :: 1615万 阅读
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

http://blog.csdn.net/sinat_34194127/article/details/50816045

 



[root@localhost ~]# yum install git unzip patch gcc gcc-c++ make
[root@localhost ~]# git clone https://github.com/winlinvip/st-load.git

[root@localhost st-load]# ./configure
[root@localhost st-load]# make

[root@localhost st-load]# ls objs/
http-parser-2.1 src st_hls_load st_rtmp_load st_rtmp_publish
Makefile st-1.9 st_http_load st_rtmp_load_fast
[root@localhost st-load]#
模拟RTMP用户
./st_rtmp_load -c 1 -r rtmp://127.0.0.1:1935/live/livestream
模拟HLS直播用户
./st_hls_load -c 1 -r http://127.0.0.1:3080/hls/hls.m3u8
模拟HSL点播用户
./st_hls_load -c 10000 -o -r http://127.0.0.1:3080/hls/hls.m3u8
模拟RTMP推流用户
./st_rtmp_publish -i doc/source.200kbps.768×320.flv -c 1 -r rtmp://127.0.0.1:1935/live/livestream
模拟RTMP多路推流用户
./st_rtmp_publish -i doc/source.200kbps.768×320.flv -c 1000 -r rtmp://127.0.0.1:1935/live/livestream_{i}

支持RTMP流播放测试,一个进程支持5k并发
支持RTMP流推流测试,一个进程支持500个并发。
 
build ok, you can:
     ./objs/sb_http_load
     ./objs/sb_hls_load
     ./objs/sb_rtmp_load
     ./objs/sb_rtmp_load_fast
     ./objs/sb_rtmp_publish
 
Examples:
1. start a client
   ./objs/sb_rtmp_load_fast -c 1 -r rtmp://127.0.0.1:1935/live/livestream
2. start 1000 clients
   ./objs/sb_rtmp_load_fast -c 1000 -r rtmp://127.0.0.1:1935/live/livestream
3. start 10000 clients
   ./objs/sb_rtmp_load_fast -c 10000 -r rtmp://127.0.0.1:1935/live/livestream
4. start 100000 clients
   ./objs/sb_rtmp_load_fast -c 100000 -r rtmp://127.0.0.1:1935/live/livestream
 
实例: 
./objs/sb_rtmp_load -c 500 -r rtmp://172.17.14.88:1935/live/BHIP91_172.17.17.185_1
 
./objs/sb_hls_load -c 1 -r http://172.17.14.88:10000/hls/BHIP91_172.17.17.183_1_sd.m3u8
 

Examples:
1. start a client
   ./objs/sb_hls_load -c 1 -r http://127.0.0.1:3080/hls/hls.m3u8
2. start 1000 clients
   ./objs/sb_hls_load -c 1000 -r http://127.0.0.1:3080/hls/hls.m3u8
3. start 10000 clients
   ./objs/sb_hls_load -c 10000 -r http://127.0.0.1:3080/hls/hls.m3u8
4. start 100000 clients
   ./objs/sb_hls_load -c 100000 -r http://127.0.0.1:3080/hls/hls.m3u8
5. start 10000 vod clients
   ./objs/sb_hls_load -c 10000 -o -r http://127.0.0.1:3080/hls/hls.m3u8
posted on   DoubleLi  阅读(2192)  评论(0编辑  收藏  举报
编辑推荐:
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!
历史上的今天:
2017-01-16 hisi出的H264码流结构
2014-01-16 windows消息处理(强烈推荐,收藏)
2013-01-16 Button按钮响应鼠标按下与弹起消息
2012-01-16 Asp.net中服务端控件事件是如何触发的
点击右上角即可分享
微信分享提示