Iray Programmer's Manual

RTMP server

The RTMP server implements the RTMP standard (see the RTMP specifications [RTMPProtocolChunkStream] , [RTMPMessageFormats] and [RTMPCommandMessages]) and, much like the HTTP server, allows you to write applications based upon C++. However, unlike HTTP-based applications, RTMP-based applications are event based. The client sends asynchronous command messages to the server, and the server responds to these command messages through a set of functions registered to handle such command messages. This is facilitated by the stateful nature of RTMP and greatly simplifies application development.

Another difference between RTMP- and HTTP-based applications can be seen in how efficiently they use TCP connections. HTTP-based applications tend to have the client send a request, wait for the server's response, then send another request. Due to the cost of establishing TCP connections, TCP's slow start and the congestion avoidance algorithms used in most operating systems, this mode of TCP connection utilization does not lead to optimal usage of the bandwidth available. RTMP, on the other hand, is bidirectional and can multiplex several logical flows over one connection, including keep alive and other meta data packets, thus avoiding the HTTP request/response round-trip behavior and the creation of new TCP connections. As a result, RTMP based applications lead to a more optimal usage of the available bandwidth and thus a richer user experience.

Neuray needs a video encoding plugin to be able to do video streaming unless the data to be streamed out is already video encoded. A video streaming plugin is installed like any other plugin: They are loaded explicitly in neuray using the mi::neuraylib::IPlugin_configuration::load_plugin_library() or mi::neuraylib::IPlugin_configuration::load_plugins_from_directory() methods. The latter allows you to offer automatic plugin loading from a specified directory.

Currently neuray comes with one bundled video plugin. This uses the so called "Flash screen video" format. It is a very simple format which can be played by the Flash client. The format provides only a very small reduction in the needed bandwidth and thus should only be used when the network between the server and the clients provides very high bandwidths - eg. for testing in a LAN.

Other video plugins providing more sophisticated formats may be made available as separate downloads.