A professional Android video recording library with real-time camera effects, filters, beauty processing, and face detection.
- Camera Control - Supports both Camera API 1 and Camera API 2 with front/back switching, auto-focus, flash, zoom, and exposure control
- Video Recording - H.264 hardware-accelerated encoding via MediaCodec with configurable bitrate, frame rate, and resolution
- Playback Speed - 5 speed modes: 0.25x, 0.5x, 1.0x, 2.0x, 4.0x
- Filters - 40+ LUT-based color filters (polaroid, mocha, japanese, black & white, etc.)
- Effects/Stickers - 25+ real-time effects including stickers, split screen, blur, soul scale, shake, and more
- Beauty Filter - Real-time skin smoothing with adjustable intensity (0-100)
- Face Detection - Powered by Alibaba MNN Kit with up to 20 simultaneous faces, facial landmarks, head pose estimation, and face action detection
- Background Music - Silent music mixing directly into recorded video (no speaker output)
- OpenGL Rendering - GPU-accelerated frame processing via OpenGL ES 2.0/3.0
40+ built-in LUT filters available out of the box:
| Polaroid | Japanese | Snow | Black |
|---|---|---|---|
| Mocha | Amber | Cool | Unicorn |
All available filters
fair, snow, teanash, mocha, ubonto, city, caramel, natural, tender, japanese, mousse, past, azure, orangecool, begin, milk, grapefruit, refreshing, moving, teen, cheese, islands, sober, rose, danse, miscellaneous, amazing, polaroid, red, amber, firstlove, honey, cool, romeo, yogurt, peilan, tasty, delicious, contrast, dawn, unicorn, black, cookies, pure, begonia, innocence, years
graph TD
A[Android UI Layer<br/>Kotlin] --> B[MasterCamera Library<br/>Kotlin + JNI]
B --> C[Native Engine<br/>C++ / OpenGL ES]
C --> D[FFmpeg / x264 / FDK-AAC]
subgraph Recording Pipeline
E[Camera] -->|frames| F[OpenGL Render]
F -->|+ filters/effects| G[H.264 Encode]
H[Microphone] -->|PCM| I[Audio Mix]
J[Music File] -->|decode| I
I -->|AAC| K[MP4 Muxer]
G --> K
end
app/ # Demo application
MasterCamera/ # Core camera library (Android Library module)
src/main/java/ # Kotlin source code
src/main/cpp/ # Native C++ (OpenGL rendering, encoding, decoding)
extra/ # Pre-built native libraries (FFmpeg, x264, FDK-AAC, libpng, GLM)
| Component | Version |
|---|---|
| Android Gradle Plugin | 8.5.2 |
| Gradle | 8.7 |
| Kotlin | 1.9.24 |
| Compile SDK | 35 (Android 15) |
| Min SDK | 24 (Android 7.0) |
| Target SDK | 35 |
| NDK | 20.1.5948944 |
| CMake | 3.22.1 |
| Java | 17 |
| Library | Purpose |
|---|---|
| FFmpeg | Audio/video encoding, decoding, muxing |
| x264 | H.264 video encoder |
| FDK-AAC | AAC audio encoder |
| libpng | PNG image loading |
| GLM | OpenGL mathematics |
| MNN Kit | Face detection and tracking |
- 1920 x 1080
- 1280 x 720
- 960 x 540
- 720 x 720
./gradlew assembleDebugRequires JDK 17 and Android SDK with the NDK installed.
All rights reserved.