Unable to capture video stream in Linux Meeting SDK

I want to capture the participant video streams in a meeting. There are no errors when the video stream is setup at the start of the meeting. However, I never receive any data either.

I noticed from the logs that the recording status is off. Not sure if this is the root cause or if it’s something else.

ZoomSDKRendererDelegate: onRawDataStatusChanged = 1

Ref: ZOOM Windows SDK: h/rawdata/rawdata_renderer_interface.h Source File

What am I doing wrong? It cannot be recording permissions because my bot is successfully able to capture the audio streams.

Code

IZoomSDKRendererDelegate implementation:

class ZoomSDKRendererDelegate : public IZoomSDKRendererDelegate
{
public:
    virtual void onRawDataFrameReceived(YUVRawDataI420 *data);
    virtual void onRawDataStatusChanged(RawDataStatus status);
    virtual void onRendererBeDestroyed();
};

--

void ZoomSDKRendererDelegate::onRawDataFrameReceived(YUVRawDataI420 *data)
{
    std::cout << "ZoomSDKRendererDelegate: onRawDataFrameReceived" << std::endl;
    std::cout << "ZoomSDKRendererDelegate: width:    " << data->GetStreamWidth()  << std::endl;
    std::cout << "ZoomSDKRendererDelegate: height:   " << data->GetStreamHeight() << std::endl;
    std::cout << "ZoomSDKRendererDelegate: sourceID: " << data->GetSourceID()     << std::endl;
}

void ZoomSDKRendererDelegate::onRawDataStatusChanged(RawDataStatus status)
{
    std::cout << "ZoomSDKRendererDelegate: onRawDataStatusChanged = " << status << std::endl;
}

void ZoomSDKRendererDelegate::onRendererBeDestroyed()
{
    std::cout << "ZoomSDKRendererDelegate: onRendererBeDestroyed." << std::endl;
}

Subscribing to all the participant video streams at the start of a meeting:

    std::cout << "Starting the video subscription now" << std::endl;
	auto participant_user_ids = get_all_user_ids(); 
	for (auto user_id : participant_user_ids)
	{
        ZoomSDKRendererDelegate* videoSource = new ZoomSDKRendererDelegate();
        IZoomSDKRenderer* videoHelper;
        SDKError renderer_err = createRenderer(&videoHelper, videoSource);
        if (renderer_err != SDKERR_SUCCESS)
        {
            std::cout << "Error occurred in trying to createRenderer" << std::endl;
            continue;
        }
        std::cout << "Subscribing to user ID for video stream: " << user_id << std::endl;
        SDKError resolution_err = videoHelper->setRawDataResolution(ZoomSDKResolution_720P);
        if (resolution_err != SDKERR_SUCCESS)
        {
            std::cout << "Error occurred setting resolution for video : " << resolution_err << std::endl;
            continue;
        }
		SDKError subscribe_err = videoHelper->subscribe(user_id, RAW_DATA_TYPE_VIDEO);
		if (subscribe_err != SDKERR_SUCCESS)
        {
            std::cout << "Error occurred subscribing to video : " << subscribe_err << std::endl;
        }
	}
}

Hi @saranshabd

How many participants are there in your meeting? Zoom caps the amount of video bandwidth a single client can request, so if you request more than a certain number of 720P video feeds, Zoom will reject that request. I would retry with only one participant in the meeting.

If you’re open to other options besides working with the C++ SDK, I’m building a few open source tools that might be helpful:

  1. Python bindings for the Linux Meeting SDK - You might want to use this if you’re more comfortable working with Python than C++. The repo includes a sample program that demonstrates grabbing the raw video stream.

  2. Meeting Bot API - This is an API that hides a lot of the complexity of the meeting SDK. It can do common meeting bot tasks like recording synchronized video and audio and getting transcripts. It currently only supports a video stream for the active speaker, but if you’re interested in using it, I can add support for a gallery view of multiple participants.

Hi @saranshabd,

What does your testing setup for your bot look like at the moment? Can you verify that at least one of the meeting participants has their camera on and activated? If not, this might explain why you’re not receiving any video data at all while you are successfully receiving audio streams.

I would suggest adding additional logging to ZoomSDKRendererDelegate::onRawDataStatusChanged to tell you if/when a participant’s video stream actually becomes active or inactive.

If you’re looking to get raw audio and video from Zoom meetings, another alternative is to use Recall.ai. It’s a simple 3rd party API for meeting bots to get the raw audio/video from meetings without you needing to spend months to build, scale and maintain these bots.

Let me know if you have any questions!