-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
v1_EN_RTMPHandshake
winlinvip edited this page Oct 30, 2014
·
19 revisions
The rtmp specification 1.0 defines the RTMP handshake:
- c0/s0: 1 bytes, specifies the protocol is RTMP or RTMPE/RTMPS.
- c1/s1: 1536 bytes, first 4 bytes is time, next 4 bytes is 0x00, 1528 random bytes.
- c2/s2: 1536 bytes, first 4 bytes is time echo, next 4 bytes is time, 1528 bytes c2==s1 and s2==c1. This is the simple handshake, the standard handshake, and the FMLE use this handshake.
While the server connected by flash player only support simple handshake, the flash player can only play the vp6 codec, and do not support h.264+aac. Adobe changed the simple handshake to encrypted complex handshake, see: Changed Handshake of RTMP
下表为总结:
握手方式 | 依赖库 | Flash播放 支持的编码 |
常见客户端 | SRS支持方式 | 用途 |
---|---|---|---|---|---|
Simple 标准握手 简单握手 |
不依赖 | vp6+mp3/speex | 所有客户端 | 支持 | 编码器,譬如FMLE,FFMPEG srs-librtmp(两种都支持,推荐用Simple) |
Complex 复杂握手 |
openssl | vp6+mp3/speex h264+aac |
Flash播放器 | 支持 | 主要是Flash播放器播放H264+aac流时需要, 其他都不需要 |
备注:SRS编译时若打开了SSL选项(--with-ssl),SRS会先使用复杂握手和客户端握手,若复杂握手失败,则尝试简单握手。
Winlin 2014.10
Welcome to SRS wiki!
Please select your language:
Please select your language:
Please select your language:
Please select your language:
Please select your language: