Skip to main content
Version: 1.2.x

Video Processor - Flutter

VideoSDK allows you to add custom effects to your video stream before it's transmitted during video calls. This lets you enhance your video in creative ways or achieve specific functionalities.

Understanding Video Processing

Video processing involves manipulating raw video data (frames) captured by your camera. You can create native processors for Android and iOS to enhance video streams during meetings.

info
  • Currently, Video Processing is supported only on Android and iOS devices.

The VideoProcessor Interface

The VideoProcessor Interface defines a way for your code to interact with the video stream. It essentially lets you intercept each frame before it's sent and apply your processing logic.

Key Function: onFrameReceived

This is the heart of video processing with VideoSDK. Whenever a new video frame is captured by your camera, the onFrameReceived function is called. This function provides you with the raw frame data, allowing you to modify it as needed.

How it Works:

  1. Implement the Interface: Create a class that implements the VideoProcessor interface. Within this class, define the onFrameReceived function.

  2. Process the Frame: In the onFrameReceived function, access the raw video frame data. Apply your desired effects or manipulations to this data.

  3. Return the Processed Frame: After processing the frame, return the modified version to VideoSDK. This processed frame will then be transmitted during the video call.

  4. Register Your Processor: Create instances of all the processors you plan to use during the meeting and register them with the registerVideoProcessor() method from the VideoSDK class during your app's initialization.

  5. Apply the Processor: Select the desired processor and apply it during the meeting using the applyVideoProcessor() method from the VideoSDK class to utilize its features.

  6. Remove the Processor: Stop applying the selected video processor during the meeting, using the removeVideoProcessor() method from the VideoSDK class allowing you to switch to a different effect or processor as needed.

API Reference

The API references for all the methods utilized in this guide are provided below.

Got a Question? Ask us on discord