-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
v1_EN_DeliveryRTMP
The kernel feature of SRS is RTMP.
The RTMP and HLS, see: HLS
Compoare the RTMP and HLS, see: RTMP PK HLS
How to deploy SRS to support RTMP: Usage: RTMP
RTMP the first supported video stream for flash, and the best realtime stream on PC flash:
- No plugin: The flash plugin already installed on almost all PC, no need other plugin to play the RTMP stream.
- Fast develop player: Only need 7lines to play a RTMP stream for flash. It is very complex to play the HLS or HDS on PC flash.
- Industrial-strength: RTMP server and flash player is very stable for RTMP.
- Realtime Stream for internet: RTMP latency in 0.8-3s, can be used in live show or meeting.
- The actual standard for encoder output for internet: RTMP is the actual standard protocol, for all encoder to publish stream to internet server, server will mux the RTMP to HLS, HDS or DASH.
SRS live streaming use RTMP as kernel protocol.
SRS vod streaming is in plan and use HTTP protocol.
RTMP最初就是adobe在flash上的协议,flash播放RTMP只需要几行as代码:
var conn = new NetConnection();
var stream = new NetStream(conn);
var video = new Video();
this.addChild(video);
video.attachNetStream(stream);
conn.connect("rtmp://192.168.1.170/live");
stream.play("livestream");
SRS只需要配置vhost和侦听端口就可以支持RTMP(vhost内容参考vhost):
listen 1935;
vhost __defaultVhost__ {
}
启动服务器:./objs/srs -c conf/rtmp.conf
可以使用支持RTMP输出的编码器,譬如FMLE。在FMS URL中输入vhost/app,在Stream中输入流名称。譬如:
# 譬如RTMP流:rtmp://192.168.1.170/live/livestream
FMS URL: rtmp://192.168.1.170/live
Stream: livestream
RTMP的URL规则,Vhost规则,参考:RTMP URL&Vhost
部署分发RTMP流的实例,参考:Usage: RTMP
如下图所示:
可以使用支持RTMP流的播放器播放,譬如vlc/flash player,播放地址:rtmp://192.168.1.170/live/livestream
srs提供flash的播放器和编码器,支持在线播放RTMP/HLS流,参考:srs
RTMP流的延时在1-3秒,比HLS的延时更靠谱,低延时的配置参考:低延时
Winlin 2014.11
Welcome to SRS wiki!
Please select your language:
Please select your language:
Please select your language:
Please select your language:
Please select your language: