Shell-style exec redirects in 0.9.17

The new feature is shell-style redirects in exec-family directives. Now you can save ffmpeg (or any other executed child) output in file and pass input to it (makes no sense with ffmpeg however).

    application myapp {
        live on;
        exec ffmpeg -i rtmp://localhost/myapp/$name -c copy 
                    -f flv rtmp://example.com/myapp/$name 2>>/var/log/ffmpeg-$name.log;
    }

Now you have a single log file like /var/log/ffmpeg-mystream.log for each stream where you can find all ffmpeg output including errors. You can redirect stdout (1>/var/log/ffmpeg-$name.out) and any other stream (1>&2) as well. Both truncate > and append >> modes are supported as well as usual variable substitutions .

Advertisements
  1. #1 by SpiderX on May 1, 2013 - 12:08 pm

    Should this feature work with exec_static directive?

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: