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

Merge pull request #1691 from xialixin/dev-28181

Dev 28181
This commit is contained in:
winlin 2020-04-09 08:28:53 +08:00 committed by GitHub
commit 49f88a3326
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 670 additions and 295 deletions

View file

@ -328,7 +328,22 @@ stream_caster {
# default: off
audio_enable off;
# The exposed IP to receive media stream.
host 192.168.1.3;
# * Retrieve server IP automatically, from all network interfaces.
# eth0 Retrieve server IP by specified network interface name. # TODO: Implements it.
# $CANDIDATE Read the IP from ENV variable $EIP, use * if not set, see https://github.com/ossrs/srs/issues/307#issuecomment-599028124
# x.x.x.x A specified IP address or DNS name, which can be access by client such as Chrome.
# You can specific more than one interface name:
# eth0 eth1 Use network interface eth0 and eth1. # TODO: Implements it.
# Also by IP or DNS names:
# 192.168.1.3 10.1.2.3 rtc.me # TODO: Implements it.
# And by multiple ENV variables:
# $CANDIDATE $EIP # TODO: Implements it.
# default: *
host *;
#The media channel is automatically created according to the received RTP packet,
# and the channel ID is generated according to the RTP SSRC
# channelid format: 'chid[ssrc]' [ssrc] is rtp's ssrc
auto_create_channel off;
sip {
# Whether enable embeded SIP server.
@ -349,8 +364,6 @@ stream_caster {
# 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;

View file

@ -1,4 +1,4 @@
# push gb28281 stream to SRS.
# push gb28181 stream to SRS.
listen 1935;
max_connections 1000;
@ -10,14 +10,20 @@ http_api {
listen 1985;
}
stats {
network 0;
}
stream_caster {
enabled on;
caster gb28181;
# 转发流到rtmp服务器地址与端口
# TODO: https://github.com/ossrs/srs/pull/1679/files#r400875104
# [stream] is VideoChannelCodecID(视频通道编码ID)
output 127.0.0.1:1935;
# [stream] is VideoChannelCodecID(视频通道编码ID) for sip
# 自动创建的道通[stream] 是chid[ssrc] [ssrc]是rtp的ssrc
# [ssrc] rtp中的ssrc
output rtmp://127.0.0.1:1935/live/[stream];
# 接收设备端rtp流的多路复用端口
listen 9000;
@ -52,8 +58,14 @@ stream_caster {
# 也就是设备端将媒体发送的地址,如果是服务器是内外网
# 需要写外网地址,
# 调用api创建stream session时返回ip地址也是host
# $CANDIDATE 是系统环境变量,从环境变量获取地址,如果没有配置,用*
# *代表指定stats network 的网卡号地址如果没有配置network默认则是第0号网卡地址
# TODO: https://github.com/ossrs/srs/pull/1679/files#r400917594
host 192.168.1.27;
host $CANDIDATE;
#根据收到ps rtp包自带创建rtmp媒体通道不需要api接口创建
#rtmp地址参数[stream] 就是通道id 格式chid[ssrc]
auto_create_channel off;
sip {
# 是否启用srs内部sip信令
@ -78,11 +90,6 @@ stream_caster {
# 认为设备离线
keepalive_timeout 120;
# 日志打印是否打印sip信息
# off:不打印
# on:打印接收或发送sip命令信息
# TODO: https://github.com/ossrs/srs/pull/1679/files#r400929300
print_sip_message off;
# 注册之后是否自动给设备端发送invite
# on: 是 off 不是需要通过api控制