1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-13 03:41:55 +00:00
srs/trunk/conf/demo.conf

223 lines
5.9 KiB
Text
Raw Normal View History

2014-03-18 07:38:34 +00:00
# the config for srs demo
2015-11-11 02:37:50 +00:00
# @see https://github.com/ossrs/srs/wiki/v1_CN_SampleDemo
2014-03-18 07:38:34 +00:00
# @see full.conf for detail config.
listen 1935;
max_connections 1000;
daemon off;
srs_log_tank console;
pid ./objs/srs.demo.pid;
chunk_size 60000;
max_connections 2000;
2014-04-06 11:13:29 +00:00
http_api {
enabled on;
listen 1985;
}
http_server {
2014-04-06 11:13:29 +00:00
enabled on;
listen 8080;
dir ./objs/nginx/html;
}
vhost __defaultVhost__ {
enabled on;
gop_cache on;
}
vhost bandcheck.srs.com {
enabled on;
chunk_size 65000;
bandcheck {
enabled on;
key "35c9b402c12a7246868752e2878f7e0e";
interval 30;
limit_kbps 4000;
}
}
vhost demo.srs.com {
chunk_size 60000;
enabled on;
gop_cache on;
queue_length 30;
2015-08-29 23:59:25 +00:00
forward {
enabled on;
destination 127.0.0.1:19350;
}
bandcheck {
enabled off;
}
hls {
enabled on;
hls_path ./objs/nginx/html;
hls_fragment 5;
hls_window 30;
}
http_hooks {
enabled on;
on_connect http://127.0.0.1:8085/api/v1/clients;
on_close http://127.0.0.1:8085/api/v1/clients;
on_publish http://127.0.0.1:8085/api/v1/streams;
on_unpublish http://127.0.0.1:8085/api/v1/streams;
on_play http://127.0.0.1:8085/api/v1/sessions;
on_stop http://127.0.0.1:8085/api/v1/sessions;
}
transcode {
enabled on;
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
engine ld {
enabled on;
vfilter {
i ./doc/srs-logo.png;
filter_complex 'overlay=10:10';
}
vcodec libx264;
vbitrate 300;
vfps 20;
vwidth 768;
vheight 320;
vthreads 1;
vprofile baseline;
vpreset superfast;
vparams {
}
2015-03-06 14:35:02 +00:00
acodec libfdk_aac;
abitrate 45;
asample_rate 44100;
achannels 2;
aparams {
}
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
}
engine sd {
enabled on;
vfilter {
vf 'split [main][tmp]; [tmp] crop=iw:ih/2:0:0, vflip [flip]; [main][flip] overlay=0:H/2';
}
vcodec libx264;
vbitrate 500;
vfps 20;
vwidth 768;
vheight 320;
vthreads 1;
vprofile main;
vpreset fast;
vparams {
}
2015-03-06 14:35:02 +00:00
acodec libfdk_aac;
abitrate 40;
asample_rate 44100;
achannels 2;
aparams {
}
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
}
}
ingest {
2014-04-17 08:06:49 +00:00
enabled on;
input {
type file;
url ./doc/source.200kbps.768x320.flv;
}
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
engine {
2014-04-17 08:06:49 +00:00
enabled off;
output rtmp://127.0.0.1:[port]/live?vhost=[vhost]/livestream;
}
}
}
vhost players {
enabled on;
gop_cache on;
transcode {
enabled on;
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
engine hls {
enabled on;
vfilter {
i ./doc/srs-logo.png;
filter_complex 'overlay=10:10';
}
vcodec libx264;
vbitrate 300;
vfps 20;
vwidth 768;
vheight 320;
vthreads 1;
vprofile baseline;
vpreset superfast;
vparams {
g 100;
}
2015-03-06 14:35:02 +00:00
acodec libfdk_aac;
abitrate 30;
asample_rate 44100;
achannels 2;
aparams {
}
output rtmp://127.0.0.1:[port]/[app]?vhost=players_pub/[stream];
}
}
ingest {
2014-04-17 08:06:49 +00:00
enabled on;
input {
type file;
url ./doc/source.200kbps.768x320.flv;
}
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
engine {
2014-04-17 08:06:49 +00:00
enabled off;
output rtmp://127.0.0.1:[port]/live?vhost=[vhost]/demo;
}
}
}
vhost players_pub {
hls {
enabled on;
hls_path ./objs/nginx/html;
hls_fragment 5;
hls_window 30;
}
}
2014-04-11 06:13:14 +00:00
vhost players_chat {
gop_cache off;
hls {
enabled off;
}
2014-04-11 06:13:14 +00:00
transcode {
enabled on;
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
engine chat_hls {
enabled on;
2014-04-11 06:40:38 +00:00
vfilter {
}
vcodec libx264;
2014-04-16 08:40:54 +00:00
vbitrate 150;
2014-04-11 06:40:38 +00:00
vfps 15;
2014-04-16 08:40:54 +00:00
vwidth 576;
vheight 240;
2014-04-11 06:40:38 +00:00
vthreads 1;
vprofile baseline;
2014-04-16 08:40:54 +00:00
vpreset ultrafast;
2014-04-11 06:40:38 +00:00
vparams {
g 30;
}
2014-04-16 08:18:02 +00:00
acodec an;
2014-04-11 06:23:19 +00:00
output rtmp://127.0.0.1:[port]/[app]?vhost=chat_hls/[stream];
2014-04-11 06:13:14 +00:00
}
}
}
vhost chat_hls {
hls {
enabled on;
hls_path ./objs/nginx/html;
hls_fragment 2;
2014-04-11 06:40:38 +00:00
hls_window 10;
2014-04-11 06:13:14 +00:00
}
}