This repository has been archived by the owner on Jul 12, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prevent frames from building up in the buffer if the CPU falls behind.
Prior discussion: https://groups.google.com/g/kurento/c/_IsI7tcdLVw/m/N_GB6SKLBAAJ
Related: Kurento/kms-elements#11
Followed by: #9
For testing purposes, I have a VM configured with one CPU. When I attempt to run three high-definition videos through KMS, the CPU becomes over taxed and KMS begins to buffer the incoming video. This leads to huge delays in displaying the video. I've seen as much as 2 minutes of video being buffered inside KMS and the player running at almost half speed and 2 minutes behind the live video. This also causes huge memory accumulation within KMS, often in the tens of gigabytes range. There seem to be two issues leading to the buffering of video and the delayed delivery of video to the browser.
The change was to add "drop-on-latency" to the g_object_set command.
These two fixes allow KMS to better handle high CPU load when decoding, transcoding, and delivering video. It also keeps KMS from consuming an increasing amount of memory due to the indefinite buffering of video.