-
Notifications
You must be signed in to change notification settings - Fork 282
/
config.coffee
158 lines (115 loc) · 4.45 KB
/
config.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
os = require 'os'
module.exports =
############################
### Basic configurations ###
############################
# Server listen port
serverPort: 80
# RTMP server listen port
rtmpServerPort: 1935
# Server name which will be embedded in
# RTSP and HTTP response headers.
# Default server name is used when this value is null.
serverName: 'node-rtsp-rtmp-server'
# Average frame rate of video (informative)
videoFrameRate: 30
# Video bitrate in Kbps (informative)
videoBitrateKbps: 2000
# Audio bitrate in Kbps (informative)
audioBitrateKbps: 40
### Enable/disable each functions ###
# Enable RTSP server
enableRTSP: true
# Enable RTMP/RTMPE server (not including RTMPT)
enableRTMP: true
# Enable RTMPT/RTMPTE server
enableRTMPT: true
# Enable HTTP server
enableHTTP: true
# Enable custom protocol receiver
enableCustomReceiver: true
### Custom protocol receiver configurations ###
# Transport for custom protocol receiver
# 'unix' or 'tcp' or 'udp'
receiverType: if os.platform() is 'win32' then 'tcp' else 'unix'
# For receiverType == 'unix'
# UNIX domain socket used for receiving audio/video data
videoControlReceiverPath: '/tmp/node_rtsp_rtmp_videoControl'
audioControlReceiverPath: '/tmp/node_rtsp_rtmp_audioControl'
videoDataReceiverPath : '/tmp/node_rtsp_rtmp_videoData'
audioDataReceiverPath : '/tmp/node_rtsp_rtmp_audioData'
# For receiverType == 'tcp' or 'udp'
receiverListenHost : '0.0.0.0'
videoControlReceiverPort: 1111
audioControlReceiverPort: 1112
videoDataReceiverPort : 1113
audioDataReceiverPort : 1114
# For receiverType == 'tcp'
receiverTCPBacklog: 511
### RTSP configurations ###
# Server ports for RTP and RTCP
audioRTPServerPort : 7042 # even
audioRTCPServerPort: 7043 # odd and contiguous
videoRTPServerPort : 7044 # even
videoRTCPServerPort: 7045 # odd and contiguous
### RTSP/RTMP configurations ###
# Application name for live streams. Live streams will be accessible at
# rtsp://{host}:{serverPort}/{liveApplicationName}/{streamName} or
# rtmp://{host}:{rtmpServerPort}/{liveApplicationName}/{streamName}
liveApplicationName: 'live'
# MP4 files in recordedDir will be accessible at
# rtsp://{host}:{serverPort}/{recordedApplicationName}/{filename} or
# rtmp://{host}:{rtmpServerPort}/{recordedApplicationName}/mp4:{filename}
# To disable this feature, comment out the following two lines.
recordedApplicationName: 'file'
recordedDir: 'file'
### RTMP configurations ###
# If true, the server waits for the first keyframe
# before starting to send video/audio frames over RTMP.
rtmpWaitForKeyFrame: false
flv:
# Has video?
hasVideo: true
# See: Adobe Flash Video File Format Specification Version 10.1 - E.4.3.1 VIDEODATA
videocodecid: 7 # H.264
# See: Adobe Flash Video File Format Specification Version 10.1 - E.4.2.1 AUDIODATA
audiocodecid: 10 # AAC
###############################
### Advanced configurations ###
###############################
# Period size of each audio frame. Use 1024 for picam.
audioPeriodSize: 1024
# HTTP keepalive timeout
keepaliveTimeoutMs: 30000 # milliseconds
# RTSP
rtcpSenderReportIntervalMs: 5000 # milliseconds
# RTMP ping timeout
rtmpPingTimeoutMs: 5000 # milliseconds
# RTMP session timeout
rtmpSessionTimeoutMs: 600000 # milliseconds
# RTMPT session timeout
rtmptSessionTimeoutMs: 600000 # milliseconds
# RTMP play chunk size
rtmpPlayChunkSize: 4096 # bytes
# Maximum number of RTMP messages being sent at once
rtmpMessageQueueSize: 5
# For HE-AAC streaming over RTSP:
# If true, explicit hierarchical signaling of SBR in AudioSpecificConfig
# will be converted to explicit backward compatible signaling.
rtspDisableHierarchicalSBR: true
# For HE-AAC streaming over RTMP:
# If true, explicit hierarchical signaling of SBR in AudioSpecificConfig
# will be converted to explicit backward compatible signaling.
# Flash Player won't play audio if hierarchical signaling is used.
rtmpDisableHierarchicalSBR: true
# If true, H.264 access unit delimiter NAL units are
# not sent to clients
dropH264AccessUnitDelimiter: true
debug:
# If true, all incoming data are ignored
dropAllData: false
# UDP port numbers to receive incoming RTP data
rtspVideoDataUDPListenPort : 5004
rtspVideoControlUDPListenPort: 5005
rtspAudioDataUDPListenPort : 5006
rtspAudioControlUDPListenPort: 5007