Skip to main content
Application settings control the behavior of individual applications running in Ant Media Server. These settings are stored in <AMS_DIR>/webapps/<AppName>/WEB-INF/red5-web.properties and can be configured through the web panel or by editing the properties file directly.

Streaming Settings

Recording Formats

mp4MuxingEnabled
boolean
default:"false"
Enable/disable MP4 recording. If enabled, an MP4 file is created in the <APP_DIR>/streams directory.
webMMuxingEnabled
boolean
default:"false"
Enable/disable WebM recording.
hlsMuxingEnabled
boolean
default:"true"
Enable/disable HLS recording. If enabled, HLS files (m3u8 and ts) are created in the <APP_DIR>/streams directory and HLS playing is enabled.
dashMuxingEnabled
boolean
default:"false"
Enable/disable DASH recording.

File Naming

addDateTimeToMp4FileName
boolean
default:"false"
Add date and time to MP4 file names. If enabled, timestamps are added to recorded MP4 files.
addDateTimeToHlsFileName
boolean
default:"false"
Add date and time to HLS file names (.m3u8 and .ts files).
fileNameFormat
string
default:"%r%b"
Format string for output file names. Supports the following placeholders:
  • %r: Resolution (e.g., “720p”)
  • %b: Bitrate (e.g., “1500kbps”)
  • {customText}: Custom text in curly braces
Examples:
  • "%r%b"stream1_720p1500kbps
  • "{HD}%r%b"stream1_HD720p1500kbps
  • "%r{custom}%b"stream1_720pcustom1500kbps

File Cleanup

deleteHLSFilesOnEnded
boolean
default:"true"
Delete HLS files (m3u8 and ts) after the broadcast has finished.
deleteDASHFilesOnEnded
boolean
default:"true"
Delete DASH files (mpd and m4s) after the broadcast has finished.

HLS Configuration

hlsTime
string
default:"2"
Duration of segments in seconds. Segments will be cut on the next key frame after this time has passed.
hlsListSize
string
default:"15"
Maximum number of playlist entries in m3u8 files. If 0, the list file will contain all segments.
hlsPlayListType
string
default:""
HLS playlist type. Can be “event” or “vod”. Check HLS documentation for EXT-X-PLAYLIST-TYPE.
hlsSegmentType
string
default:"mpegts"
HLS segment file type. Can be “mpegts” or “fmp4”. fmp4 is compatible for playing HEVC HLS streams.
hlsSegmentFileSuffixFormat
string
default:"%09d"
Suffix format for HLS segment files.
  • Default: %09d (9 digit incremental)
  • With date: %Y%m%d-%s
  • Combined: %s-%%09d (requires +second_level_segment_index in hlsflags)
hlsflags
string
default:"delete_segments+program_date_time"
HLS flags for FFmpeg HLS Muxer. Separate multiple options with + or -.Example:
hlsflags=+program_date_time+round_durations+append_list
See FFmpeg HLS documentation for details.
hlsHttpEndpoint
string
default:""
HTTP endpoint to push the HLS stream.
hlsEncryptionKeyInfoFile
string
default:""
Full path to HLS encryption key info file. Format:
key URI
key file path
IV (optional)
Example:
http://server/file.key
/path/to/file.key
0123456789ABCDEF0123456789ABCDEF

DASH Configuration

dashSegDuration
string
default:"6"
Duration of DASH segments in seconds.
dashFragmentDuration
string
default:"0.5"
Duration of DASH fragments. Fragments are a property of fragmented MP4 files (moof + mdat).
dashTargetLatency
string
default:"3.5"
Target latency for DASH streaming in seconds.
dashWindowSize
string
default:"5"
Number of files in the DASH manifest.
dashExtraWindowSize
string
default:"5"
Number of segments kept outside the manifest before removing from disk.
lLDashEnabled
boolean
default:"true"
Enable low latency DASH. Effective if DASH is enabled.
lLHLSEnabled
boolean
default:"false"
Enable low latency HLS via DASH muxer. Effective if DASH is enabled.
hlsEnabledViaDash
boolean
default:"false"
Enable HLS through DASH muxer. Effective if DASH is enabled.
useTimelineDashMuxing
boolean
default:"false"
Use timeline in DASH muxing.
dashHttpStreaming
boolean
default:"true"
Use HTTP streaming in Low Latency DASH. If true, sends files through HTTP. If false, writes files to disk directly.
dashHttpEndpoint
string
default:""
HTTP endpoint for DASH/CMAF streams.

