|
|
|
@ -226,64 +226,134 @@ http_server {
|
|
|
|
|
#############################################################################################
|
|
|
|
|
# the streamer cast stream from other protocol to SRS over RTMP.
|
|
|
|
|
# @see https://github.com/ossrs/srs/tree/develop#stream-architecture
|
|
|
|
|
|
|
|
|
|
# MPEGTS over UDP
|
|
|
|
|
stream_caster {
|
|
|
|
|
# whether stream caster is enabled.
|
|
|
|
|
# default: off
|
|
|
|
|
enabled off;
|
|
|
|
|
enabled on;
|
|
|
|
|
# the caster type of stream, the casters:
|
|
|
|
|
# mpegts_over_udp, MPEG-TS over UDP caster.
|
|
|
|
|
# rtsp, Real Time Streaming Protocol (RTSP).
|
|
|
|
|
# flv, FLV over HTTP by POST.
|
|
|
|
|
caster mpegts_over_udp;
|
|
|
|
|
# the output rtmp url.
|
|
|
|
|
# for mpegts_over_udp caster, the typically output url:
|
|
|
|
|
# rtmp://127.0.0.1/live/livestream
|
|
|
|
|
output rtmp://127.0.0.1/live/livestream;
|
|
|
|
|
# the listen port for stream caster.
|
|
|
|
|
# for mpegts_over_udp caster, listen at udp port. for example, 8935.
|
|
|
|
|
listen 8935;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# RTSP
|
|
|
|
|
stream_caster {
|
|
|
|
|
# whether stream caster is enabled.
|
|
|
|
|
# default: off
|
|
|
|
|
enabled on;
|
|
|
|
|
# the caster type of stream, the casters:
|
|
|
|
|
# rtsp, Real Time Streaming Protocol (RTSP).
|
|
|
|
|
caster rtsp;
|
|
|
|
|
# the output rtmp url.
|
|
|
|
|
# for rtsp caster, the typically output url:
|
|
|
|
|
# rtmp://127.0.0.1/[app]/[stream]
|
|
|
|
|
# for example, the rtsp url:
|
|
|
|
|
# rtsp://192.168.1.173:8544/live/livestream.sdp
|
|
|
|
|
# where the [app] is "live" and [stream] is "livestream", output is:
|
|
|
|
|
# rtmp://127.0.0.1/live/livestream
|
|
|
|
|
# for flv caster, the typically output url:
|
|
|
|
|
# rtmp://127.0.0.1/[app]/[stream]
|
|
|
|
|
# for example, POST to url:
|
|
|
|
|
# http://127.0.0.1:8936/live/livestream.flv
|
|
|
|
|
# where the [app] is "live" and [stream] is "livestream", output is:
|
|
|
|
|
# rtmp://127.0.0.1/live/livestream
|
|
|
|
|
output rtmp://127.0.0.1/live/livestream;
|
|
|
|
|
output rtmp://127.0.0.1/[app]/[stream];
|
|
|
|
|
# the listen port for stream caster.
|
|
|
|
|
# for mpegts_over_udp caster, listen at udp port. for example, 8935.
|
|
|
|
|
# for rtsp caster, listen at tcp port. for example, 554.
|
|
|
|
|
# for flv caster, listen at tcp port. for example, 8936.
|
|
|
|
|
# TODO: support listen at <[ip:]port>
|
|
|
|
|
listen 8935;
|
|
|
|
|
listen 554;
|
|
|
|
|
# for the rtsp caster, the rtp server local port over udp,
|
|
|
|
|
# which reply the rtsp setup request message, the port will be used:
|
|
|
|
|
# [rtp_port_min, rtp_port_max)
|
|
|
|
|
rtp_port_min 57200;
|
|
|
|
|
rtp_port_max 57300;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# FLV
|
|
|
|
|
stream_caster {
|
|
|
|
|
enabled off;
|
|
|
|
|
caster mpegts_over_udp;
|
|
|
|
|
output rtmp://127.0.0.1/live/livestream;
|
|
|
|
|
listen 8935;
|
|
|
|
|
}
|
|
|
|
|
stream_caster {
|
|
|
|
|
enabled off;
|
|
|
|
|
caster rtsp;
|
|
|
|
|
output rtmp://127.0.0.1/[app]/[stream];
|
|
|
|
|
listen 554;
|
|
|
|
|
rtp_port_min 57200;
|
|
|
|
|
rtp_port_max 57300;
|
|
|
|
|
}
|
|
|
|
|
stream_caster {
|
|
|
|
|
enabled off;
|
|
|
|
|
# whether stream caster is enabled.
|
|
|
|
|
# default: off
|
|
|
|
|
enabled on;
|
|
|
|
|
# the caster type of stream, the casters:
|
|
|
|
|
# flv, FLV over HTTP by POST.
|
|
|
|
|
caster flv;
|
|
|
|
|
# the output rtmp url.
|
|
|
|
|
# for flv caster, the typically output url:
|
|
|
|
|
# rtmp://127.0.0.1/[app]/[stream]
|
|
|
|
|
# for example, POST to url:
|
|
|
|
|
# http://127.0.0.1:8936/live/livestream.flv
|
|
|
|
|
# where the [app] is "live" and [stream] is "livestream", output is:
|
|
|
|
|
# rtmp://127.0.0.1/live/livestream
|
|
|
|
|
output rtmp://127.0.0.1/[app]/[stream];
|
|
|
|
|
# the listen port for stream caster.
|
|
|
|
|
# for flv caster, listen at tcp port. for example, 8936.
|
|
|
|
|
listen 8936;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# GB28181
|
|
|
|
|
stream_caster {
|
|
|
|
|
# whether stream caster is enabled.
|
|
|
|
|
# default: off
|
|
|
|
|
enabled on;
|
|
|
|
|
# the caster type of stream, the casters:
|
|
|
|
|
# gb28181, Push GB28181 to SRS.
|
|
|
|
|
caster gb28181;
|
|
|
|
|
# the output rtmp url.
|
|
|
|
|
# for gb28181 caster, the typically output url:
|
|
|
|
|
# rtmp://127.0.0.1/live/[stream]
|
|
|
|
|
# where the [stream] is the VideoChannelCodecID.
|
|
|
|
|
output rtmp://127.0.0.1/live/[stream];
|
|
|
|
|
# the listen port for stream caster.
|
|
|
|
|
# for gb28181 caster, listen at udp port. for example, 9000.
|
|
|
|
|
# @remark We can bundle all gb28181 to this port, to reuse this port.
|
|
|
|
|
# User can choose to bundle port in API port_mode or SIP invite_port_fixed.
|
|
|
|
|
listen 9000;
|
|
|
|
|
# If not bundle ports, use specified ports for each stream.
|
|
|
|
|
rtp_port_min 58200;
|
|
|
|
|
rtp_port_max 58300;
|
|
|
|
|
# Whether wait for keyframe then forward to RTMP.
|
|
|
|
|
wait_keyframe off;
|
|
|
|
|
# Max timeout in seconds for RTP stream, if timeout, RTCP bye and close stream.
|
|
|
|
|
# default: 30
|
|
|
|
|
rtp_idle_timeout 30;
|
|
|
|
|
# Whether has audio.
|
|
|
|
|
# @remark Flash/RTMP only supports 11025 22050 44100 sample rate, if not the audio may corrupt.
|
|
|
|
|
# default: off
|
|
|
|
|
audio_enable off;
|
|
|
|
|
# The exposed IP to receive media stream.
|
|
|
|
|
host 192.168.1.3;
|
|
|
|
|
|
|
|
|
|
sip {
|
|
|
|
|
# Whether enable embeded SIP server.
|
|
|
|
|
# default: on
|
|
|
|
|
enabled on;
|
|
|
|
|
# The SIP listen port.
|
|
|
|
|
# default: 5060
|
|
|
|
|
listen 5060;
|
|
|
|
|
# The SIP server ID.
|
|
|
|
|
# default: 34020000002000000001
|
|
|
|
|
serial 34020000002000000001;
|
|
|
|
|
# The SIP server domain.
|
|
|
|
|
# default: 3402000000
|
|
|
|
|
realm 3402000000;
|
|
|
|
|
# The SIP ACK response timeout in seconds.
|
|
|
|
|
# default: 30
|
|
|
|
|
ack_timeout 30;
|
|
|
|
|
# The keepalive timeout in seconds.
|
|
|
|
|
# default: 120
|
|
|
|
|
keepalive_timeout 120;
|
|
|
|
|
# Whether print SIP logs.
|
|
|
|
|
print_sip_message off;
|
|
|
|
|
# Whether play immediately after registered.
|
|
|
|
|
# default: on
|
|
|
|
|
auto_play on;
|
|
|
|
|
# Whether bundle media stream port.
|
|
|
|
|
# default: on
|
|
|
|
|
invite_port_fixed on;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#############################################################################################
|
|
|
|
|
# SRT server section
|
|
|
|
|
#############################################################################################
|
|
|
|
|