Recording Shared Screen with Linux SDK

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:

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

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

// 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.

@joezoomdev another instance as in another Linux SDK?

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.

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

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

videoHelper->subscribe(userID, RAW_DATA_TYPE_SHARE);

only the last subscription persists.

@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

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

1 Like