reducing publishing delay

Gabriel T

Member
Hello
i usually notice a 5/6 seconds delay after a stream start to be published until it start being played on other windows. sounds like a buffer story, is there a way to reduce buffering time, on client or server ? (note that while there is this initial delay, the latency is very low once the stream started, so this part is really cool)
 

Max

Administrator
Staff member
If you mean ffmpeg, you can try to set a short GOP (K-frame interval).
For example: 48 means K frame every 48-th frame.
If FPS is 30 (30 frames per second), the K frame interval should be equal 1.5 seconds.
Shorter K frame interval should provide shorter initial delay.
 

Gabriel T

Member
yes i have more or less same delay. if i click on play immediatly when status show "published", i have this 5/6 seconds...using chrome on windows. might come from my internet, im based in thailand and my servers are in france
 

Max

Administrator
Staff member
It is 2-3 seconds for me.
Our demo server is located n Europe / Frankfurt.
You can have such initial delay when:
1) H.264 codec is used.
2) Windows 8 is used
3) There is a packet lost on the network between server and you

As an option you can switch to VP8 codec
flashphoner.properties
codecs=opus,alaw,ulaw,g729,speex16,g722,mpeg4-generic,telephone-event,vp8,h264,flv,mpv
Here we set VP8 priority.
However if you set VP8, you will have transcoding on RTMP H.264 (ffmpeg) streams. It will load server and reduce performance.
 
Top