*** Welcome to piglix ***

Action Message Format

Action Message Format (AMF)
Internet media type application/octet-stream
Developed by Adobe Systems
Type of format Data exchange format
Container for Structured data

Action Message Format (AMF) is a binary format used to serialize object graphs such as ActionScript objects and XML, or send messages between an Adobe Flash client and a remote service, usually a Flash Media Server or third party alternatives. The Actionscript 3 language provides classes for encoding and decoding from the AMF format.

The format is often used in conjunction with Adobe's to establish connections and control commands for the delivery of streaming media. In this case, the AMF data is encapsulated in a chunk which has a header which defines things such as the message length and type (whether it is a "ping", "command" or media data).

AMF was introduced with Flash Player 6, and this version is referred to as AMF0. It was unchanged until the release of Flash Player 9 and ActionScript 3.0, when new data types and language features prompted an update, called AMF3. Flash Player 10 added vector and dictionary data types documented in a revised specification of January 2013.

Adobe Systems published the AMF binary data protocol specification on December 13, 2007 and announced that it will support the developer community to make this protocol available for every major server platform.

The following amf-packet is for transmission of messages outside of defined Adobe/Macromedia containers or transports such as Flash Video or the .

If either the header-length or message-length are unknown then they are set to -1 or 0xFFFFFFFF

uimsbf: unsigned integer, most significant bit first

simsbf: signed integer, most significant bit first

The format specifies the various data types that can be used to encode data. Adobe states that AMF is mainly used to represent object graphs that include named properties in the form of key-value pairs, where the keys are encoded as strings and the values can be of any data type such as strings or numbers as well as arrays and other objects. XML is supported as a native type. Each type is denoted by a single byte preceding the actual data. The values of that byte are as below (for AMF0):

AMF objects begin with a (0x03) followed by a set of key-value pairs and end with a (0x09) as value (preceded by 0x00 0x00 as empty key entry). Keys are encoded as strings with the (0x02) 'type-definition' byte being implied (not included in the message). Values can be of any type including other objects and whole object graphs can be serialized in this way. Both object keys and strings are preceded by two bytes denoting their length in number of bytes. This means that strings are preceded by a total of three bytes which includes the 0x02 type byte. Null types only contain their type-definition (0x05). Numbers are encoded as double-precision floating point and are composed of eight bytes.


...
Wikipedia

...