Friday, April 13, 2012

More features in NGINX RTMP

The last updates in https://github.com/arut/nginx-rtmp-module include


  • Deferred connection close

  • Relative timing

  • Advanced stream recording


Deferred connection close has greatly simplified event handlers and made it possible to implement complex handlers in future without stability loss.

Relative timing is now implemented in module. Previously all the chunks generated had fmt=0 which means the had absolute timestamps. This was great from the point of audio/video synchronization but some versions of flash plugin failed to work with that. Besides zero-fmt chunks are the biggest among all chunk types. That lead to overhead in transmitted data size. Now relative timing is the default behavior (the old behavior is still possible with 'abstime on' directive). Currently fmt=0 chunk is the first in stream with succeeding fmt=1/3 chunks. That's exactly what RTMP spec advises. The problem with flash plugins is now solved.

More stream recording features are introduced in the most recent version of module:

  • record [off|all|audio|video|keyframes]*; # specify what kind of data should be recorded, can be mixed

  • record_suffix SUFFIX; # default is .flv

  • record_max_size SIZE; # max flv size

  • record_max_frames NFRAMES; # max number of frames to record

  • record_interval TIME; # re-record flv each TIME sec

No comments:

Post a Comment