# If I triggered 'onInitialize', and then call 'sendVideoFrame', can I see YUV frames on the screen?

**URL:** <https://devforum.zoom.us/t/if-i-triggered-oninitialize-and-then-call-sendvideoframe-can-i-see-yuv-frames-on-the-screen/48811>\
**Category:** Windows\
**Created:** [April 25, 2021, 5:02am UTC](https://devforum.zoom.us/t/if-i-triggered-oninitialize-and-then-call-sendvideoframe-can-i-see-yuv-frames-on-the-screen/48811 "2021-04-25T05:02:59Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![tlol91](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tlol91/32/24127_2.png) [@tlol91](https://devforum.zoom.us/u/tlol91)\
**Post date:** [April 25, 2021, 5:02am UTC](https://devforum.zoom.us/t/if-i-triggered-oninitialize-and-then-call-sendvideoframe-can-i-see-yuv-frames-on-the-screen/48811/1 "2021-04-25T05:02:59Z")

</div>

**Description**  
A clear and concise description of what the question is.

Hello, I’m Yoonha. I want to trigger ‘onInitialize’ callback.

I completed

IZoomInstantSDKSession\* pSession = m\_pInstantSDK-\>joinSession(\*m\_pSessionContext);

and

returnVal\_Subscribe=m\_pRenderer-\>Subscribe(m\_pUser, RAW\_DATA\_TYPE\_VIDEO, 0);

 ![2021-04-25 (2)](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/3/b/3b48580b96f3956f4947ba16493a00f3f917778e.png)

I’m able to receive YUV frames by triggering ‘onRawDataFrameReceived’ callback.

 ![2021-04-25 (3)](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/5/c/5cfe9c2eba921bf7022a5c58a12a590edab60b05.png)  
 ![2021-04-25 (4)](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/2/a/2a0bb5757f7a485aace0c919f985195634c89ff1.png)

So, I want to pass those frames to Zoom encoder by 'sendVideoFrame; method.

> **[Render a user's video - Essential - Windows - Video SDKs - Zoom Software...](https://marketplace.zoom.us/docs/sdk/video/windows/essential/render-video#sending-raw-video-data)**
>
> Render a user's video
> 
> The Video SDK allows you to render the video of each user who join a session.
> 
> Retrieve the IZoomInstantSDKUser object related to...

At this link([Passing Raw Video/Audio to Zoom Encoder on Windows Fully Customizable SDK - #2 by jon.lieblich](https://devforum.zoom.us/t/passing-raw-video-audio-to-zoom-encoder-on-windows-fully-customizable-sdk/44607/2)), there is an advice as ’ Raw video data can be sent through the [`sendVideoFrame`]method. To access this method, obtain an instance of the `IZoomInstantSDKVideoSender` by providing an instance of `IZoomInstantSDKVideoSource` in your `ZoomInstantSDKSessionContext` and listening for the `onInitialize` callback. The `sender` parameter is what you are looking for.’.

According to that advice, I declared an instance of `IZoomInstantSDKVideoSource` and assign it to ‘m\_pSessionContext-\>externalVideoSource’.

 ![2021-04-25 (6)](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/e/6/e653f8a5d904ed07a3f61b9426ca93397e5b4dbf.png)

And I succeeded to trigger ‘onInitialize’ callback.

Then, if I call ‘sendVideoFrame’ with YUV frames of onRawDataFrameReceived, will the SDK show YUV frames of the screen(show video of a user joining a session)?

Thank you.

**Which Desktop Video SDK version?**  
Knowing the version can help us to identify your issue faster.

**To Reproduce(If applicable)**  
Steps to reproduce the behavior:

1. Go to ‘…’
2. Click on ‘…’
3. Scroll down to ‘…’
4. See error

**Screenshots**  
If applicable, add screenshots to help explain your problem.

**Device (please complete the following information):**

- Device: [e.g. Apple MacBook Pro (13-inch, M1)]
- OS: [e.g. macOS Big Sur 11.2.1]

**Additional context**  
Add any other context about the problem here.

---

<div class="post-metadata">

**Author:** ![tlol91](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tlol91/32/24127_2.png) [@tlol91](https://devforum.zoom.us/u/tlol91)\
**Post date:** [April 27, 2021, 10:56am UTC](https://devforum.zoom.us/t/if-i-triggered-oninitialize-and-then-call-sendvideoframe-can-i-see-yuv-frames-on-the-screen/48811/2 "2021-04-27T10:56:15Z")

</div>

The callback ‘onRawDataFrameReceived’ and the callback’sendVideoFrame’ does not work together. Each one can work separately. What is the reason ans how can I solve it? Should ’ IZoomInstantSDKDelegate’, ‘IZoomInstantSDKRawDataPipeDelegate’, ‘IZoomInstantSDKVideoSource’ be inherited in only one class?

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [April 27, 2021, 7:18pm UTC](https://devforum.zoom.us/t/if-i-triggered-oninitialize-and-then-call-sendvideoframe-can-i-see-yuv-frames-on-the-screen/48811/3 "2021-04-27T19:18:54Z")

</div>

Hey @tlol91,

Thanks for using the dev forum!

> [@tlol91](#):
>
> Then, if I call ‘sendVideoFrame’ with YUV frames of onRawDataFrameReceived, will the SDK show YUV frames of the screen(show video of a user joining a session)?

On the Windows and MacOS platforms of the video SDK, the video will not be rendered for you. You will have to take the frames and render them yourself for them to be shown on the screen.

> [@tlol91](#):
>
> The callback ‘onRawDataFrameReceived’ and the callback’sendVideoFrame’ does not work together. Each one can work separately. What is the reason ans how can I solve it? Should ’ IZoomInstantSDKDelegate’, ‘IZoomInstantSDKRawDataPipeDelegate’, ‘IZoomInstantSDKVideoSource’ be inherited in only one class?

You could have one class inherit from all of these if you would like, however, it is not necessary. onRawDataFrameReceived is for receiving the frames from the session, while sendVideoFrame is for sending frames into the session. So if you had 2 users, User A would call sendVideoFrame, then User B should receive that that frame through the onRawDataFrameReceived callback.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![tlol91](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tlol91/32/24127_2.png) [@tlol91](https://devforum.zoom.us/u/tlol91)\
**Post date:** [April 28, 2021, 1:26am UTC](https://devforum.zoom.us/t/if-i-triggered-oninitialize-and-then-call-sendvideoframe-can-i-see-yuv-frames-on-the-screen/48811/5 "2021-04-28T01:26:43Z")

</div>

Would you teach me some example codes? I desperately need the example code for rendering after receiving frames at ‘onRawDataFrameReceived’.

Thank you.

---

<div class="post-metadata">

**Author:** ![tlol91](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tlol91/32/24127_2.png) [@tlol91](https://devforum.zoom.us/u/tlol91)\
**Post date:** [April 28, 2021, 1:27am UTC](https://devforum.zoom.us/t/if-i-triggered-oninitialize-and-then-call-sendvideoframe-can-i-see-yuv-frames-on-the-screen/48811/6 "2021-04-28T01:27:48Z")

</div>

If you want my code for the example code, please let me know email address.

---

<div class="post-metadata">

**Author:** ![tlol91](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tlol91/32/24127_2.png) [@tlol91](https://devforum.zoom.us/u/tlol91)\
**Post date:** [April 28, 2021, 7:00am UTC](https://devforum.zoom.us/t/if-i-triggered-oninitialize-and-then-call-sendvideoframe-can-i-see-yuv-frames-on-the-screen/48811/7 "2021-04-28T07:00:18Z")

</div>

Can I use Electron with Video SDK? Or is Electron only available to use with Client SDK? If available, is there any guide for Electron Video SDK?

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [April 29, 2021, 6:02pm UTC](https://devforum.zoom.us/t/if-i-triggered-oninitialize-and-then-call-sendvideoframe-can-i-see-yuv-frames-on-the-screen/48811/8 "2021-04-29T18:02:41Z")

</div>

Hey @tlol91,

> [@tlol91](#):
>
> Would you teach me some example codes? I desperately need the example code for rendering after receiving frames at ‘onRawDataFrameReceived’.

For rendering the frames I would recommend using a rendering library. In my test application I use SDL. Normally we do not provide code examples for this since the code depends on what rendering library you choose.

> [@tlol91](#):
>
> Can I use Electron with Video SDK? Or is Electron only available to use with Client SDK? If available, is there any guide for Electron Video SDK?

Yes, you can use electron with the Video SDK but you would have to configure it yourself. We do not have an Electron Video SDK, but if you use both the Mac and Windows native SDK’s, you could create an Electron project out of it.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![tlol91](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tlol91/32/24127_2.png) [@tlol91](https://devforum.zoom.us/u/tlol91)\
**Post date:** [April 30, 2021, 12:35am UTC](https://devforum.zoom.us/t/if-i-triggered-oninitialize-and-then-call-sendvideoframe-can-i-see-yuv-frames-on-the-screen/48811/11 "2021-04-30T00:35:53Z")

</div>

> [@Michael\_Condon](#):
>
> Yes, you can use electron with the Video SDK but you would have to configure it yourself. We do not have an Electron Video SDK, but if you use both the Mac and Windows native SDK’s, you could create an Electron project out of it.

 ![2021-04-30 (2)](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/c/0/c0a4004008b6c63c665636a12bdd035796d5bf05.png)

What is the difference between ‘Electron demo’ and ‘ElectronVideoSDK’?

---

<div class="post-metadata">

**Author:** ![tlol91](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tlol91/32/24127_2.png) [@tlol91](https://devforum.zoom.us/u/tlol91)\
**Post date:** [April 30, 2021, 12:36am UTC](https://devforum.zoom.us/t/if-i-triggered-oninitialize-and-then-call-sendvideoframe-can-i-see-yuv-frames-on-the-screen/48811/12 "2021-04-30T00:36:16Z")

</div>

> [@Michael\_Condon](#):
>
> For rendering the frames I would recommend using a rendering library. In my test application I use SDL. Normally we do not provide code examples for this since the code depends on what rendering library you choose.

How about DirectShow? Is it appropriate as rendering library?

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [April 30, 2021, 8:06pm UTC](https://devforum.zoom.us/t/if-i-triggered-oninitialize-and-then-call-sendvideoframe-can-i-see-yuv-frames-on-the-screen/48811/13 "2021-04-30T20:06:43Z")

</div>

Hey @tlol91,

The Electron Demo is a demo application that uses the MacOS Video SDK and the Windows Video SDK. There is not currently a Electron Video SDK.

> [@tlol91](#):
>
> How about DirectShow? Is it appropriate as rendering library?

I havent used it personally, but I believe that would work 🙂

Thanks!  
Michael

---

<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:** [May 31, 2021, 6:07am UTC](https://devforum.zoom.us/t/if-i-triggered-oninitialize-and-then-call-sendvideoframe-can-i-see-yuv-frames-on-the-screen/48811/14 "2021-05-31T06:07:12Z")

</div>

Closed on May 31, 2021, 6:07am UTC

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