WebRTC Settings

webRTCEnabled
boolean
default:"true"
Enable/disable WebRTC playing.
webRTCFrameRate
int
default:"30"
Frame rate for video publishing to WebRTC players.
webRTCPortRangeMin
int
default:"50000"
Minimum port number for WebRTC connections. Must be less than webRTCPortRangeMax.
webRTCPortRangeMax
int
default:"60000"
Maximum port number for WebRTC connections. Must be greater than webRTCPortRangeMin.
stunServerURI
string
default:"stun:stun1.l.google.com:19302"
STUN or TURN server URI for WebRTC ICE candidates. Can be a STUN or TURN URL.
turnServerUsername
string
default:""
TURN server username for WebRTC ICE candidates. Requires stunServerURI and turnServerCredential to be effective.
turnServerCredential
string
default:""
TURN server credential for WebRTC ICE candidates. Requires stunServerURI and turnServerUsername to be effective.
webRTCTcpCandidatesEnabled
boolean
default:"false"
Enable TCP candidates for WebRTC connections. If false, only UDP will be used.
webRTCSdpSemantics
string
default:"unifiedPlan"
WebRTC SDP semantics. Can be “planB” or “unifiedPlan”.
portAllocatorFlags
int
default:"0"
Port allocator flags for WebRTC:
  • PORTALLOCATOR_DISABLE_UDP = 0x01
  • PORTALLOCATOR_DISABLE_STUN = 0x02
  • PORTALLOCATOR_DISABLE_RELAY = 0x04
disableIPv6Candidates
boolean
default:"true"
Enable/disable IPv6 candidates for WebRTC.
webRTCViewerLimit
int
default:"-1"
Application-level WebRTC viewer limit. -1 means unlimited.
webRTCKeyframeTime
int
default:"2000"
Interval in milliseconds for requesting key frames in SFU mode.
webRTCClientStartTimeoutMs
int
default:"10000"
Timeout in milliseconds for WebRTC client to start. Also used as reconnection timeout for publishers in fluctuating networks.
useOriginalWebRTCEnabled
boolean
default:"false"
Use the original WebRTC stream in adaptive bitrate scenarios. If true and adaptive bitrate is enabled, both original and transcoded streams are available.
replaceCandidateAddrWithServerAddr
boolean
default:"false"
Replace ICE candidate address with server address. Requires serverName to be set in conf/red5.properties.
iceGatheringTimeoutMs
long
default:"2000"
Timeout in milliseconds for ICE gathering process, especially for WHIP ingestion.
dropWebRTCIngestIfNoPacketReceived
boolean
default:"false"
Drop WebRTC ingest if no audio or video packets are received within webRTCClientStartTimeoutMs.

Adaptive Bitrate (ABR)

encoderSettingsString
string
default:""
Encoder settings in JSON array format for adaptive bitrate streaming. If empty, SFU mode will be active.Example:
[
  {"height":480, "videoBitrate":500000, "audioBitrate":128000, "forceEncode":true},
  {"height":360, "videoBitrate":300000, "audioBitrate":96000, "forceEncode":true}
]
addOriginalMuxerIntoHLSPlaylist
boolean
default:"true"
Add the original stream to the HLS playlist if adaptive bitrate is enabled.
forceDecoding
boolean
default:"false"
Force stream decoding even if there is no adaptive bitrate setting.

Stats-Based ABR

statsBasedABREnabled
boolean
default:"true"
Enable statistics-based adaptive bitrate switching algorithm.
abrDownScalePacketLostRatio
float
default:"1"
Packet loss percentage threshold to switch to lower resolution.
abrUpScalePacketLostRatio
float
default:"0.1"
Packet loss percentage threshold to switch to higher resolution.
abrUpScaleRTTMs
int
default:"150"
Round trip time threshold in milliseconds to switch to higher resolution.
abrUpScaleJitterMs
int
default:"30"
Jitter threshold in milliseconds to switch to higher resolution.

Excessive Bandwidth Algorithm

excessiveBandwidthAlgorithmEnabled
boolean
default:"false"
Enable the excessive bandwidth algorithm that attempts to switch to higher bitrate even when bandwidth seems insufficient.
excessiveBandwidthValue
int
default:"300000"
Bandwidth threshold in bps for the excessive bandwidth algorithm.
excessiveBandwidthCallThreshold
int
default:"3"
Number of consecutive calls needed to trigger bitrate switch.
excessiveBandwithTryCountBeforeSwitchback
int
default:"4"
Number of attempts before switching back to lower quality.
packetLossDiffThresholdForSwitchback
int
default:"10"
Packet loss difference threshold to immediately switch back to lower quality.
rttMeasurementDiffThresholdForSwitchback
int
default:"20"
RTT measurement difference threshold to immediately switch back to lower quality.

Preview/Thumbnail Settings

createPreviewPeriod
int
default:"5000"
Period in milliseconds for creating preview images. Files are created in <APP_DIR>/preview directory.
previewOverwrite
boolean
default:"false"
If true, new stream previews with the same ID overwrite existing files. If false, previous files are saved with a suffix.
previewHeight
int
default:"480"
Height in pixels of the preview image.
generatePreview
boolean
default:"false"
Generate preview images if adaptive bitrate settings exist.
previewFormat
string
default:"png"
Preview image format. Can be “png”, “jpg”, or “webp”.
previewQuality
int
default:"75"
Preview quality for JPG and WEBP formats.
  • JPG: 2-31 (2 = best quality, 31 = worst quality). Recommended: 5
  • WEBP: 0-100 (0 = worst quality, 100 = best quality). Recommended: 75

Stream Sources

restartStreamFetcherPeriod
int
default:"0"
Period in seconds for automatically restarting stream fetchers. 0 means disabled.
startStreamFetcherAutomatically
boolean
default:"false"
Automatically start stream sources when server starts.
streamFetcherBufferTime
int
default:"0"
Buffer time in milliseconds for stream fetchers. 0 means no buffer.
rtspPullTransportType
string
default:"3"
RTSP transport type for pulling streams. Can be string or integer (OR combination):
  • “udp” or 1
  • “tcp” or 2
  • “udp_multicast” or 4
  • “http” or 256
  • “https” or 512
Default is 3 (udp OR tcp).
rtspTimeoutDurationMs
int
default:"5000"
Timeout in milliseconds for RTSP connections.
maxAnalyzeDurationMS
int
default:"1500"
Maximum analyze duration in milliseconds for determining video and audio existence in RTMP, SRT, and stream sources.

Stream Limits

maxFpsAccept
int
default:"0"
Maximum acceptable FPS for incoming streams. 0 means no limit.
maxResolutionAccept
int
default:"0"
Maximum acceptable resolution for incoming streams. 0 means no limit.
maxBitrateAccept
int
default:"0"
Maximum acceptable bitrate for incoming streams. 0 means no limit.
ingestingStreamLimit
int
default:"-1"
Application-level total incoming stream limit. -1 means unlimited.
maxAudioTrackCount
int
default:"-1"
Maximum audio tracks in a multitrack playing connection. -1 means unlimited.
maxVideoTrackCount
int
default:"-1"
Maximum video tracks in a multitrack playing connection. -1 means unlimited.

Data Channel

dataChannelEnabled
boolean
default:"true"
Enable/disable WebRTC data channel. When enabled, publishers can send messages to players.
dataChannelPlayerDistribution
string
default:"all"
Distribution mode for player messages:
  • "none": Player messages are delivered to nobody
  • "publisher": Player messages are delivered only to publisher
  • "all": Player messages are delivered to everyone (publisher and all players)
dataChannelWebHookURL
string
default:""
Webhook URL for data channel messages. All data channel messages are also sent to this endpoint.
sendAudioLevelToViewers
boolean
default:"false"
Send audio level information from RTP headers to viewers via data channel. Useful for video conferencing to detect active speakers.
audioLevelThreshold
int
default:"120"
Audio level threshold for assigning audio tracks in limited track conferences. Range: 0-127 (0 = max level, 127 = silent).

Webhooks

listenerHookURL
string
default:""
Webhook URL for event notifications. See Webhook Integration for details.
webhookAuthenticateURL
string
default:""
Webhook URL for authentication when publishing streams.
webhookPlayAuthUrl
string
default:""
Webhook URL for WebRTC play authentication.
webhookRetryCount
int
default:"0"
Number of retry attempts on webhook POST failure.
webhookRetryDelay
long
default:"1000"
Delay in milliseconds between webhook retry attempts.
webhookStreamStatusUpdatePeriodMs
long
default:"-1"
Period in milliseconds for sending stream status updates to webhook. -1 means disabled. Minimum recommended: 5000ms.
webhookContentType
string
default:"application/json"
Content type for webhook POST requests. For backward compatibility, can be set to “application/x-www-form-urlencoded”.

Scripts

muxerFinishScript
string
default:""
Path to bash script called when muxing finishes.
streamStartedScript
string
default:""
Path to bash script called when streaming starts.
streamEndedScript
string
default:""
Path to bash script called when stream ends.
streamIdleTimeoutScript
string
default:""
Path to bash script called when stream idle timeout occurs.
vodUploadFinishScript
string
default:""
Path to bash script called when VoD upload finishes.

Storage

subFolder
string
default:""
Subfolder path for storing media files. Supports placeholders:
  • %m: Main track ID
  • %s: Stream ID
Examples:
  • "%m" → streams/mainTrackId/0001.ts
  • "myStreams/%m/%s" → streams/myStreams/mainTrackId/streamId/0001.ts
recordingSubfolder
string
default:"null"
Subfolder for recording files (MP4 and WebM).

VoD Settings

vodFolder
string
default:""
Directory for VoD files. Deprecated - use VoD import REST API instead.

Access Control

acceptOnlyStreamsInDataStore
boolean
default:"false"
Only accept streams that are pre-registered in the database. Streams must be added via REST API before publishing.
acceptOnlyRoomsInDataStore
boolean
default:"false"
Only accept rooms that are pre-registered in the database.
playWebRTCStreamOnceForEachSession
boolean
default:"true"
Prevent playing the same stream ID more than once in the same WebRTC session.

Multitrack & Conference

participantVisibilityMatrix
object
default:"{...}"
Visibility matrix defining which participant roles can see each other in conferences.Default configuration:
{
  "default": ["default"],
  "speaker": ["speaker", "active_attendee"],
  "attendee": ["speaker", "active_attendee"],
  "active_attendee": ["active_attendee", "speaker"]
}

RTMP Settings

rtmpIngestBufferTimeMs
long
default:"0"
RTMP ingesting buffer time in milliseconds. Server buffers this amount of video to compensate for stream interruptions.
rtmpPlaybackEnabled
boolean
default:"false"
Enable RTMP playback. Note: RTMP playback is deprecated and will be removed. Use CMAF/DASH instead.
heightRtmpForwarding
int
default:"360"
Height of the stream transcoded from WebRTC to RTMP forwarding.
relayRTMPMetaDataToMuxers
boolean
default:"true"
Relay RTMP metadata to muxers for playback synchronization.

SRT Settings

srtReceiveLatencyInMs
int
default:"150"
Time in milliseconds to wait for SRT packets to be received.

Misc Settings

writeStatsToDatastore
boolean
default:"true"
Write viewer statistics (HLS, WebRTC) to the datastore.
writeSubscriberEventsToDatastore
boolean
default:"false"
Write subscriber connect/disconnect events to datastore. Alternatively available in analytics logs.
remoteAllowedCIDR
string
default:"127.0.0.1"
Comma-separated CIDR addresses allowed to access REST API. Must be in CIDR format (a.b.c.d/x).
allowedPublisherCIDR
string
default:""
Comma-separated CIDR addresses allowed to publish streams. Empty means accept from everywhere.
httpForwardingExtension
string
default:""
Forward HTTP requests with these extensions to httpForwardingBaseURL. Comma-separated (e.g., “mp4,m3u8”).
httpForwardingBaseURL
string
default:""
Base URL for forwarding HTTP requests.
contentSecurityPolicyHeaderValue
string
default:""
Value for Content-Security-Policy HTTP response header to reduce XSS risks.
originEdgeIdleTimeout
int
default:"2"
Maximum idle time in seconds between origin and edge connection before re-establishing.
id3TagEnabled
boolean
default:"false"
Enable ID3 tag support for HLS.
encodingQueueSize
int
default:"150"
Size of encoding queue for frames waiting to be encoded (default: 5 seconds of 30fps stream).
customSettings
object
default:"{}"
Custom key-value settings for application-specific configuration.

Build docs developers (and LLMs) love