-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
migrate_v5_CN_nginx exec
winlin edited this page Jul 31, 2022
·
1 revision
Note: 如果觉得Github的Wiki访问太慢,可以访问 Gitee 镜像。
NGINX-RTMP支持的EXEC方式,参考nginx exec,SRS只支持常用的几种。下面是exec的支持情况:
- exec/exec_publish: 当发布流时调用,支持。
- exec_pull: 不支持。
- exec_play: 不支持。
- exec_record_done: 不支持。
Note: 可以使用HTTP Callback,回调你的业务服务器,再启动FFmpeg处理对应的流。这是更灵活,也是更合适的方案。
SRS EXEC的配置参考conf/exec.conf
,如下:
vhost __defaultVhost__ {
# 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.
# [tcUrl] the client request tcUrl.
# [swfUrl] the client request swfUrl.
# [pageUrl] the client request pageUrl.
# @remark empty to ignore this exec.
publish ./objs/ffmpeg/bin/ffmpeg -f flv -i [url] -c copy -y ./[stream].flv;
}
}
Winlin 2015.08
Welcome to SRS wiki!
Please select your language:
Please select your language:
Please select your language:
Please select your language:
Please select your language: