3月 092015
 

在CentOS 6.5环境中安装依赖软件包,使用git下载最新版本st-load源码包

 [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.768x320.flv -c 1 -r rtmp://127.0.0.1:1935/live/livestream

模拟RTMP多路推流用户

./st_rtmp_publish -i doc/source.200kbps.768x320.flv -c 1000 -r rtmp://127.0.0.1:1935/live/livestream_{i}

支持RTMP流播放测试,一个进程支持5k并发
支持RTMP流推流测试,一个进程支持500个并发。

相关下载:
(1) SRS Bench (原st-load,最后更新:20151231)

  32 Responses to “RTMP与HLS压力测试工具安装与配置”

  1. 可以把st-load包发给我一下吗?网站一直下不下来。非常感谢`
    xuehua0302@163.com

  2. 你好,./st_rtmp_publish -i doc/source.200kbps.768×320.flv -c 1 -r rtmp://127.0.0.1:1935/live/livestream。这条推送命令可以推送其他格式的视频吗?例如mp4格式的

  3. 我使用这个st-load推送一路rtmp到我的nginx流媒体服务器上,没能生成m3u8文件。求大神指教。

  4. ./st_rtmp_publish 这个可以做到发布特定规格、一定码流的源吗?比如720P 1M码流

  5. 你好 可以发给我一下吗 下载不下来 taojishou@qq.com谢谢

  6. 你好,可以给我也发一下吗?急需中呢。331496772@qq.com,多谢!

  7. 可以给我一份st-load吗谢谢!949297882@qq.com

  8. root@rbs:/home/srs-bench/srs-bench-master/objs# ./sb_rtmp_load -c 1 -r rtmp://192.168.6.210:1935/vod//2016062413502336/movie/videos/1_1.mp4
    [2016-07-01 08:56:11.766][0][trace] params url=rtmp://192.168.6.210:1935/vod//2016062413502336/movie/videos/1_1.mp4, threads=1, start=5.00, delay=1.00, error=3.00, report=30.00, count=0
    [2016-07-01 08:56:11.767][0][trace] create thread for task #1 success
    [2016-07-01 08:56:11.767] [report] [32023] threads:0 alive:0 duration:0 tduration:0 nread:0.00 nwrite:0.00 tasks:0 etasks:0 stasks:0 estasks:0
    [2016-07-01 08:56:11.767][1][trace] start random sleep 4728ms
    [2016-07-01 08:56:16.499][1][trace] start to process RTMP play task #1, schema=rtmp, host=192.168.6.210, port=1935, tcUrl=rtmp://192.168.6.210:1935/vod, stream=/2016062413502336/movie/videos/1_1.mp4, startup=5.00, delay=1.00, error=3.00, count=0
    [2016-07-01 08:56:16.502][1][error] rtmp client connect tcUrl failed. ret=104 errno=104(Connection reset by peer)
    [2016-07-01 08:56:16.502][1][error] rtmp client dump url failed. ret=104 errno=104(Connection reset by peer)

    请问下这个日志是不是表面没有连上啊

  9. [root@wowzatest02 objs]# ./sb_hls_load -c 1 -r http://127.0.0.1:1935/live/test.stream/playlist.m3u8
    [2016-07-22 12:43:20.201][0][trace] params url=http://127.0.0.1:1935/live/test.stream/playlist.m3u8, vod=0, threads=1, start=5.00, delay=-1.00, error=3.00, report=30.00, count=0
    [2016-07-22 12:43:20.201][0][trace] create thread for task #1 success
    [2016-07-22 12:43:20.201] [report] [25659] threads:0 alive:0 duration:0 tduration:0 nread:0.00 nwrite:0.00 tasks:0 etasks:0 stasks:0 estasks:0
    [2016-07-22 12:43:20.201][1][trace] start random sleep 4477ms
    [2016-07-22 12:43:24.682][1][trace] start to process HLS task #1, schema=http, host=127.0.0.1, port=1935, path=/live/test.stream/playlist.m3u8, startup=5.00, delay=-1.00, error=3.00, count=0
    [2016-07-22 12:43:24.693][1][trace] [HLS] get m3u8 http://127.0.0.1:1935/live/test.stream/playlist.m3u8 get success, length=130
    [2016-07-22 12:43:24.693][1][error] invalid url=http://127.0.0.1/live/test.stream/playlist.m3u8?wowzasessionid=931503606, endpoint change from 127.0.0.1:1935 to 127.0.0.1:80 errno=11(Resource temporarily unavailable)
    [2016-07-22 12:43:24.693][1][error] http client check url failed. ret=501 errno=11(Resource temporarily unavailable)
    [2016-07-22 12:43:24.693][1][error] http client download ts file http://127.0.0.1/live/test.stream/playlist.m3u8?wowzasessionid=931503606 failed. ret=501 errno=11(Resource temporarily unavailable)
    [2016-07-22 12:43:24.693][1][error] http client download m3u8 ts file failed. ret=501 errno=11(Resource temporarily unavailable)
    [2016-07-22 12:43:24.693][1][error] http client process m3u8 failed. ret=501 errno=11(Resource temporarily unavailable)

    不好意思打扰你了,请问上面报错是什么原因导致呢?

  10. 可以支持rtmpt协议吗

  11. 你好,在使用http_load测试时,1个client就会把带宽都占满,是什么原因啊?

  12. 那位大神能给我一个包:st-load。谢谢
    550441318@qq.com

  13. 可以同时模拟3种或者6种协议吗?

  14. ./st_hls_load –clients=1 –url=http://127.0.0.1:8080/live_hls/ch4/index.m3u8
    [2017-03-24 15:53:22.823][0][trace] params url=http://10.138.71.165:8080/live_hls/ch4/index.m3u8, vod=0, threads=1, start=5.00, delay=-1.00, error=10.00, report=30.00, count=0
    [2017-03-24 15:53:22.823][0][trace] create thread for task #1 success
    [2017-03-24 15:53:22.823] [report] [65091] threads:0 alive:0 duration:0 tduration:0 nread:0.00 nwrite:0.00 tasks:0 etasks:0 stasks:0 estasks:0
    [2017-03-24 15:53:22.823][1][trace] start random sleep 3859ms
    [2017-03-24 15:53:26.685][1][trace] start to process HLS task #1, schema=http, host=10.138.71.165, port=8080, path=/live_hls/ch4/index.m3u8, startup=5.00, delay=-1.00, error=10.00, count=0
    [2017-03-24 15:53:26.686][1][trace] [HLS] get m3u8 http://10.138.71.165:8080/live_hls/ch4/index.m3u8 get success, length=116
    [2017-03-24 15:53:26.738][1][trace] [TS] url=http://10.138.71.165:8080/live_hls/ch4/0.ts download, duration=15.10, delay=-1.00, size=2017804, sleep 10942ms
    [2017-03-24 15:53:37.691][1][error] read body from server failed. ret=104 errno=104(Connection reset by peer)
    [2017-03-24 15:53:37.691][1][error] parse response header failed. ret=104 errno=104(Connection reset by peer)
    [2017-03-24 15:53:37.691][1][error] http client parse response failed. ret=104 errno=104(Connection reset by peer)
    [2017-03-24 15:53:37.691][1][error] http client get m3u8 failed. ret=104 errno=104(Connection reset by peer)
    [2017-03-24 15:53:37.691][1][error] http client process m3u8 failed. ret=104 errno=104(Connection reset by peer)
    [2017-03-24 15:53:47.702][1][trace] [HLS] get m3u8 http://10.138.71.165:8080/live_hls/ch4/index.m3u8 get success, length=158
    [2017-03-24 15:53:47.724][1][trace] [TS] url=http://10.138.71.165:8080/live_hls/ch4/1.ts download, duration=10.43, delay=-1.00, size=2424072, sleep 8125ms
    [2017-03-24 15:53:52.827] [report] [65091] threads:1 alive:2 duration:30 tduration:5 nread:1.18 nwrite:0.00 tasks:3 etasks:1 stasks:2 estasks:0
    [2017-03-24 15:53:55.851][1][error] read body from server failed. ret=104 errno=104(Connection reset by peer)
    [2017-03-24 15:53:55.851][1][error] parse response header failed. ret=104 errno=104(Connection reset by peer)
    [2017-03-24 15:53:55.851][1][error] http client parse response failed. ret=104 errno=104(Connection reset by peer)

    你好,请问一下ts下载失败是什么问题啊

  15. [root@hpweb1 srs-bench]# ./objs/sb_rtmp_publish -i /home/test/013.flv -c 1 -r rtmp://120.78.154.230:1936/live/livestream
    [2017-11-03 18:11:50.717][0][trace] params url=rtmp://120.78.154.230:1936/live/livestream, threads=1, start=5.00, delay=1.00, error=3.00, report=30.00, count=0
    [2017-11-03 18:11:50.717][0][trace] create thread for task #1 success
    [2017-11-03 18:11:50.717] [report] [26735] threads:0 alive:0 duration:0 tduration:0 nread:0.00 nwrite:0.00 tasks:0 etasks:0 stasks:0 estasks:0
    [2017-11-03 18:11:50.717][1][trace] start random sleep 3883ms
    [2017-11-03 18:11:54.601][1][trace] start to process RTMP publish task #1, schema=rtmp, host=120.78.154.230, port=1936, tcUrl=rtmp://120.78.154.230:1936/live, stream=livestream, startup=5.00, delay=1.00, error=3.00, count=0
    [2017-11-03 18:11:57.743][1][error] rtmp client publish stream failed. ret=2003 errno=11(Resource temporarily unavailable)
    [2017-11-03 18:11:57.743][1][error] rtmp client publish url failed. ret=2003 errno=11(Resource temporarily unavailable)
    [2017-11-03 18:12:03.905][1][error] rtmp client publish stream failed. ret=2003 errno=11(Resource temporarily unavailable)
    [2017-11-03 18:12:03.905][1][error] rtmp client publish url failed. ret=2003 errno=11(Resource temporarily unavailable)
    [2017-11-03 18:12:10.052][1][error] rtmp client publish stream failed. ret=2003 errno=11(Resource temporarily unavailable)
    [2017-11-03 18:12:10.052][1][error] rtmp client publish url failed. ret=2003 errno=11(Resource temporarily unavailable)
    ^C
    [root@hpweb1 srs-bench]# ./objs/sb_rtmp_publish -i /home/test/013.flv -c 1 -r rtmp://120.78.154.230:1936/live/livestream
    [2017-11-03 18:12:40.542][0][trace] params url=rtmp://120.78.154.230:1936/live/livestream, threads=1, start=5.00, delay=1.00, error=3.00, report=30.00, count=0
    [2017-11-03 18:12:40.542][0][trace] create thread for task #1 success
    [2017-11-03 18:12:40.542] [report] [26746] threads:0 alive:0 duration:0 tduration:0 nread:0.00 nwrite:0.00 tasks:0 etasks:0 stasks:0 estasks:0
    [2017-11-03 18:12:40.542][1][trace] start random sleep 4219ms
    [2017-11-03 18:12:44.766][1][trace] start to process RTMP publish task #1, schema=rtmp, host=120.78.154.230, port=1936, tcUrl=rtmp://120.78.154.230:1936/live, stream=livestream, startup=5.00, delay=1.00, error=3.00, count=0
    [2017-11-03 18:12:45.927][1][error] rtmp client publish stream failed. ret=2003 errno=11(Resource temporarily unavailable)
    [2017-11-03 18:12:45.927][1][error] rtmp client publish url failed. ret=2003 errno=11(Resource temporarily unavailable)
    [2017-11-03 18:12:50.090][1][error] rtmp client publish stream failed. ret=2003 errno=11(Resource temporarily unavailable)
    [2017-11-03 18:12:50.090][1][error] rtmp client publish url failed. ret=2003 errno=11(Resource temporarily unavailable)

    你好,请问一下这个问题是什么原因啊,文件的格式没有问题啊

Leave a Reply to tiantian Cancel reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据