# Video extension (/en/realtime-media/marketplace/build/build-your-own-extension/video-filter)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

The video filters you create are easily integrated into apps to supply visual effects and background processing.


      
## Understand the tech

A video filter accesses video data when it is captured from the user's local device, modifies it, then plays the updated data to local and remote video channels.

![Video extension pipeline](https://assets-docs.agora.io/images/video-sdk/extension-video-filter.png)

A typical transmission pipeline consists of a chain of procedures, including capture, pre-processing, encoding, transmitting, decoding, post-processing, and playback. To modify the voice or video data in the transmission pipeline, video extensions are inserted into either the pre-processing or post-processing stage.

## Prerequisites

* Android Studio 4.1 or higher.
* Android SDK API Level 24 or higher.
* A mobile device that runs Android 4.1 or higher.
* A project to develop in.

## Project setup

In order to integrate an extension into your project:

* Follow the SDK setup flow in [Quickstart - integrate an extension](../../quickstart-integrate.mdx).
* Prepare the Android project structure and Gradle dependencies required for the extension package.

You are now ready to develop your extension.

## Create a video extension

After encapsulating the filter into an extension, you need to register and package it into a `.aar` or `.so` file, and submit it together with a file that contains the extension name, vendor name, and filter name to Agora.

### Package the extension

1. Register the extension.

   Register the extension with the `REGISTER_AGORA_EXTENSION_PROVIDER` macro in `AgoraExtensionProviderEntry.h`. Use this macro at the entrance of the extension implementation. When the SDK loads the extension, this macro automatically registers it to the SDK. For example:

   ```cpp
   REGISTER_AGORA_EXTENSION_PROVIDER(ByteDance, agora::extension::ExtensionProvider);
   ```

2. Link the `libagora-rtc-sdk-jni.so` file.

   In `CMakeLists.txt`, specify the path to save the `libagora-rtc-sdk-jni.so` file in the downloaded SDK package according to the following table:

   | File                             | Path                                                                     |
   | -------------------------------- | ------------------------------------------------------------------------ |
   | 64-bit `libagora-rtc-sdk-jni.so` | `AgoraWithByteDanceAndroid/agora-bytedance/src/main/agoraLibs/arm64-v8a` |
   | 32-bit `libagora-rtc-sdk-jni.so` | `AgoraWithByteDanceAndroid/agora-bytedance/src/main/agoraLibs/arm64-v7a` |

3. Provide extension information.

   Create a `.java` or `.md` file to provide the following information:

   * `EXTENSION_NAME`: The name of the target link library used in `CMakeLists.txt`. For example, for a `.so` file named `libagora-bytedance.so`, the `EXTENSION_NAME` should be `agora-bytedance`.
   * `EXTENSION_VENDOR_NAME`: The name of the extension provider, which is used for registering in the `agora-bytedance.cpp` file.
   * `EXTENSION_FILTER_NAME`: The name of the filter, which is defined in `ExtensionProvider.h`.

## Test your implementation

* Run functional and performance tests.
* Validate the extension listing in Agora's test environment.
* Prepare the public integration document and update it after end-to-end verification.

You are then ready to [Publish your extension](../publish-extension.md).

## Reference

* [RtcEngineConfig.addExtension](/en/api-reference/rtc/android/class-and-enum/classes/class-rtcengineconfig)
* [enableExtension](/en/api-reference/rtc/android/video/pre-and-post-processing/extensions)
* [setExtensionProperty](/en/api-reference/rtc/android/video/pre-and-post-processing/extensions)
* [IMediaExtensionObserver](/en/api-reference/rtc/android/class-and-enum/interfaces/class-imediaextensionobserver)

    
  
      
  
      
  
      
  
      
  
      
  
      
  
      
  
      
  


## Platform-specific versions
- [Android](/en/realtime-media/marketplace/build/build-your-own-extension/video-filter/android.md)
- [iOS](/en/realtime-media/marketplace/build/build-your-own-extension/video-filter/ios.md)
- [macOS](/en/realtime-media/marketplace/build/build-your-own-extension/video-filter/macos.md)
- [Web](/en/realtime-media/marketplace/build/build-your-own-extension/video-filter/web.md)
- [Windows](/en/realtime-media/marketplace/build/build-your-own-extension/video-filter/windows.md)
- [Electron](/en/realtime-media/marketplace/build/build-your-own-extension/video-filter/electron.md)
- [Flutter](/en/realtime-media/marketplace/build/build-your-own-extension/video-filter/flutter.md)
- [React Native](/en/realtime-media/marketplace/build/build-your-own-extension/video-filter/react-native.md)
- [Unity](/en/realtime-media/marketplace/build/build-your-own-extension/video-filter/unity.md)
