mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Merge code.
Conflicts: trunk/configure trunk/src/app/srs_app_source.cpp trunk/src/kernel/srs_kernel_error.hpp
This commit is contained in:
commit
e57bda8908
90 changed files with 4584 additions and 3576 deletions
|
@ -82,7 +82,7 @@ vhost demo.srs.com {
|
|||
vpreset superfast;
|
||||
vparams {
|
||||
}
|
||||
acodec libaacplus;
|
||||
acodec libfdk_aac;
|
||||
abitrate 45;
|
||||
asample_rate 44100;
|
||||
achannels 2;
|
||||
|
@ -105,7 +105,7 @@ vhost demo.srs.com {
|
|||
vpreset fast;
|
||||
vparams {
|
||||
}
|
||||
acodec libaacplus;
|
||||
acodec libfdk_aac;
|
||||
abitrate 40;
|
||||
asample_rate 44100;
|
||||
achannels 2;
|
||||
|
@ -151,7 +151,7 @@ vhost players {
|
|||
vparams {
|
||||
g 100;
|
||||
}
|
||||
acodec libaacplus;
|
||||
acodec libfdk_aac;
|
||||
abitrate 30;
|
||||
asample_rate 44100;
|
||||
achannels 2;
|
||||
|
|
|
@ -22,7 +22,7 @@ vhost __defaultVhost__ {
|
|||
vpreset medium;
|
||||
vparams {
|
||||
}
|
||||
acodec libaacplus;
|
||||
acodec libfdk_aac;
|
||||
abitrate 70;
|
||||
asample_rate 44100;
|
||||
achannels 2;
|
||||
|
|
|
@ -180,6 +180,8 @@ stream_caster {
|
|||
caster rtsp;
|
||||
output rtmp://127.0.0.1/[app]/[stream];
|
||||
listen 554;
|
||||
rtp_port_min 57200;
|
||||
rtp_port_max 57300;
|
||||
}
|
||||
|
||||
#############################################################################################
|
||||
|
@ -288,44 +290,7 @@ vhost dvr.srs.com {
|
|||
# session reap flv when session end(unpublish).
|
||||
# segment reap flv when flv duration exceed the specified dvr_duration.
|
||||
# append always append to flv file, never reap it.
|
||||
# api reap flv when api required.
|
||||
# about the api plan, the HTTP api to dvr,
|
||||
# http url to control dvr, for example, http://dev:1985/api/v1/dvrs
|
||||
# method=GET
|
||||
# to query dvrs of server.
|
||||
# request params, for example ?vhost=__defaultVhost__, where:
|
||||
# vhost, query all dvr of this vhost.
|
||||
# response in json, where:
|
||||
# {code:0, dvrs: [{path_tmpl:"./[15].[04].[05].[999].flv", path_dvr:"./22.7.43.312.flv",
|
||||
# wait_keyframe:true, vhost:"__defaultVhost", callback:"http://127.0.0.1:8085/api/v1/dvrs",
|
||||
# status:"stop"|"start"
|
||||
# }]}
|
||||
# method=POST
|
||||
# to start dvr of specified vhost.
|
||||
# request should encode in json, specifies the dvr to create, where:
|
||||
# {path_tmpl:"./[15].[04].[05].[999].flv",
|
||||
# wait_keyframe:true, vhost:"__defaultVhost", callback:"http://127.0.0.1:8085/api/v1/dvrs"
|
||||
# }
|
||||
# response in json, where:
|
||||
# {code:0}
|
||||
# method=DELETE, to stop dvr
|
||||
# to stop dvr of specified vhost.
|
||||
# request params, for example ?vhost=__defaultVhost__, where:
|
||||
# vhost, stop all dvr of this vhost.
|
||||
# response in json, where:
|
||||
# {code:0}
|
||||
# method=PUT, use as RPC(remote process call).
|
||||
# reap_segment, the request params in json, where:
|
||||
# {action:"reap_segment", vhost:"__defaultVhost", path_tmpl:"./[15].[04].[05].[999].flv"}
|
||||
# when reap segment, the callback POST request in json:
|
||||
# {action:"on_dvr_reap_segment", client_id:100, vhost:"__defaultVhost__",
|
||||
# app:"live", stream:"livestream", cwd:"/home/winlin/srs", file:"./dvr.flv"
|
||||
# }
|
||||
# for the dvr http callback, @see http_hooks.on_dvr of vhost hooks.callback.srs.com
|
||||
# @read https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_DVR#http-callback
|
||||
# @read https://github.com/winlinvip/simple-rtmp-server/wiki/v2_EN_DVR#http-callback
|
||||
# default: session
|
||||
# TODO: FIXME: update wiki for the api plan.
|
||||
dvr_plan session;
|
||||
# the dvr output path.
|
||||
# we supports some variables to generate the filename.
|
||||
|
@ -361,27 +326,20 @@ vhost dvr.srs.com {
|
|||
# @see https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_DVR#custom-path
|
||||
# @see https://github.com/winlinvip/simple-rtmp-server/wiki/v2_EN_DVR#custom-path
|
||||
# segment,session apply it.
|
||||
# api apply before api specified the path.
|
||||
# default: ./objs/nginx/html
|
||||
dvr_path ./objs/nginx/html;
|
||||
# the duration for dvr file, reap if exeed, in seconds.
|
||||
# segment apply it.
|
||||
# session,api ignore.
|
||||
# session,append ignore.
|
||||
# default: 30
|
||||
dvr_duration 30;
|
||||
# whether wait keyframe to reap segment,
|
||||
# if off, reap segment when duration exceed the dvr_duration,
|
||||
# if on, reap segment when duration exceed and got keyframe.
|
||||
# segment apply it.
|
||||
# session,api ignore.
|
||||
# session,append ignore.
|
||||
# default: on
|
||||
dvr_wait_keyframe on;
|
||||
# whether dvr auto start when publish.
|
||||
# if off, dvr wait for api to start it.
|
||||
# api apply it.
|
||||
# segment,session ignore.
|
||||
# default: on
|
||||
dvr_autostart on;
|
||||
# about the stream monotonically increasing:
|
||||
# 1. video timestamp is monotonically increasing,
|
||||
# 2. audio timestamp is monotonically increasing,
|
||||
|
@ -576,7 +534,6 @@ vhost with-hls.srs.com {
|
|||
# the available audio codec:
|
||||
# aac, mp3
|
||||
# default: aac
|
||||
# TODO: FIXME: update wiki for it.
|
||||
hls_acodec aac;
|
||||
# the default video codec of hls.
|
||||
# when codec changed, write the PAT/PMT table, but maybe ok util next ts.
|
||||
|
@ -584,7 +541,6 @@ vhost with-hls.srs.com {
|
|||
# the available video codec:
|
||||
# h264, vn
|
||||
# default: h264
|
||||
# TODO: FIXME: update wiki for it.
|
||||
hls_vcodec h264;
|
||||
}
|
||||
}
|
||||
|
@ -832,12 +788,11 @@ vhost example.transcode.srs.com {
|
|||
refs 10;
|
||||
}
|
||||
# audio encoder name. can be:
|
||||
# libaacplus: use aac(libaacplus) audio encoder.
|
||||
# libfdk_aac: use aac(libfdk_aac) audio encoder.
|
||||
# copy: donot encoder the audio stream, copy it.
|
||||
# an: disable audio output.
|
||||
acodec libaacplus;
|
||||
# audio bitrate, in kbps. [16, 72] for libaacplus.
|
||||
acodec libfdk_aac;
|
||||
# audio bitrate, in kbps. [16, 72] for libfdk_aac.
|
||||
abitrate 70;
|
||||
# audio sample rate. for flv/rtmp, it must be:
|
||||
# 44100,22050,11025,5512
|
||||
|
@ -847,6 +802,7 @@ vhost example.transcode.srs.com {
|
|||
# other ffmpeg audio params
|
||||
aparams {
|
||||
# audio params, @see: http://ffmpeg.org/ffmpeg-codecs.html#Audio-Encoders
|
||||
# @remark SRS supported aac profile for HLS is: aac_low, aac_he, aac_he_v2
|
||||
profile:a aac_low;
|
||||
}
|
||||
# output format, can be:
|
||||
|
@ -885,7 +841,7 @@ vhost mirror.transcode.srs.com {
|
|||
vpreset superfast;
|
||||
vparams {
|
||||
}
|
||||
acodec libaacplus;
|
||||
acodec libfdk_aac;
|
||||
abitrate 45;
|
||||
asample_rate 44100;
|
||||
achannels 2;
|
||||
|
@ -918,7 +874,7 @@ vhost crop.transcode.srs.com {
|
|||
vpreset superfast;
|
||||
vparams {
|
||||
}
|
||||
acodec libaacplus;
|
||||
acodec libfdk_aac;
|
||||
abitrate 45;
|
||||
asample_rate 44100;
|
||||
achannels 2;
|
||||
|
@ -949,7 +905,7 @@ vhost logo.transcode.srs.com {
|
|||
vpreset superfast;
|
||||
vparams {
|
||||
}
|
||||
acodec libaacplus;
|
||||
acodec libfdk_aac;
|
||||
abitrate 45;
|
||||
asample_rate 44100;
|
||||
achannels 2;
|
||||
|
@ -969,7 +925,7 @@ vhost audio.transcode.srs.com {
|
|||
engine acodec {
|
||||
enabled on;
|
||||
vcodec copy;
|
||||
acodec libaacplus;
|
||||
acodec libfdk_aac;
|
||||
abitrate 45;
|
||||
asample_rate 44100;
|
||||
achannels 2;
|
||||
|
@ -988,7 +944,7 @@ vhost vn.transcode.srs.com {
|
|||
engine vn {
|
||||
enabled on;
|
||||
vcodec vn;
|
||||
acodec libaacplus;
|
||||
acodec libfdk_aac;
|
||||
abitrate 45;
|
||||
asample_rate 44100;
|
||||
achannels 2;
|
||||
|
@ -1040,7 +996,7 @@ vhost all.transcode.srs.com {
|
|||
bf 3;
|
||||
refs 10;
|
||||
}
|
||||
acodec libaacplus;
|
||||
acodec libfdk_aac;
|
||||
abitrate 70;
|
||||
asample_rate 44100;
|
||||
achannels 2;
|
||||
|
@ -1062,7 +1018,7 @@ vhost all.transcode.srs.com {
|
|||
vpreset medium;
|
||||
vparams {
|
||||
}
|
||||
acodec libaacplus;
|
||||
acodec libfdk_aac;
|
||||
abitrate 70;
|
||||
asample_rate 44100;
|
||||
achannels 2;
|
||||
|
@ -1082,7 +1038,7 @@ vhost all.transcode.srs.com {
|
|||
vpreset fast;
|
||||
vparams {
|
||||
}
|
||||
acodec libaacplus;
|
||||
acodec libfdk_aac;
|
||||
abitrate 60;
|
||||
asample_rate 44100;
|
||||
achannels 2;
|
||||
|
@ -1102,7 +1058,7 @@ vhost all.transcode.srs.com {
|
|||
vpreset superfast;
|
||||
vparams {
|
||||
}
|
||||
acodec libaacplus;
|
||||
acodec libfdk_aac;
|
||||
abitrate 45;
|
||||
asample_rate 44100;
|
||||
achannels 2;
|
||||
|
@ -1113,7 +1069,7 @@ vhost all.transcode.srs.com {
|
|||
engine vcopy {
|
||||
enabled on;
|
||||
vcodec copy;
|
||||
acodec libaacplus;
|
||||
acodec libfdk_aac;
|
||||
abitrate 45;
|
||||
asample_rate 44100;
|
||||
achannels 2;
|
||||
|
@ -1161,7 +1117,7 @@ vhost ffempty.transcode.srs.com {
|
|||
vpreset superfast;
|
||||
vparams {
|
||||
}
|
||||
acodec libaacplus;
|
||||
acodec libfdk_aac;
|
||||
abitrate 45;
|
||||
asample_rate 44100;
|
||||
achannels 2;
|
||||
|
|
19
trunk/conf/hds.conf
Normal file
19
trunk/conf/hds.conf
Normal file
|
@ -0,0 +1,19 @@
|
|||
# the config for srs to delivery hds
|
||||
# @see https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_SampleHDS
|
||||
# @see full.conf for detail config.
|
||||
|
||||
listen 1935;
|
||||
max_connections 1000;
|
||||
|
||||
daemon off;
|
||||
srs_log_tank console;
|
||||
srs_log_level trace;
|
||||
|
||||
vhost __defaultVhost__ {
|
||||
hds {
|
||||
enabled on;
|
||||
hds_fragment 10;
|
||||
hds_window 60;
|
||||
hds_path ./objs/nginx/html;
|
||||
}
|
||||
}
|
36
trunk/conf/mac.dev.conf
Normal file
36
trunk/conf/mac.dev.conf
Normal file
|
@ -0,0 +1,36 @@
|
|||
# no-daemon and write log to console config for srs.
|
||||
# @see full.conf for detail config.
|
||||
|
||||
listen 1935;
|
||||
max_connections 1000;
|
||||
daemon off;
|
||||
srs_log_tank console;
|
||||
http_api {
|
||||
enabled on;
|
||||
listen 1985;
|
||||
}
|
||||
http_server {
|
||||
enabled on;
|
||||
listen 8080;
|
||||
}
|
||||
vhost __defaultVhost__ {
|
||||
hls {
|
||||
enabled on;
|
||||
hls_fragment 10;
|
||||
hls_window 60;
|
||||
hls_path ./objs/nginx/html;
|
||||
}
|
||||
ingest livestream {
|
||||
enabled on;
|
||||
input {
|
||||
type file;
|
||||
url ./doc/source.200kbps.768x320.flv;
|
||||
}
|
||||
#ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
||||
ffmpeg ./objs/research/librtmp/srs_ingest_flv;
|
||||
engine {
|
||||
enabled off;
|
||||
output rtmp://127.0.0.1:[port]/live?vhost=[vhost]/livestream;
|
||||
}
|
||||
}
|
||||
}
|
17
trunk/conf/push.rtsp.conf
Normal file
17
trunk/conf/push.rtsp.conf
Normal file
|
@ -0,0 +1,17 @@
|
|||
# push MPEG-TS over UDP to SRS.
|
||||
# @see https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_Streamer#push-mpeg-ts-over-udp
|
||||
# @see https://github.com/winlinvip/simple-rtmp-server/issues/250#issuecomment-72321769
|
||||
# @see full.conf for detail config.
|
||||
|
||||
listen 1935;
|
||||
max_connections 1000;
|
||||
stream_caster {
|
||||
enabled on;
|
||||
caster rtsp;
|
||||
output rtmp://127.0.0.1/[app]/[stream];
|
||||
listen 554;
|
||||
rtp_port_min 57200;
|
||||
rtp_port_max 57300;
|
||||
}
|
||||
vhost __defaultVhost__ {
|
||||
}
|
|
@ -17,7 +17,7 @@ vhost __defaultVhost__ {
|
|||
engine ff {
|
||||
enabled on;
|
||||
vcodec copy;
|
||||
acodec libaacplus;
|
||||
acodec libfdk_aac;
|
||||
abitrate 45;
|
||||
asample_rate 44100;
|
||||
achannels 2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue