Archive for October, 2012

Updates in Video-on-demand engine

New updates in nginx-rtmp VOD engine include

  • seamless and fast pause
  • improved seek timing
  • improved mp4 seek with keyframe lookup

I remember I was asked to fix some these issues. Please send the feedback.

There’s another VOD-related feature (already in master) I’m going to describe later.
Stay tuned!


Leave a comment

RTMP client dropper

Today I’ve added a new feature to control module – connection dropper. Now you can drop client connections using simple HTTP request.

A new article about rtmp_control module describes that (as well as formerly implemented record feature) in more detail.


Russian nginx-rtmp group

Some people asked me for Russian discussion group.
I’ve created one:

However it’s still better to use nginx-rtmp (english) if you’re able to write in English.

Leave a comment

Debug log instruction

To simplify problem solving I’ve written a tiny article about how to turn on debug logging.

Leave a comment

Exec kill signal

Today I have added new directive exec_kill_signal to set termination signal for child processes. Default signal is SIGKILL which is not the best choice in some cases. You can set a different signal using numeric or symbolic name. A simple example:

exec_kill_signal term;

The new feature makes it possible to write exec wrapper in any language. Here’s a new wiki article about writing them in bash.

Leave a comment

Discussion group/mailing list for the nginx-rtmp project

I have created google group for nginx-rtmp:

Mailing list is also supported there.

Feel free to discuss & post feature requests there.

Leave a comment

HTTP Control module and recorder control

Until now nginx-rtmp had no control interface. Today I want to announce nginx-rtmp control module. It’s plain HTTP module within nginx-rtmp package (like stat module) which makes it possible to change rtmp module behavior and toggle features on the fly.

To enable nginx-rtmp control use the following directive within HTTP location

http {
    server {
        location control {
            rtmp_control all;

That looks very much like rtmp_stat directive.

At the moment only one control feature is implemented in control module – record control. With this you can manually start and stop recording at any moment of time.

Assume you have the following application within rtmp section of nginx.conf:

application myapp {
    live on;
    recorder rec {
        record all manual;
        record_path /var/rec;

Notice manual option in record directive. That means the recorder will never be started automatically. Instead you should register rtmp control with HTTP section of nginx.conf (I’ll use the above mentioned control configuration) and call control URL to start or stop recording. Recorder control methods return file path.

Recorder URL format:


The following arguments are supported:

  • srv – optional server number, default is 0 (first server)
  • app – required application name
  • rec – optional recorder name, default is empty (default recorder)
  • name – required stream name

If you have stream mystream active then the following command will start recording:

curl 'http://localhost:8080/control/record/start?app=myapp&name=mystream&rec=rec'

The call returns full path /var/rec/mystream.flv.

Stopping is very much the same

curl 'http://localhost:8080/control/record/stop?app=myapp&name=mystream&rec=rec'

Project page