# Recording Shared Screen with Linux SDK

**URL:** https://devforum.zoom.us/t/recording-shared-screen-with-linux-sdk/114172
**Category:** Meeting SDK
**Tags:** raw-data
**Created:** [July 23, 2024, 12:55am UTC](https://devforum.zoom.us/t/recording-shared-screen-with-linux-sdk/114172 "2024-07-23T00:55:09Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![joezoomdev](https://avatars.discourse-cdn.com/v4/letter/j/47e85d/32.png) [@joezoomdev](https://devforum.zoom.us/u/joezoomdev)
#### Post date: [July 23, 2024, 12:55am UTC](https://devforum.zoom.us/t/recording-shared-screen-with-linux-sdk/114172/1 "2024-07-23T00:55:09Z")

</div>

**Meeting SDK Type and Version**  
Linux Meeting SDK 6.0.12 (5551)

**Description**  
Using the sample app made by @chunsiong.zoom as a starting point, I’ve implemented the sharing screen feature. When the app starts and joins the meeting (it has a ZAK token), it shares its “screen” which is just a sample video I gave it. If I join the meeting with my zoom desktop client, I can see that the app is correctly sharing its “screen”. However, if another app instance joins the meeting and records it, the shared screen doesn’t show up in the recording.

Before joining the meeting, the app instance recording the shared screen does the following:

```auto
SDKError err = m_pSettingService->GetRecordingSettings()->EnablePlaceVideoNextToShareInRecord(true);

```

The app instance that is sharing its screen (as host) does the following:

```auto
// First do this
ZoomSDKScreenShareSource* video_source = new ZoomSDKScreenShareSource(DEFAULT_VIDEO_SOURCE);
ZoomSDKScreenShareAudioSource* audio_source = new ZoomSDKScreenShareAudioSource(DEFAULT_AUDIO_SOURCE);
IZoomSDKShareSourceHelper* shareHelper = GetRawdataShareSourceHelper();
shareHelper->setExternalShareSource(video_source, audio_source);

-----

// Then do this to "start" screen share
m_pMeetingService->GetMeetingShareController()->ResumeCurrentSharing()

```

**Error?**  
There is no error, namely the `SDKError err` above is `SDKERR_SUCCESS`. Although I didn’t include it, the calls above are also successful (which is obvious since I see the shared screen with my desktop client).

**Troubleshooting Routes**  
I’ve tried searching for a configuration/setting step that I missed but I haven’t found anything.

**How To Reproduce**  
Do the code I wrote above. It does require implementing `ZoomSDKScreenShareSource` and `ZoomSDKScreenShareAudioSource` but they are basically the same as `ZoomSDKVideoSource` and `ZoomSDKVirtualAudioMicEvent` but with different names.

---

<div class="post-metadata">

### Author: ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)
#### Post date: [July 23, 2024, 2:20am UTC](https://devforum.zoom.us/t/recording-shared-screen-with-linux-sdk/114172/2 "2024-07-23T02:20:40Z")

</div>

> [@joezoomdev](#):
>
> However, if another app instance joins the meeting and records it, the shared screen doesn’t show up in the recording.

@joezoomdev another instance as in another Linux SDK?

---

<div class="post-metadata">

### Author: ![joezoomdev](https://avatars.discourse-cdn.com/v4/letter/j/47e85d/32.png) [@joezoomdev](https://devforum.zoom.us/u/joezoomdev)
#### Post date: [July 23, 2024, 3:57am UTC](https://devforum.zoom.us/t/recording-shared-screen-with-linux-sdk/114172/3 "2024-07-23T03:57:12Z")

</div>

Yes. I basically have two separate Docker containers running the same code (the Ubuntu 22.04 Docker image) but one shares the screen and the other records it.

---

<div class="post-metadata">

### Author: ![joezoomdev](https://avatars.discourse-cdn.com/v4/letter/j/47e85d/32.png) [@joezoomdev](https://devforum.zoom.us/u/joezoomdev)
#### Post date: [July 23, 2024, 4:26am UTC](https://devforum.zoom.us/t/recording-shared-screen-with-linux-sdk/114172/4 "2024-07-23T04:26:00Z")

</div>

I should also add the code I’m using to record a user’s video:

```auto
m_pRecordingController->StartRawRecording();
ZoomSDKRendererDelegate* videoSource = new ZoomSDKRendererDelegate();
createRenderer(&videoHelper, videoSource);
videoHelper->setRawDataResolution(ZoomSDKResolution_720P);
videoHelper->subscribe(userID, RAW_DATA_TYPE_VIDEO);

```

where the `userID` is the Zoom user ID of the SDK that is sharing the screen.

Thank you for your time and help!

Edit: I looked at the `ZoomSDKRawDataType` enum, and well…  
`RAW_DATA_TYPE_SHARE`

But is there a way to record both the screen and the video simultaneously? If I do the above and add the line

```auto
videoHelper->subscribe(userID, RAW_DATA_TYPE_SHARE);

```

only the last subscription persists.

---

<div class="post-metadata">

### Author: ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)
#### Post date: [July 23, 2024, 7:17am UTC](https://devforum.zoom.us/t/recording-shared-screen-with-linux-sdk/114172/5 "2024-07-23T07:17:59Z")

</div>

@joezoomdev the sample being a sample only subscribes to the last type parsed in.

You can subscribe to both video and share at the same thing, but you will need to change your delegate (ZoomSDKRendererDelegate) to handle it. currently as they are going thru the same method, it will not work.

Another way is to use 2 different delegates instead of just 1 ZoomSDKRendererDelegate

---

<div class="post-metadata">

### Author: ![joezoomdev](https://avatars.discourse-cdn.com/v4/letter/j/47e85d/32.png) [@joezoomdev](https://devforum.zoom.us/u/joezoomdev)
#### Post date: [July 23, 2024, 4:05pm UTC](https://devforum.zoom.us/t/recording-shared-screen-with-linux-sdk/114172/6 "2024-07-23T16:05:41Z")

</div>

Ok, understood. Thank you for the clarification and your time.
