Archive for May, 2012

Relays & H264 in NGINX RTMP module

New-style handshake has been implemented in nginx-rtmp-module. It’s based on s HMAC SHA256-signed random bytes sent in either direction. This kind of handshake is used by all recent Flash clients and is obligatory for playing H264 by such clients. Now both old-style & new-style handshake models are supported. H264 is now can be streamed by nginx-rtmp-module.

One of major features in nginx-rtmp-module is support of relays. Relays are needed for distributed data streaming. The module supports two relay models: push and pull. Push model lets you re-translate locally published stream to a remote RTMP server. Pull model makes it possible to take stream from remote machine and publish it locally. Relays are turned on with pull and push config directives.

Advertisements

2 Comments

RTMP statistics

A new feature implemented in NGINX RTMP is statistics page. It’s an XML document served by a newly created HTTP module within NGINX RTMP plugin. The XML is pretty simple. An XSL stylesheet ┬ástat.xsl is also supplied to watch statistics in browser without any other tools.

Here’s full XML the page above is build on:

<?xml version=”1.0″ encoding=”utf-8″ ?>
<?xml-stylesheet type=”text/xsl” href=”stat.xsl” ?>
<rtmp>
<in>283737441</in>
<out>282142039</out>
<bwin>655568</bwin>
<bwout>640736</bwout>
<server>
<application>
<name>myapp</name>
<live>
<stream>
<name>mystream</name>
<in>203864888</in>
<out>276771808</out>
<bwin>314048</bwin>
<bwout>628104</bwout>
<client><address>127.0.0.1</address><dropped>0</dropped><flashver>LNX 11,1,102,55</flashver><pageurl>http://localhost:8080/</pageurl></client&gt;
<client><address>127.0.0.1</address><dropped>0</dropped><flashver>LNX 11,1,102,55</flashver><pageurl>http://localhost:8080/</pageurl></client&gt;
<client><address>127.0.0.1</address><dropped>0</dropped><publishing/></client>
<nclients>3</nclients>
<publishing/>
</stream>
<stream>
<name>abc</name>
<in>74826873</in>
<out>0</out>
<bwin>329600</bwin>
<bwout>0</bwout>
<client><address>127.0.0.1</address><dropped>0</dropped><publishing/></client>
<nclients>1</nclients>
<publishing/>
</stream>
<nclients>4</nclients>
</live>
</application>
</server>
</rtmp>

2 Comments