Closed Sectran closed 5 months ago
I don't know why there was a large interval between the request and the response in your test.
An HTTP response is actually driven by a rtmp publisher, if the media file pushed by a publisher has a low bit rate, it will take server some time to coalesce many chunks into a message, then the server calls the relevant handler to feed response. However, this is a trivial factor. The interval between HTTP request and response is normally at ms
level, but if the directive gop_cache
is off, and if the gop size is large and the request comes after the key frame in the pushing stream, player may wait a long time before a key frame arrives. Further, the directive wait_key
is on by default, the server will not send any data after sending HTTP response until a key frame arrives.
yes,in my test, publisher sends every frame in 50 secends,whethere there has an impact on the waiting time of the first frame if I disable wait_key
?
@winshining Thank you very much. Your suggestions have given me a lot of inspiration. After increasing the frequency of keyframes, the loading speed has indeed accelerated. I really appreciate it.
I disabled gopcache,and I use tcpdump to watch when the first frame will arrive,it's cost a lot of time,plz give me some advices.
When I wait for a long time, the streaming server begain sends the FLV data. this is my config: