1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

for #367, design the config for exec.

This commit is contained in:
winlin 2015-08-23 21:53:20 +08:00
parent 5e48dab2b9
commit cbfe438e73

View file

@ -919,6 +919,26 @@ vhost same.vhost.forward.srs.com {
forward 127.0.0.1:1936 127.0.0.1:1937; 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 # the main comments for transcode
vhost example.transcode.srs.com { vhost example.transcode.srs.com {
# the streaming transcode configs. # the streaming transcode configs.