arut / nginx-rtmp-module

NGINX-based Media Streaming Server
http://nginx-rtmp.blogspot.com
BSD 2-Clause "Simplified" License
13.45k stars 3.52k forks source link

How to reduce ffplay open stream time #1135

Open chenxiemin opened 7 years ago

chenxiemin commented 7 years ago

Hi,

It needs about 8 seconds to open a live stream with ffplay:

ffplay -fflags nobuffer rtmp://xxx

Any idea to reduce the start stream time? The push command is like following:

ffmpeg -f avfoundation -framerate 30 -i "0" -vcodec libx264 -g 30 -profile:v baseline -level 3.0 -preset ultrafast -tune zerolatency -b:v 160k -r:v 15 -pix_fmt yuv420p -f flv rtmp://xxx

karlisk commented 7 years ago

Have you tried adjusting Buflen in your NGINX config?

https://github.com/arut/nginx-rtmp-module/wiki/Directives#buflen