# Not able to send Raw Video Data

**URL:** <https://devforum.zoom.us/t/not-able-to-send-raw-video-data/60503>\
**Category:** Android\
**Created:** [November 21, 2021, 2:50am UTC](https://devforum.zoom.us/t/not-able-to-send-raw-video-data/60503 "2021-11-21T02:50:20Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![atamrakar](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@atamrakar](https://devforum.zoom.us/u/atamrakar)\
**Post date:** [November 21, 2021, 2:50am UTC](https://devforum.zoom.us/t/not-able-to-send-raw-video-data/60503/1 "2021-11-21T02:50:20Z")

</div>

**Description**  
I am trying to send the raw video data and following the reference guide:  
[[https://marketplace.zoom.us/docs/sdk/video/android/advanced/raw-data#send-raw-video](https://marketplace.zoom.us/docs/sdk/video/android/advanced/raw-data#send-raw-video)]([https://Send](https://Send) Raw Data). I have implemented the `ZoomVideoSDKVideoSource` inferface and also passed the video source instance to the `ZoomVideoSDKSessionContext` by setting the externalVideoSource property of parameters. But onInitialize callback function is never get called as written in the reference guide.

**Which Android Video SDK version?**  
zoom-video-sdk-android-1.1.2

**To Reproduce(If applicable)**  
Please refer the description

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

- Xiaomi Pocophone F1
- OS: Android 10

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [November 22, 2021, 10:33pm UTC](https://devforum.zoom.us/t/not-able-to-send-raw-video-data/60503/2 "2021-11-22T22:33:06Z")

</div>

Hi @atamrakar, thanks for the post.

Can you please provide code snippets from your project showing how you are setting up the session and video source so that we can investigate why you are not receiving this callback?

Thanks!

---

<div class="post-metadata">

**Author:** ![atamrakar](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@atamrakar](https://devforum.zoom.us/u/atamrakar)\
**Post date:** [November 23, 2021, 5:30am UTC](https://devforum.zoom.us/t/not-able-to-send-raw-video-data/60503/3 "2021-11-23T05:30:24Z")

</div>

Hi Jon,

I am not using Zoom video SDK in my project. I am still evaluating it for my use case.  
I am using this sample project bundled with the downloaded video SDK “zoom-video-sdk-android-1.1.2/Sample&Libs/mobilertc-android”.

You can easily reproduce the issue by following the below steps:

1. Paste below code in `BaseSessionActivity` class

```auto
ZoomVideoSDKVideoSource source = new ZoomVideoSDKVideoSource() {
    @Override
    public void onInitialize(ZoomVideoSDKVideoSender sender, List<ZoomVideoSDKVideoCapability> list, ZoomVideoSDKVideoCapability ZoomVideoSDKVideoCapability) {
            System.out.println("sender:" + sender); // This line is not called during initialization
    }

    @Override
    public void onPropertyChange(List<ZoomVideoSDKVideoCapability> list, ZoomVideoSDKVideoCapability ZoomVideoSDKVideoCapability) {

    }

    @Override
    public void onStartSend() {

    }

    @Override
    public void onStopSend() {

    }

    @Override
    public void onUninitialized() {

    }
};

```

1. Set external video source

```auto
params.externalVideoSource = source;

```

Please let me know if you need more details.

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [November 23, 2021, 9:49pm UTC](https://devforum.zoom.us/t/not-able-to-send-raw-video-data/60503/4 "2021-11-23T21:49:15Z")

</div>

Hi @atamrakar,

Thanks for the additional information. I am seeing the `onInitialize` callback invoked 100% of the time. Are you sure that the instance of `ZoomVideoSDKSessionContext` is the same one that is being used to create the session?

Thanks!

---

<div class="post-metadata">

**Author:** ![atamrakar](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@atamrakar](https://devforum.zoom.us/u/atamrakar)\
**Post date:** [November 25, 2021, 9:57am UTC](https://devforum.zoom.us/t/not-able-to-send-raw-video-data/60503/5 "2021-11-25T09:57:20Z")

</div>

> [@jon.zoom](#):
>
> ZoomVideoSDKSessionContext

Hi Jon,

Thanks for the response. I have checked again `ZoomVideoSDKSessionContext ` instance is same. In sample project `BaseSessionActivity` class creating the instance of `ZoomVideoSDKSessionContext` and I am using the Zoom sample project only.

Thanks.

---

<div class="post-metadata">

**Author:** ![atamrakar](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@atamrakar](https://devforum.zoom.us/u/atamrakar)\
**Post date:** [November 29, 2021, 2:10pm UTC](https://devforum.zoom.us/t/not-able-to-send-raw-video-data/60503/6 "2021-11-29T14:10:56Z")

</div>

Hi Jon,

Still issue is not resolved.  
What changes do I need to do in Android sample project to send the raw video data?

Thanks!

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [November 29, 2021, 9:51pm UTC](https://devforum.zoom.us/t/not-able-to-send-raw-video-data/60503/7 "2021-11-29T21:51:31Z")

</div>

Hi @atamrakar,

What steps are you taking in the sample app to try testing this? Are you certain that you are successfully joining a session when you aren’t seeing the callback?

Thanks!

---

<div class="post-metadata">

**Author:** ![atamrakar](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@atamrakar](https://devforum.zoom.us/u/atamrakar)\
**Post date:** [November 30, 2021, 11:50am UTC](https://devforum.zoom.us/t/not-able-to-send-raw-video-data/60503/8 "2021-11-30T11:50:29Z")

</div>

Hi Jon,

I have taken the folliowng steps:

- In sample app code I set external video source to `sessionContext.externalVideoSource = new DummyVideoSource();` in `BaseSessionActivity` class. Mentioned same above.
- Using 2 mobiles for testing. Create the session on first mobile and join the same session on other mobile.
- Session is joined successfully and I can see 2 participants on both mobile.
- But `onInitialize ` callback is not called for any of the sample app.

Can you please let me know the changes that you have done in sample app to invoke the `onInitialize` callback of `ZoomVideoSDKVideoSource`.

Thanks

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [November 30, 2021, 5:52pm UTC](https://devforum.zoom.us/t/not-able-to-send-raw-video-data/60503/9 "2021-11-30T17:52:36Z")

</div>

Hi @atamrakar,

What is the `DummyVideoSource` you are referencing? Is that any different from the anonymous inner class mentioned in your earlier replies? I have implemented the same code as your reply [here](https://devforum.zoom.us/t/not-able-to-send-raw-video-data/60503/3) and am able to see the callback. Can you provide a diff of your changes in the sample app so that I can check why we are seeing different behavior? (Note: please ensure that your developer credentials are not included in this diff)

Thanks!

---

<div class="post-metadata">

**Author:** ![atamrakar](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@atamrakar](https://devforum.zoom.us/u/atamrakar)\
**Post date:** [December 3, 2021, 2:35am UTC](https://devforum.zoom.us/t/not-able-to-send-raw-video-data/60503/10 "2021-12-03T02:35:13Z")

</div>

Hi Jon,

I just moved the above anonymous inner class mentioned code to `DummyVideoSource`.  
I have uncommented the below block in `BaseSessionActivity ` and this was causing the problem.

Issue is fixed by commenting the below block and now I am getting the `onInitialize ` callback.

```auto
        sessionContext.preProcessor= new ZoomVideoSDKVideoSourcePreProcessor() {
            @Override
            public void onPreProcessRawData(ZoomVideoSDKPreProcessRawData rawData) {
                Bitmap bitmap=BitmapFactory.decodeResource(getResources(),R.drawable.zm_watermark_sdk);
                WaterMarkData data=new WaterMarkData(bitmap.getWidth(),bitmap.getHeight(),YUVConvert.convertBitmapToYuv(bitmap));
                YUVConvert.addWaterMark(rawData,data,20,20,true);
            }
        };

```

I think you know the reason of this behaviour.

Thanks for your support.

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [December 3, 2021, 6:26pm UTC](https://devforum.zoom.us/t/not-able-to-send-raw-video-data/60503/11 "2021-12-03T18:26:27Z")

</div>

That’s great to hear!

Please don’t hesitate to reach back out in a new topic if you run into any additional issues. 🙂

---

<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:** [January 3, 2022, 4:27am UTC](https://devforum.zoom.us/t/not-able-to-send-raw-video-data/60503/12 "2022-01-03T04:27:15Z")

</div>

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