Skip to content

Latest commit

 

History

History
183 lines (143 loc) · 5.62 KB

File metadata and controls

183 lines (143 loc) · 5.62 KB

Overview

Core Concepts

The Video Editor API consists of two primary modules:

  • Playback API
  • Export API

Playback API

The VideoPlayer is the core component of the Playback API, implementing a familiar media player pattern.

Key Concepts

  1. Playlist Management - Add video sources for playback
  2. Playback Control - Play, pause, seek, and volume adjustment
  3. Effects Management - Apply and control video effects

Common Use Cases

Use Case Description
Video Trimming Trim and merge multiple video sources
Cover Selection Extract frames for video thumbnails
Video Editing Apply effects, filters, and audio tracks

👉 See Playback API Quickstart for integration guide.

Export API

The ExportFlowManager and ExportParamsProvider are the core components of the Export API, enabling video rendering with applied effects and audio.

Capabilities

  • Multiple Video Sources - Combine any number of video clips at various resolutions
  • Rich Effects - Export videos with all applied filters, overlays, and adjustments
  • Audio Integration - Add separate audio tracks to the final output
  • Slideshow Creation - Generate videos from a sequence of images
  • Preview Generation - Create GIF previews of exported videos

👉 See Export API Quickstart for integration guide.

Installation

Add the Banuba repository to your project using either Groovy or Kotlin DSL:

Groovy (in project's build.gradle)

...

allprojects {
    repositories {
       ...
       maven {
          name = "nexus"
          url = uri("https://nexus.banuba.net/repository/maven-releases")
       }
    }
}

or

Kotlin (settings.gradle.kts)

...
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        ...
        maven {
            name = "nexus"
            url = uri("https://nexus.banuba.net/repository/maven-releases")
        }
    }
}

Add packagingOptions to your app's gradle

android {
...
   packagingOptions {
       pickFirst '**/*.so'

      jniLibs {
         useLegacyPackaging = true
      }
   }
...
}

Add dependencies to your app's gradle

  def banubaSdkVersion = '1.53.0'
  implementation "com.banuba.sdk:ffmpeg:5.3.0"
  implementation "com.banuba.sdk:core-sdk:${banubaSdkVersion}"
  implementation "com.banuba.sdk:ve-sdk:${banubaSdkVersion}"
  implementation "com.banuba.sdk:ve-playback-sdk:${banubaSdkVersion}"
  implementation "com.banuba.sdk:ve-export-sdk:${banubaSdkVersion}"
  implementation "com.banuba.sdk:ve-effects-sdk:${banubaSdkVersion}"

  // Only if you use Banuba Face AR
  implementation "com.banuba.sdk:effect-player-adapter:${banubaSdkVersion}"

Koin Module Setup

  1. Create VideoEditorModule to initialize and customize the Video Editor SDK.
  2. Inside it, add SampleModule with your customizations:
   class VideoEditorApiModule {
    fun initialize(application: Application) {
        startKoin {
            androidContext(application)
            allowOverride(true)

            modules(
                VeSdkKoinModule().module,
                VeExportKoinModule().module,
                VePlaybackSdkKoinModule().module,
                // Module is required for applying Face AR masks
                BanubaEffectPlayerKoinModule().module,
                SampleModule().module
            )
        }
    }
}

private class SampleModule {

    val module = module {
        ...
    }
}

Launch

Initialize VideoEditorApiModule in your Application class. The BanubaVideoEditor is the core class responsible for initializing the product with your license token.

class SampleApp : Application() {
    override fun onCreate() {
        super.onCreate()

        val videoEditor = BanubaVideoEditor.initialize(LICENSE_TOKEN)
        if (videoEditor == null) {
            // Token is invalid. Verify your license token
        } else {
            // Initialize API modules
            VideoEditorApiModule().initialize(this@SampleApp)
        }
    }
}

❗ Important

  1. Returns nulll if the license token is invalid – verify your token
  2. Check license activation before starting the editor.

Dependencies

Next Steps

Get started with our comprehensive integration guides:

Guide Description
Playback API Quickstart Learn to implement video playback, trimming, and effects preview
Export API Quickstart Master video rendering and output generation

These guides provide step-by-step instructions to accelerate your integration.