Saturday, March 24, 2012

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; 

No comments:

Post a Comment