Skip to content
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

Laggy video with sip video resolution 720p #11

Open
NimbleDev opened this issue Jul 11, 2023 · 4 comments
Open

Laggy video with sip video resolution 720p #11

NimbleDev opened this issue Jul 11, 2023 · 4 comments

Comments

@NimbleDev
Copy link

Thank you for your great project, which has allowed us to successfully set up a sip video bridge.
However, we are currently facing an issue: the video becomes extremely laggy, essentially unusable, when the sip source video resolution is set to 720p.
Do you have any suggestions to solve this problem?

@nicotyze
Copy link
Member

Thanks for the feedback :)
A key point to keep in mind is that a SIP media gateway is really CPU consuming (=> auto scaling logic strongly recommended).
This is the output of docker stats and top commands for a gateway (gw1) currently running from our side:

image

Moreover, in a cloud environment, you should use VM instances which provide the highest CPU performances . For instance, with this CSP: CPU v5 and performance flag = 1 (highest)

@NimbleDev
Copy link
Author

Thanks for the feedback :) A key point to keep in mind is that a SIP media gateway is really CPU consuming (=> auto scaling logic strongly recommended). This is the output of docker stats and top commands for a gateway (gw1) currently running from our side:

image

Moreover, in a cloud environment, you should use VM instances which provide the highest CPU performances . For instance, with this CSP: CPU v5 and performance flag = 1 (highest)

Thx for your reply!

We ran our SIP media gateway in a VMWare virtual hots which has 24 cpu core and 64G ram. I think hardware resource is enough.

Below is the output of top command of the host, from which you can see the cpu load is not very high.
image

Actually, from gw01 log which is shown below, we can see a lot of "decode_slice_header error".
image

Would you pls kindly give some advise about these errors?

@nicotyze
Copy link
Member

There are mainly two possible causes for "decode_slice_header error":

  • network issues (errors, limited bandwitdth...)
  • a lack of CPU ressources

I see also efps=10.0/23.8 which means that the gateway encodes/sends a video at only 10fps and receives/decodes the video stream coming form your SIP endpoint at 23.8fps.
Classically, these values should be close to efps=30.0/30.0 => there is a bottleneck somewhere...

From my experiments, low framerate values are in most cases due to lack of CPU ressources. Multithreading support for video encoding/decoding processes is quite limited and having many vCPUs may not be enough if the physicall CPU behind is not powerfull enough or if the vCPU:pCPU ratio is to high (for this kind off application it should be 1:1...).

Did you try with lower video resolutions ?

@NimbleDev
Copy link
Author

Yes. If we downgrade the video resoluton, the video qualitiy would be stable. But in our use case, we require at least 720p resolution......
Other than using more powerful physical CPU, is there some config options we can try to improve the video performance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants