-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
APPLICATION: HTTP API get the number of frames received or sent for FPS. #851
Comments
amazing |
Generally, frame rate calculation requires calculating a certain time difference, such as 10-second fps, or 30-second fps, or 300-second fps, to reflect the sending and receiving situation of the stream.
So, for the first 10 seconds, the fps=(1500-1000)/10=50fps. If the stream itself is 25FPS (original frame rate), then for the first 10 seconds, it is possible that the gop cache sent a higher frame rate. For the second 10 seconds, there is actually stuttering and the frame rate is insufficient. From 30 seconds onwards, the frame rate is slightly lower. How to determine the original frame rate of the stream? The configuration on the encoder can be checked by accessing the encoder's interface or through the business system. The frame rate provided by SRS is the distributed frame rate.
|
Good |
The time interval for updating Frames data is configured as follows:
The update can be done by setting the timeout for receiving packets. It should not be set too short, otherwise the encoder will be considered timed out, usually 3-5 seconds or more. The calculation of FPS itself is not real-time because when TCP sends packets, it is more like pulses and not sending one packet at a time, but rather in batches. Therefore, adjusting this time interval to 1 second does not make sense, and it will not affect the calculation of FPS even if it is set to 3-5 seconds or more.
|
Can I get duration of live from HTTP API, and what live_ms mean? |
To get the FPS, SRS must provide the number of frames, user can get it from HTTP API.
For example, the number of frames is 1000, duration 100s, then the FPS is
10=1000frames/100s
.The text was updated successfully, but these errors were encountered: