Skip to content

migrate_v5_EN_nginx exec

winlin edited this page Jul 31, 2022 · 1 revision

HOME > EN > Exec

Exec

NGINX RTMP EXEC

SRS only support some exec introduced by NGINX RTMP:

  1. exec/exec_publish: Support.
  2. exec_pull: Not support.
  3. exec_play: Not support.
  4. exec_record_done: Not support.

Note: You could use HTTP Callback to start FFmpeg on your backend server. It's much better solution.

Config

The config for SRS EXEC list bellow, you can refer to 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.8

Welcome to SRS wiki!

SRS 5.0 wiki

Please select your language:

SRS 4.0 wiki

Please select your language:

SRS 3.0 wiki

Please select your language:

SRS 2.0 wiki

Please select your language:

SRS 1.0 wiki

Please select your language:

Clone this wiki locally