From 3a6d41d2d50ab17ce1dcc51a86621bb4582d9698 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E6=A5=9A?= <771730766@qq.com> Date: Fri, 10 Apr 2020 12:57:18 +0800 Subject: [PATCH] =?UTF-8?q?Created=20ZLMediaKit=E6=8E=A8=E6=B5=81=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=20(markdown)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ZLMediaKit推流测试.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 ZLMediaKit推流测试.md diff --git a/ZLMediaKit推流测试.md b/ZLMediaKit推流测试.md new file mode 100644 index 0000000..187a96f --- /dev/null +++ b/ZLMediaKit推流测试.md @@ -0,0 +1,32 @@ +## 推流测试 +ZLMediaKit支持rtsp/rtmp/rtp推流,一般通常使用obs/ffmpeg推流测试,其中FFmpeg推流命令支持以下: + +- 1、使用rtsp方式推流 +```bash +ffmpeg -re -i "/path/to/test.mp4" -vcodec h264 -acodec aac -f rtsp -rtsp_transport tcp rtsp://127.0.0.1/live/test +``` + +- 2、使用rtmp方式推流 +```bash +ffmpeg -re -i "/path/to/test.mp4" -vcodec h264 -acodec aac -f flv rtmp://127.0.0.1/live/test +``` + +- 3、使用rtp方式推流 +```bash +ffmpeg -re -i "/path/to/test.mp4" -vcodec h264 -acodec aac -f rtp_mpegts rtp://127.0.0.1:10000 +``` + +## 观察日志 +如果推流成功,会打印这种日志: +![image](https://user-images.githubusercontent.com/11495632/78963526-5568dd00-7b2a-11ea-850b-0af7d022aa2e.png) + +日志中相关字符串分别代表: +```bash +2020-04-10 12:51:52.331 I | regist rtsp __defaultVhost__ rtp 206442D7 + ^ ^ ^ ^ + schema vhost app stream_id +``` + +## 播放地址 +请按照[播放url规则](https://github.com/xiongziliang/ZLMediaKit/wiki/%E6%92%AD%E6%94%BEurl%E8%A7%84%E5%88%99)来播放上述的推流。 +