New features in NGINX RTMP module: apps, flvs, dispatcher

Coding at night and morning have brought a great improvement! I have finally got application support. It looks similar to NGINX’s locations but much simpler (no partial matches, no regex etc). According to Adobe’s docs that’s exactly what RTMP protocol was designed for.

The next fix in writing FLVs. As it turned out FLV format is really simple to record from RTMP. Header is 100% constant. Stream data is saved in ‘tags’ which is nothing else but RTMP messages with headers. Two directives were added today: record & max_record.

There’s another very important improvement that was made today. I’ve finally implemented a dispatcher module for AMF0 calls – cmd_module. It registers callbacks for commonly used AMF0 calls (connect, play, publish etc) and does all AMF0-related job like reading query fields and replying with tons of protocol messages and reply objects.

Version 0.0.10 is now capable of live streaming, access control, flv recording.

New fixes lead to the following conf:

application mytv { 
 live on; 
 record /tmp/av; 
 record_size 3000000; 
} 
Advertisements

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: