Rmtp live stream freeze randomly at the client

257 views
Skip to first unread message

fikri erdoğan

unread,
Apr 8, 2016, 4:52:26 AM4/8/16
to red5
hi,

we are using "red5 1.0.4" and we are using red5 for two purpose; first for making our live conferences and second as a media server for our past conference videos.
we use vmix for publishing our stream to red5. Also because we don't have much knowledge  on making red5 webapps we are using default chat application both for our media server and live streams.
Our problem is when we do live streams our video freeze randomly for a second on the client (all the clients freeze at the same time). As far as we can tell time between freezes is random some time
we dont see freeze for 30-40 mins some time we see freeze for a couple of seconds.
this is our config for the rmtp

# RTMP
rtmp.host=0.0.0.0
rtmp.port=4443
rtmp.io_threads=16
rtmp.send_buffer_size=271360
rtmp.receive_buffer_size=65536
rtmp.ping_interval=1000
rtmp.max_inactivity=60000
rtmp.max_handshake_time=5000
rtmp.tcp_nodelay=true
rtmp.tcp_keepalive=false
rtmp.default_server_bandwidth=10000000
rtmp.default_client_bandwidth=10000000
rtmp.client_bandwidth_limit_type=2
rtmp.bandwidth_detection=false
rtmp.encoder_base_tolerance=5000
rtmp.encoder_drop_live_future=false
# traffic optimization hinting. to disable set traffic class set to -1
# low delay + high throughput == 24 (0x18)
rtmp.traffic_class=-1
# requested maximum length of the queue of incoming connections
rtmp.backlog=32
# the interval (seconds) between each throughput calculation
rtmp.thoughput_calc_interval=15
# enable use of the default mina acceptor
rtmp.default_acceptor=true
# socket i/o pool sizes used when default acceptor is disabled
rtmp.initial_pool_size=0
rtmp.max_pool_size=2
rtmp.max_processor_pool_size=16
rtmp.executor_keepalive_time=60000
mina.logfilter.enable=false
# scheduler configs (per connection)
rtmp.scheduler.pool_size=2
# adjust this as needed if you get tasks rejected
rtmp.executor.queue_capacity=64
# drop audio packets when queue is almost full, to disable this, set to 0
rtmp.executor.queue_size_to_drop_audio_packets=60
# maximum amount of time allotted to process a single rtmp message / packet in milliseconds, set it as 0 to disable timeout
rtmp.max_handling_time=1000


Rajdeep Rath

unread,
Apr 8, 2016, 5:02:08 AM4/8/16
to red5in...@googlegroups.com
Well not that I am aware if this as reported issue , but to be absolutely sure you must try a different version and ensure that the same issue occurs. Always use the latest release. 1.0.4 is pretty old. If you are able to reproduce same issue with newer red5 then we can go on to further diagnose the issue.

1. Always the app called live for live streaming
2. Try using more than one type of encoder to see if there is an issue. (Fmle etc)
3. See whether random freeze happen when using 1 stream or many
4. Make sure your system running red5 is capable enough to do what you are trying 
Freezes can also be A out come of player not receiving video frames smoothly as it should. 
5. Make sure to use a buffer on the player to avoid dropping frames on client side 

(Assuming you did not change any default settings on the properties file)

Regards
Rajdeep Rath
--

---
You received this message because you are subscribed to the Google Groups "red5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to red5interest...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

fikri erdoğan

unread,
Apr 15, 2016, 3:49:18 AM4/15/16
to red5
Thanks for the reply.
we didnt try this on newer version on red5 yet but we will gonna try it as soon as we find time. And for the other diagnostics;

1) I didnt fully understand what you mean by "Always the app called live for live streaming" but we set our players for live stream if this what you ask
2) Right now we are trying to determine if this is the issue for us. i will post an update after we will finished our tests.
3) We are only using one live stream
4) We are using 6 x 2.2 Ghz CPU , 12 GB Ram with 300 Mbps download and 200 Mbps upload speed connection cloud server.
5) We are using buffer on our players.
To unsubscribe from this group and stop receiving emails from it, send an email to red5interest+unsubscribe@googlegroups.com.

Rajdeep Rath

unread,
Apr 15, 2016, 3:53:12 AM4/15/16
to red5in...@googlegroups.com

Thanks for your update. Do post back your findings.

