Publish Video - IoT SDK
The Video publishing feature lets an IoT device capture frames from its on-board camera and stream them into a meeting, enabling real-time video alongside audio in your VideoSDK-powered applications.
startPublishVideo()
- The
startPublishVideo()function initiates publishing video captured from your IoT device camera into the active meeting session. - This function takes no parameters.
-
You must call the
init()method before invokingstartPublishVideo(). If not, the function returns anINIT_NOT_CALLEDresult code. -
Set
.videoCodec = VIDEO_CODEC_JPEGininit(). It is the only supported video format. -
Video can only be published once. Calling this function again while video is already publishing returns a
TASK_ALREADY_STARTEDresult code. -
Publishing needs a board with a camera; without one it returns
DEVICE_NOT_SUPPORTED. See Supported Microcontrollers. -
There is no separate stop call.
leave()tears down all publishing and subscribing when you exit the meeting.
Example
#include "videosdk.h"
#include "esp_log.h"
void app_main(){
result_t publish_video_result = startPublishVideo();
ESP_LOGI("IOT-SDK", "Publish Video Result: %d", publish_video_result);
}
API Reference
The API references for all the methods utilized in this guide are provided below.
Got a Question? Ask us on discord

