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 in iPhone #17

Open
samchen7910 opened this issue Aug 8, 2023 · 3 comments
Open

Laggy video in iPhone #17

samchen7910 opened this issue Aug 8, 2023 · 3 comments

Comments

@samchen7910
Copy link

Firstly, thanks for the package, it's awesome.
I'm facing an issue the video stream from iPhone is extremely laggy but iPad is working fine. with the same code.

iPhone 12 with iOS versions 15.5 and 16.6
iPad 2020 with iPadOS version 16.5.1

Pictures below show that when iPhone joins a room, the RAM goes up to 600mbs+, while iPad stays at 170mbs+
Screenshot 2023-08-08 at 14 38 12
Screenshot 2023-08-02 at 15 17 55

@fedulvtubudul
Copy link
Collaborator

First guess is to check your video quality. iPhone camera native resolution and frame rate are really too much for realtime streaming, so you should set it thoughtfully. What resolution and frame rate do you capture from camera and what resolution (or resolutions) do you encode and stream?

Here are two runs of same code on same device I've just done, but with different video quality settings:

Screenshot 2023-08-08 at 22 04 38 Screenshot 2023-08-08 at 21 59 05

@samchen7910
Copy link
Author

Thanks for quick response @fedulvtubudul
Here are the resolution and frame rate which I captured from iPhone's camera. In the encoding part, I leave it at Nil.
This setup works well with the mediasoup_ios_client.
Could you tell me which resolution, frame rate, and encoded resolution did you use?

Screenshot 2023-08-08 at 15 40 29 Screenshot 2023-08-08 at 15 39 37

@fedulvtubudul
Copy link
Collaborator

fedulvtubudul commented Aug 16, 2023

640x360@20fps is not that much to be a problem. Have you tried to examine your app with Instruments and see where all the memory goes?

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