1.运行ZLMediaKit

2.通过ffmpeg把视频源推流给ZLMediaKit
执行以下命令,将本地视频通过RTSP协议推流给ZLMediaKit。
ffmpeg -re -stream_loop -1 -i "D:\workplace\armgb\public\1.fileh264" -vcodec h264 -f rtsp rtsp://127.0.0.1/live/test
若想将本地视频通过RTMP协议推流给ZLMediaKit,则需执行以下命令。
ffmpeg -re -i "D:\workplace\armgb\public\1.fileh264" -vcodec h264 -acodec aac -f flv rtmp://127.0.0.1/live/test

打开VLC播放器,依次选择菜单"媒体"→"打开网络串流",在网络URL框中输入下列任一地址,观看能否正常播放视频画面。
rtsp://124.***.***.***/live/test
rtmp://124.***.***.***/live/test
http://124.***.***.***:8080/live/test/hls.m3u8
http://124.***.***.***:8080/live/test.live.ts
http://124.***.***.***:8080/live/test.live.mp4
http://124.***.***.***:8080/live/test.live.flv
注意需要把上述地址中的"124.***.***.***"替换为流媒体服务器实际的公网地址,或者127.0.0.1。

