So you are developing an app in Kotlin and need video editing functionality for it. But making everything from scratch takes a lot of time and money, and you’d rather go to market sooner. In this article, we will show the features of a Kotlin video editor, tell about the most common use cases for it, and the specific steps to integrating it.
Video editor SDK in a nutshell
Banuba AI VE SDK is a premade module that can be quickly integrated into an app and provide a host of video editing capabilities. These include both the core ones (e.g. recording and trimming) and advanced features like augmented reality effects, voice modification, and picture-in-picture mode. Compared to an average java video editing library, AI VE SDK is more complex but also more powerful. It is not the only product of its kind but it is one of the best.
Its main use cases are:
- Short video apps. If you want to dethrone TikTok, you need to go to market ASAP and deliver a comparably enjoyable user experience. A solid SDK can give you both.
- Social media. The short video format is extremely popular now, with most social networks Instagram, Facebook, and others working to attract users with it. With AI Video Editor SDK you can get this functionality in a couple of days. See the example of Chingari for this use case.
- Mobile clipmaking. The SDK is compatible with native Android and iOS (Java/Kotlin video editors and Swift video editors) as well cross-platform frameworks like Flutter and React Native.
- eCommerce. Video editing functionality can be built into eCommerce apps to help promote products and support customers. This is quickly becoming the new norm.
- eLearning. A Kotlin video editor can be an invaluable part of an authoring tool. It allows quickly making and launching educational videos optimized for all screen sizes.
- Travel apps. Sharing videos from one’s journeys is an attractive proposition for users.
- Communication apps. Sending well-edited video messages with impressive effects is a good way to improve user experience in messengers and video calling applications.
The main benefits of using the AI Video Editor SDK lie in shortening the time-to-market. Developing the entire feature set from the ground up can take several months at least, while module integration can be done in a couple of days. However, it also makes video editing more accessible, encourages content creation, increases session time, and attracts new users.
If you want, you can try it for two weeks at no charge.
Kotlin video editor: Features
Let’s go over the most important functionalities step-by-step.
The video capture screen is intuitive and straightforward. It allows users to record clips and modify them on the go.
Besides its main purpose, it also has a hands-free mode, recording speed alteration, zoom, flashlight, timer, and microphone mute.
For a Kotlin video editor, this is probably the most important screen. Here the users can apply additional effects (e.g. AR masks, text and GIF overlays, voice modifications), save the project as a draft, etc.
Once a clip is uploaded, the SDK will show a timeline to make applying the features easily understandable. There are also options to export the video and add a watermark to it.
The basic license includes several default effects. However, additional ones can be purchased if you need them.
Here the users can change the soundtracks to their clips and modify them. They can also record their own voice or add a track from Mubert - a music service the SDK is integrated with.
This module is optional. If your vision doesn’t include users editing audio, you can skip it to decrease the app size.
Most of the AR features in this Kotlin video editor deal with face tracking. This includes applying TikTok-like face masks, background replacement, face morphing, triggers, etc.
To decrease the app size, effects can be stored in the AR cloud and downloaded by the users on-demand. A single mask could take 2-3 MBs of space, and if you want a large enough selection, it could lead to bloat. AR cloud solves this problem.
Note that the augmented reality features are optional for the SDK. As of version 1.19, some effects (e.g. LUTs) are available by default.
Integrating a Kotlin video editor
Before the actual integration can begin, review the requirements. As mentioned before, the SDK can serve as Java video editor but is also compatible with with cross-platform frameworks, so the requirements will be the same across the board.
This is what you need to run the AI Video Editor SDK
- Java 1.8+
- Kotlin 1.4+
- Android Studio 4+
- Android OS 6.0 or higher with Camera 2 API
- OpenGL ES 3.0 (3.1 for Neural networks on GPU)
The installation has the following dependencies:
- Kotlin Coroutines
- AndroidX libraries
- Banuba Face AR SDK. Optional. Video Editor SDK disables Face AR for devices with CPU armv7l(8 cores) and armv8(working in 32bit mode).
The full list of dependencies can be found on our GitHub profile.
The second preliminary step is getting a trial token. This will allow you to test the SDK for two weeks for free. To receive it, send us a message via a contact form.
Now let’s get to the main part of the integration.
Step 1. Download the integration sample
We store the documentation and samples on GitHub. You can access our profile whenever you want if you need to recheck something. The integration sample for Kotlin video editor can be found here:
Go to the downloaded project and select the Example folder. Open it in the terminal.
Step 2. Specify dependencies
The dependencies should be listed in the app/build.gradle file.
Step 3. Add the necessary activity
The VideoCreationActivity in AndroidManifest.xml is responsible for managing the main screens of the application.
See the instructions and the code sample.
Step 4. Add configuration files
The four files that handle the SDK parameters lie in the “Android assets” folder.
- The camera config file manages the min/max duration of the video, turns the flashlight on and off, etc.
- music_editor.json modifies the audio editor screen, e.g. the number of timelines or tracks allowed.
- object_editor.json includes properties that you can change on the editor screen.
- videoeditor.json lets you tweak the editor, trimmer, and gallery screens. Note that minVideoDuration and maxVideoDuration in this and camera.json should be the same.
Step 5. Configure dependency injection
You can change the way the Kotlin video editor behaves using DI libraries and tools.
See the instructions and code samples.
The necessary steps are described above. However, you can change and tweak other parameters, should you need it:
- Configure the SDK for Java video editor;
- Disable Face AR SDK (if you are running VE SDK alone);
- Configure export flow;
- Configure watermark;
- Configure media content;
- Configure audio content;
- Configure audio browser;
- Configure stickers;
- Configure record button;
- Configure camera timer;
- Configure cover preview screen;
- Configure screens;
- Configure background separation.
Integrating a Kotlin video editor in your app is a good way to decrease the time-to-market and encourage the creation of user-generated content. With this guide, you will be able to do so with no problem. Go ahead and take the first step - contact us and request the token to start your free trial.