composer create-project xiaosongshu/rtmp_server
php server.php
启动成功输出示例:
[INFO] RTMP Server started on 0.0.0.0:1935
[INFO] HTTP-FLV/WS-FLV Server started on 0.0.0.0:8501
[INFO] HTTP Static Server started on 0.0.0.0:80
http://127.0.0.1/push.htmlhttp://127.0.0.1/flv_push.htmlffmpeg -re -stream_loop -1 -i video.mp4 -c:v libx264 -c:a aac -f flv rtmp://127.0.0.1:1935/live/stream
rtmp://127.0.0.1:1935/live/streamphp pusher.php test.mp4 http://127.0.0.1:8501/live/stream
浏览器访问:http://127.0.0.1/index.html