# FPS is increasing with the participant count increasing

**URL:** <https://devforum.zoom.us/t/fps-is-increasing-with-the-participant-count-increasing/73249>\
**Category:** macOS\
**Created:** [July 29, 2022, 4:49pm UTC](https://devforum.zoom.us/t/fps-is-increasing-with-the-participant-count-increasing/73249 "2022-07-29T16:49:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anton.yereshchenko](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anton.yereshchenko/32/16916_2.png) [@anton.yereshchenko](https://devforum.zoom.us/u/anton.yereshchenko)\
**Post date:** [July 29, 2022, 4:49pm UTC](https://devforum.zoom.us/t/fps-is-increasing-with-the-participant-count-increasing/73249/1 "2022-07-29T16:49:46Z")

</div>

I am using the [raw data](https://marketplace.zoom.us/docs/sdk/native-sdks/macos/raw-data/) recording method to get access to the video buffers of participants.  
And finally, I got the video, everything is ok for now. Thank you for adding this feature.  
But I have noticed that the fps count is increasing with the participant count increasing. 🙂  
I have added a fps log for debugging in the delegate method of the renderer (`ZoomSDKRendererDelegate. onRawDataReceived`).  
For one user, I got about 25 fps (the same as in zoom statistic).

```auto
FPS (dif: 1.04) [A] = 25

```

For two users, I got about 50 fps for each user.

```auto
FPS (dif: 1.06) [A] = 50
FPS (dif: 1.03) [B] = 52

```

For three users, I got about 80 fps for each user.

```auto
FPS (dif: 1.01) [A] = 75
FPS (dif: 1.01) [B] = 81
FPS (dif: 1.03) [C] = 84

```

Note: after two users left (B and C) the first user (A) still has about 75 fps.

```auto
FPS (dif: 1.01) [A] = 75

```

A bit more about implementation.  
I have a wrapper for each zoom renderer object:

```auto
class ZoomRendererWrapper: NSObject {
    private(set) var renderer: ZoomSDKRenderer?
    //...
    // fps traking
    private var fpsCounter: Int = .zero
    private var lastFpsTrakingDate: Date = Date()
}

```

and this wrapper acts as a delegate for `ZoomSDKRenderer` object.

```auto
extension ZoomRendererWrapper: ZoomSDKRendererDelegate {
    //...
    func onRawDataReceived(_ data: ZoomSDKYUVRawDataI420?) {
        let date = Date()
        let diff = date.timeIntervalSince1970 - lastFpsTrakingDate.timeIntervalSince1970
        if diff >= 1 {
            let sourceId = data?.getSourceID() ?? .zero
            print(”FPS (dif: \(diff)) [\(sourceId)] = \(fpsCounter)“)
            lastFpsTrakingDate = date
            fpsCounter = 0
        }
        fpsCounter += 1
    //...
}

```

* * *

**More data**

I have collected some additional data [Here](https://docs.google.com/spreadsheets/d/1ClKUukhNdRIABo7IImvHi7qJnZ0b_aWBy-dhiWJnOwE/edit?usp=sharing)

In the file you can see how long it takes between each `onRawDataReceived` delegate method call for **particular** _user A_ in two cases:

1. meeting with 1 participant (purple dots).
2. meeting with 2 participants (orange dots).

For the second case (orange dots) you can see that there are a lot of cases when the duration between method calls extremely goes to zero.  
And numbers of calls is incresed two times compared to the first case (purple dots).

---

<div class="post-metadata">

**Author:** ![sinuanonoche499](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@sinuanonoche499](https://devforum.zoom.us/u/sinuanonoche499)\
**Post date:** [July 30, 2022, 12:44pm UTC](https://devforum.zoom.us/t/fps-is-increasing-with-the-participant-count-increasing/73249/2 "2022-07-30T12:44:10Z")

</div>

Frame rates are normally measured in frames per second (or FPS). This is the number of frames that you see onscreen every second. A higher FPS is associated with a smoother, more responsive gaming experience , while a low FPS can make a game seem slow and choppy. For more information also see [https://devforum.zoom.us/t/](https://devforum.zoom.us/t/) [sinuanonoche](https://sinuanonoche.com/)

---

<div class="post-metadata">

**Author:** ![anton.yereshchenko](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anton.yereshchenko/32/16916_2.png) [@anton.yereshchenko](https://devforum.zoom.us/u/anton.yereshchenko)\
**Post date:** [August 1, 2022, 7:06am UTC](https://devforum.zoom.us/t/fps-is-increasing-with-the-participant-count-increasing/73249/3 "2022-08-01T07:06:25Z")

</div>

Hi @sinuanonoche499 ,

yep, you are absolutely right, but could you please explain the behavior when fps depends on the number of participants in the meeting? 🙂

because I expected to see almost equal fps numbers for all cases.

Thank you!

---

<div class="post-metadata">

**Author:** ![andrew.sosna](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/andrew.sosna/32/19365_2.png) [@andrew.sosna](https://devforum.zoom.us/u/andrew.sosna)\
**Post date:** [August 1, 2022, 2:02pm UTC](https://devforum.zoom.us/t/fps-is-increasing-with-the-participant-count-increasing/73249/4 "2022-08-01T14:02:58Z")

</div>

Just to clarify Anton’s question, as we are working in the same team:  
I’d expect that the more participants are there, the lower FPS we receive, but here it’s the opposite, renderers receive more frames than expected.  
I would suppose that there is a bug and each renderer just receives frames for each participants, because it looks like renderer’s FPS is “one participant’s FPS multiplied by the number of participants”, but in fact each renderer indeed delivers frames only for one participant. Still, it is unexpected behavior, I don’t think each remote client starts to send more frames from their camera when more participants are on a call, unless each camera frame is sent N times, once for each remote receiver, and in this case, I guess, each receiver should only get frames sent for that receiver only so the FPS of a single participant can’t increase proportionally to the number of participants on a call.

---

<div class="post-metadata">

**Author:** ![anton.yereshchenko](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anton.yereshchenko/32/16916_2.png) [@anton.yereshchenko](https://devforum.zoom.us/u/anton.yereshchenko)\
**Post date:** [August 19, 2022, 7:44am UTC](https://devforum.zoom.us/t/fps-is-increasing-with-the-participant-count-increasing/73249/5 "2022-08-19T07:44:04Z")

</div>

Hi!  
Is there any information about this behavior?

---

<div class="post-metadata">

**Author:** ![anton.yereshchenko](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anton.yereshchenko/32/16916_2.png) [@anton.yereshchenko](https://devforum.zoom.us/u/anton.yereshchenko)\
**Post date:** [August 21, 2022, 3:33pm UTC](https://devforum.zoom.us/t/fps-is-increasing-with-the-participant-count-increasing/73249/6 "2022-08-21T15:33:37Z")

</div>

Hi!  
I have noticed that there is a notification that informs about new raw data receiving:  
**Noti\_SDK\_RawData\_OnVideoRawDataReceived**

And right after this notification my own delegate method implementation `ZoomSDKRendererDelegate.onRawDataReceived` is called with the same participant id as many times as I have participants in the meeting.  
for example, if I have 2 users on the call I will have the next flow:

1. `Noti_SDK_RawData_OnVideoRawDataReceived` received.
2. `ZoomSDKRendererDelegate.onRawDataReceived` called for user A.
3. `ZoomSDKRendererDelegate.onRawDataReceived` called for user A.
4. `Noti_SDK_RawData_OnVideoRawDataReceived` received.
5. `ZoomSDKRendererDelegate.onRawDataReceived` called for user B.
6. `ZoomSDKRendererDelegate.onRawDataReceived` called for user B.  
…

I hope this information will help you to diagnose the problem.

---

<div class="post-metadata">

**Author:** ![anton.yereshchenko](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anton.yereshchenko/32/16916_2.png) [@anton.yereshchenko](https://devforum.zoom.us/u/anton.yereshchenko)\
**Post date:** [September 8, 2022, 9:55am UTC](https://devforum.zoom.us/t/fps-is-increasing-with-the-participant-count-increasing/73249/7 "2022-09-08T09:55:05Z")

</div>

Hi!  
Could I give some additional information for the diagnostic?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [October 8, 2022, 7:56pm UTC](https://devforum.zoom.us/t/fps-is-increasing-with-the-participant-count-increasing/73249/8 "2022-10-08T19:56:02Z")

</div>

Closed on October 8, 2022, 7:56pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
