URL
EMBED
Page 0:
Page 1: RTMP, AMF
by aproxacs, enblink
Page 2: RTMP
• • • • • Real Time Messaging Protocol Big Endian 64 channels AMF 1935 port
Page 3: RTMP Header
Header & Channel
Unknown 4
Length 7
Packet Type
1
8
Source/Destination 12
Page 4: Header & Channel
• Header Type(2bit) + Channel ID(6bit)
• Header Type
– – – – Tiny(11) : 1 byte header Small(10) : 4 bytes header Medium(01) : 8 bytes header Large(00) : 12 bytes header
• Channel ID
– 64 channel ID
Page 5: Packet Type
• The type of AMF Object
Page 6: Chunk
• Chunk Size로 나뉘어서 전송된다. • 128 bytes • 협상에 의해 변경 가능
Page 7: Chunk
Page 8: Multiplexing
• 한 connection에 여러 개 의 RTMP Packet이 전송 될 수 있다.
Page 9: RTMP Body(AMF)
• • • • • Audio Video Shared Object Invoke Notify
Page 10: AMF
• ActionScript Message Format • Json 과 비슷.
– 문자열 대신 binary 이용
Page 11: AMF Data
• Type + Data
• Number
00 3f f0 00 00 00 00 00 00
(1.0)
• String
02 00 05 63 68 61 6E 67
(chang)
• Date
0B 41 D2 7C 0F DA 78 F5 C3 00 3C
(2009-04-23 오전10:14:01, +0100)
• Object
03 00 03 61 70 70 02 00 08 53 4f 53 61 6d 70 6c 65 00 00 09
({ “app” : “SOSample” })
Page 12: AMF Data Type
Page 13: AMF Object
• Name + Data 의 연속 • 00 00 09로 끝남.
Page 14: Example
Page 15: Invoke
Page 16: Invoke - result
Page 17: