mirror of https://github.com/ossrs/srs.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
100 lines
3.4 KiB
Plaintext
100 lines
3.4 KiB
Plaintext
# the listen ports, split by space.
|
|
listen 1935;
|
|
# the default chunk size is 128, max is 65536,
|
|
# some client does not support chunk size change,
|
|
# however, most clients supports it and it can improve
|
|
# performance about 10%.
|
|
# if not specified, set to 4096.
|
|
chunk_size 65000;
|
|
# vhost list, the __defaultVhost__ is the default vhost
|
|
# for which cannot identify the required vhost.
|
|
vhost __defaultVhost__ {
|
|
enabled on;
|
|
gop_cache on;
|
|
hls on;
|
|
hls_path ./objs/nginx/html;
|
|
hls_fragment 5;
|
|
hls_window 30;
|
|
}
|
|
# the vhost disabled.
|
|
vhost removed.vhost.com {
|
|
# whether the vhost is enabled.
|
|
# if off, all request access denied.
|
|
# default: on
|
|
enabled off;
|
|
}
|
|
# the vhost with hls specified.
|
|
vhost no-hls.vhost.com {
|
|
# whether the hls is enabled.
|
|
# if off, donot write hls(ts and m3u8) when publish.
|
|
# default: on
|
|
hls on;
|
|
# the hls output path.
|
|
# the app dir is auto created under the hls_path.
|
|
# for example, for rtmp stream:
|
|
# rtmp://127.0.0.1/live/livestream
|
|
# http://127.0.0.1/live/livestream.m3u8
|
|
# where hls_path is /hls, srs will create the following files:
|
|
# /hls/live the app dir for all streams.
|
|
# /hls/live/livestream.m3u8 the HLS m3u8 file.
|
|
# /hls/live/livestream-1.ts the HLS media/ts file.
|
|
# in a word, the hls_path is for vhost.
|
|
# default: ./objs/nginx/html
|
|
hls_path /data/nginx/html;
|
|
# the hls fragment in seconds, the duration of a piece of ts.
|
|
# default: 10
|
|
hls_fragment 10;
|
|
# the hls window in seconds, the number of ts in m3u8.
|
|
# default: 60
|
|
hls_window 60;
|
|
}
|
|
# the vhost with hls disabled.
|
|
vhost no-hls.vhost.com {
|
|
# whether the hls is enabled.
|
|
# if off, donot write hls(ts and m3u8) when publish.
|
|
# default: on
|
|
hls off;
|
|
}
|
|
# the vhost for min delay, donot cache any stream.
|
|
vhost min.delay.com {
|
|
# whether cache the last gop.
|
|
# if on, cache the last gop and dispatch to client,
|
|
# to enable fast startup for client, client play immediately.
|
|
# if off, send the latest media data to client,
|
|
# client need to wait for the next Iframe to decode and show the video.
|
|
# set to off if requires min delay;
|
|
# set to on if requires client fast startup.
|
|
# default: on
|
|
gop_cache off;
|
|
}
|
|
# the vhost for antisuck.
|
|
vhost refer.anti_suck.com {
|
|
# the common refer for play and publish.
|
|
# if the page url of client not in the refer, access denied.
|
|
# if not specified this field, allow all.
|
|
# default: not specified.
|
|
refer github.com github.io;
|
|
# refer for publish clients specified.
|
|
# the common refer is not overrided by this.
|
|
# if not specified this field, allow all.
|
|
# default: not specified.
|
|
refer_publish github.com github.io;
|
|
# refer for play clients specified.
|
|
# the common refer is not overrided by this.
|
|
# if not specified this field, allow all.
|
|
# default: not specified.
|
|
refer_play github.com github.io;
|
|
}
|
|
# config for the pithy print,
|
|
# which always print constant message specified by interval,
|
|
# whatever the clients in concurrency.
|
|
pithy_print {
|
|
# shared print interval for all publish clients, in milliseconds.
|
|
# if not specified, set to 1100.
|
|
publish 2000;
|
|
# shared print interval for all play clients, in milliseconds.
|
|
# if not specified, set to 1300.
|
|
play 3000;
|
|
}
|
|
|