By 1. I meant as a tip always 'use' app called live for live streaming. (Sorry my fingers ate a word there).

And yes do try newer versions. Always try to keep with latest unless your older version has been a trusty work horse for you.

To unsubscribe from this group and stop receiving emails from it, send an email to red5interest...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--

---
You received this message because you are subscribed to the Google Groups "red5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to red5interest...@googlegroups.com.

fikri erdoğan

unread,
May 6, 2016, 4:55:12 AM5/6/16
to red5
hi again,

after some more test we saw that our live streams starts to to hang when our connected client numbers reach about 100 or so. But if we return back to red5 version  0.8 even if we get 300+ live clients we don't have any problems.
I think this is about somthing with the our rtmp config.Below is our rtmp config can anyone look and see if there is any problem or some way to improve it

Tiago Daniel Jacobs

unread,
May 6, 2016, 8:47:20 AM5/6/16
to red5in...@googlegroups.com

Try with the following:

rtmp.max_pool_size=8
rtmp.max_processor_pool_size=32
rtmp.executor.queue_capacity=256


Tiago

fikri erdoğan

unread,
May 7, 2016, 6:14:36 AM5/7/16
to red5
hi,
Thanks for reply. we tried those setting and we are still getting random hangs after we have more than 100 clients.is there any settings we can change about this?

fikri erdoğan

unread,
May 10, 2016, 5:51:09 AM5/10/16
to red5
hi,

when we broadcast our live feed on red5 becaue of we dont know much about writing our own red5 application were using default chat application. is this create the problem we are having? 
Normaly we have about 40-80 viewers per our broadcast. And for those numbers we don't have any problems. But for our some more valued broadcast we can have 100-400 viewers and
 thats when we starts having problems with our broadcasts. we try lowing the quality but it doesn't work. we look cpu and ram usage but we have more than sufficient resource for those .
Also we look for our download and upload speeds and those also sufficient enough for our need. 
Can anyone please help for our problem? 
Thanks for advance.


On Friday, 8 April 2016 11:52:26 UTC+3, fikri erdoğan wrote:

Rajdeep Rath

unread,
May 10, 2016, 5:55:12 AM5/10/16
to red5in...@googlegroups.com

Well honestly other than settings and your hardware bandwidth limits there should be no other bottlenecks. Red5 should easily be able to handle high traffic without hiccups

Have you tried running your stuff on Google cloud or aws ? Google has a trial account with free usage credits for about a month or more. I suggest you try running red5 on Google cloud with a good machine type and see if you stuff see bottlenecks.

Regards
Rajdeep Rath

Rajdeep Rath

unread,
May 10, 2016, 5:56:01 AM5/10/16
to red5in...@googlegroups.com

For live stream also ways use "live" app not chat. Not that it is a show stopper but just for standards.

fikri erdoğan

unread,
May 10, 2016, 7:01:01 AM5/10/16
to red5
what settings can you recommend ?

fikri erdoğan

unread,
May 10, 2016, 7:12:20 AM5/10/16
to red5
the reason i am asking about settings and the red5 application we are using is previously we were using red5 0.8 version and there was a red5 application written for that version for live broadcast. But we coudnt convert that application to new version.But if we stop the new version of red5 and open the old version we dont have any problems even with 300+ online clients. But because of the quality problems with both the live broadcast and on-demands videos we had to upgrade to the new version of red5.

Rajdeep Rath

unread,
May 10, 2016, 7:30:23 AM5/10/16
to red5in...@googlegroups.com
Upgrading is a right thing to do. i know some guys at a hosting company, who have customers using newer red5 (>0.8) with lots of users (definitely >100 or more) every day and things run fine. newer red5 servers also come with a live app which is recommended for live streaming as well. which was the latest version you tried ?

fikri erdoğan

unread,
May 10, 2016, 8:08:30 AM5/10/16
to red5
we are currently using red5 1.0.4 . Also where can i find detailed explanation for the red5 settings as what setting do what? 

Rajdeep Rath

unread,
May 10, 2016, 8:16:25 AM5/10/16
to red5in...@googlegroups.com

Please move to 1.0.6 or even try the 1.0.7 M10 pre release. Your version 1.0.4 is still too old.

When you install one of the above versions you will get the live app with it.

Reply all
Reply to author
Forward
0 new messages