diff --git a/README.md b/README.md
index c21401c97..96890e4d6 100755
--- a/README.md
+++ b/README.md
@@ -453,6 +453,7 @@ Supported operating systems and hardware:
[CN](https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_SrsLibrtmp#publish-audio-raw-stream),
[EN](https://github.com/winlinvip/simple-rtmp-server/wiki/v2_EN_SrsLibrtmp#publish-audio-raw-stream)
) by srs-librtmp.
+1. Support 0.1s+ latency, read [#257](https://github.com/winlinvip/simple-rtmp-server/issues/257).
1. [no-plan] Support <500ms latency, FRSC(Fast RTMP-compatible Stream Channel tech).
1. [no-plan] Support RTMP 302 redirect [#92](https://github.com/winlinvip/simple-rtmp-server/issues/92).
1. [no-plan] Support multiple processes, for both origin and edge
@@ -486,6 +487,7 @@ Supported operating systems and hardware:
* 2013-10-17, Created.
## History
+* v2.0, 2014-12-12, fix [#257](https://github.com/winlinvip/simple-rtmp-server/issues/257), support 0.1s+ latency. 2.0.70
* v2.0, 2014-12-08, update wiki for mr([EN](https://github.com/winlinvip/simple-rtmp-server/wiki/v2_EN_LowLatency#merged-read), [CN](https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_LowLatency#merged-read)) and mw([EN](https://github.com/winlinvip/simple-rtmp-server/wiki/v2_EN_LowLatency#merged-write), [CN](https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_LowLatency#merged-write)).
* v2.0, 2014-12-07, fix [#251](https://github.com/winlinvip/simple-rtmp-server/issues/251), 10k+ clients, use queue cond wait and fast vector. 2.0.67
* v2.0, 2014-12-05, fix [#251](https://github.com/winlinvip/simple-rtmp-server/issues/251), 9k+ clients, use fast cache for msgs queue. 2.0.57
diff --git a/trunk/conf/full.conf b/trunk/conf/full.conf
index de0ca0498..343e51b8d 100755
--- a/trunk/conf/full.conf
+++ b/trunk/conf/full.conf
@@ -145,6 +145,13 @@ vhost __defaultVhost__ {
# the MR(merged-read) setting for publisher.
# the MW(merged-write) settings for player.
vhost mrw.srs.com {
+ # whether enable min delay mode for vhost.
+ # for min latence mode:
+ # 1. disable the mr for vhost.
+ # 2. use timeout for cond wait for consumer queue.
+ # @see https://github.com/winlinvip/simple-rtmp-server/issues/257
+ # default: on
+ min_latency off;
# about MR, read https://github.com/winlinvip/simple-rtmp-server/issues/241
mr {
# whether enable the MR(merged-read)
@@ -440,6 +447,12 @@ vhost debug.srs.com {
# the vhost for min delay, donot cache any stream.
vhost min.delay.com {
+ # @see vhost mrw.srs.com for detail.
+ min_latency on;
+ mr {
+ enabled off;
+ }
+ mw_latency 100;
# whether cache the last gop.
# if on, cache the last gop and dispatch to client,
# to enabled fast startup for client, client play immediately.
diff --git a/trunk/conf/realtime.conf b/trunk/conf/realtime.conf
index 00ccd03c5..4ac824b6f 100755
--- a/trunk/conf/realtime.conf
+++ b/trunk/conf/realtime.conf
@@ -1,5 +1,5 @@
# the config for srs to delivery realtime RTMP stream
-# @see https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_SampleRealtime
+# @see https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_SampleRealtime
# @see full.conf for detail config.
listen 1935;
@@ -7,6 +7,7 @@ max_connections 1000;
vhost __defaultVhost__ {
gop_cache off;
queue_length 10;
+ min_latency on;
mr {
enabled off;
}
diff --git a/trunk/research/players/js/srs.player.js b/trunk/research/players/js/srs.player.js
index dad0ba927..f04859ca9 100755
--- a/trunk/research/players/js/srs.player.js
+++ b/trunk/research/players/js/srs.player.js
@@ -22,7 +22,7 @@ function SrsPlayer(container, width, height, private_object) {
this.height = height;
this.id = SrsPlayer.__id++;
this.stream_url = null;
- this.buffer_time = 0.8; // default to 0.8
+ this.buffer_time = 0.3; // default to 0.3
this.volume = 1.0; // default to 100%
this.callbackObj = null;
diff --git a/trunk/research/players/srs_player.html b/trunk/research/players/srs_player.html
old mode 100644
new mode 100755
index 4e26ed046..0345d16f5
--- a/trunk/research/players/srs_player.html
+++ b/trunk/research/players/srs_player.html
@@ -96,7 +96,7 @@
srs_player = new SrsPlayer("player_id", srs_get_player_width(), srs_get_player_height());
srs_player.on_player_ready = function() {
- select_buffer_time("#btn_bt_0_8", 0.8);
+ select_buffer_time("#btn_bt_0_1", 0.1);
this.play(url);
};
srs_player.on_player_metadata = function(metadata) {
@@ -231,6 +231,15 @@
}
if (true) {
+ $("#btn_bt_0_1").click(function(){
+ select_buffer_time("#btn_bt_0_1", 0.1);
+ });
+ $("#btn_bt_0_2").click(function(){
+ select_buffer_time("#btn_bt_0_2", 0.2);
+ });
+ $("#btn_bt_0_3").click(function(){
+ select_buffer_time("#btn_bt_0_3", 0.3);
+ });
$("#btn_bt_0_5").click(function(){
select_buffer_time("#btn_bt_0_5", 0.5);
});
@@ -504,6 +513,9 @@