Local RTMP lowest delay possible ?

3,446 views
Skip to first unread message

alana...@gmail.com

unread,
Feb 12, 2016, 12:29:24 PM2/12/16
to MonaServer
So what settings should i use and is there any lua app to get lowest delay possible ? I got it into about 0.3sec.. Is it posibble to delay it a bit more ?

Thomas Jammet

unread,
Feb 28, 2016, 1:14:42 PM2/28/16
to MonaServer, alana...@gmail.com
Hi Alan,

The best way to have no delay is to do direct p2p between the 2 peers (if there is only 1 publisher and 1 player). Otherwise, if you have more peers you should :
 - use RTMFP wit the the unreliable mode for the video publisher (see this sample : http://raspi.monaserver.ovh/MonaClients/VideoPublisher/),
 - and set the buffer size to 0 (see this sample : http://raspi.monaserver.ovh/MonaClients/VideoPlayer/?fit)
 - and connect to the stream with the unbuffered mode (for example : rtmfp://127.0.0.1/test123?unbuffered=true)

I hope it will help you!

Regards

zsjd...@gmail.com

unread,
Dec 1, 2016, 4:14:14 PM12/1/16
to MonaServer, alana...@gmail.com
Hi I'm wondering what is the recommended way to do p2p screen sharing. I'm trying to get the lowest latency possible. Have been trying Monaserver and a number of other apps but haven't got them to work without OBS. Thanks.

Alan Aasmaa

unread,
Dec 3, 2016, 2:56:00 AM12/3/16
to zsjd...@gmail.com, MonaServer

I have used milliris action over obs. It gives lower delay and ots easy to use. But its still near perfect.

Thomas Jammet

unread,
Dec 3, 2016, 11:28:29 AM12/3/16
to MonaServer, zsjd...@gmail.com, alana...@gmail.com
Hi,

On windows I have good results with ffmpeg+gdigrab. If you want to give it a try :

1) Install ffmpeg for windows and run the following command :
ffmpeg -f gdigrab -video_size 800x600 -framerate 15 -i desktop  -pix_fmt yuv420p -movflags +faststart -g 5 -q 5 -x264-params bframes=0 -preset superfast -tune zerolatency -f flv rtmp://127.0.0.1/MonaClients/test123

2) And try with this player :
http://raspi.monaserver.ovh/MonaClients/VideoPlayer/?fit&url=rtmfp://127.0.0.1/test123

Here is a screenshot : http://scr.hu/1pvf/yfvmn

Anton Ivarsson

unread,
Aug 16, 2020, 12:51:15 PM8/16/20
to MonaServer
I've also been trying to lower the delay and decided to try the ffmpeg route. It's a lot worse for me than OBS-MonaServer-OBS on my low powered laptop. :(

I was able to get similar (7 sec) delay but only around 10 fps if I removed "-q 5" from the command line and let it decide the -q value itself, but the image quality tanked. With OBS encoding I can get 30 fps with "only" around 35% CPU utilization.

Just thought I'd share to save someone else the time.
Reply all
Reply to author
Forward
0 new messages