mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-03 08:57:32 +08:00
Created ZLMediaKit推流测试 (markdown)
32
ZLMediaKit推流测试.md
Normal file
32
ZLMediaKit推流测试.md
Normal file
@@ -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
|
||||
```
|
||||
|
||||
## 观察日志
|
||||
如果推流成功,会打印这种日志:
|
||||

|
||||
|
||||
日志中相关字符串分别代表:
|
||||
```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)来播放上述的推流。
|
||||
|
||||
Reference in New Issue
Block a user