From cbfe438e73a96e4e0f52d77daf3195073b6ea6e4 Mon Sep 17 00:00:00 2001 From: winlin Date: Sun, 23 Aug 2015 21:53:20 +0800 Subject: [PATCH] for #367, design the config for exec. --- trunk/conf/full.conf | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/trunk/conf/full.conf b/trunk/conf/full.conf index 340ae4626c..f538e4522f 100644 --- a/trunk/conf/full.conf +++ b/trunk/conf/full.conf @@ -919,6 +919,26 @@ vhost same.vhost.forward.srs.com { forward 127.0.0.1:1936 127.0.0.1:1937; } +# the vhost for exec, fork process when publish stream. +vhost exec.srs.com { + # the exec used to fork process when got some event. + exec { + # whether enable the exec. + # default: off. + enabled off; + # when publish stream, exec the process with variables: + # [vhost] the input stream vhost. + # [port] the intput stream port. + # [app] the input stream app. + # [stream] the input stream name. + # [engine] the tanscode engine name. + # other variables for exec only: + # [url] the rtmp url which trigger the publish. + # @remark empty to ignore this exec. + publish ./objs/ffmpeg/bin/ffmpeg -f flv -i [url] -vcodec copy -acodec copy -f flv ./[stream].flv; + } +} + # the main comments for transcode vhost example.transcode.srs.com { # the streaming transcode configs.