Customize
Add backgrounds
All the apps bundle the effects folder at the repository root, so a background added there shows up everywhere.
- Put the original pictures (
.jpg.jpeg.png.webp) and videos (.mp4.mov.webm.mkv) ineffects-source/at the repository root. Git ignores that folder. Name the files in kebab-case after what they show, likecozy-living-room.jpgorbeach-sunset.mp4. The name becomes the ID and the title shown in the app ("Cozy living room"). - Run
python3 tools/prepare_effects.py. It needsffmpegandffprobe. Pictures are resized to 1920 px on the long side. Videos are cut to 1280 px, at most 15 s, 30 fps, H.264 without audio. Each one gets a 320×180 thumbnail, andeffects/backgrounds.jsonis rewritten. Use--forceto encode everything again. - Optionally edit the
namefields ineffects/backgrounds.json. They are kept the next time the script runs.
Blur and "none" are built into each app and don't need a file.
Add stickers
Stickers are listed in effects/stickers.json, with their artwork in effects/stickers.
- Sizes and offsets are measured in distances between the eyes, from the
anchor:eyes,noseormouth. - A positive
offsetYmoves the sticker up the face. heightis optional and stretches the artwork.
Every app places stickers with the same code, described in Sticker placement. If you change it on one platform, change it on all of them.
Change the app icon
The iOS, macOS, Android and Windows apps share one icon, drawn by tools/make_app_icons.py: an indigo to violet plate, a frosted glass disc and a white camera. After changing its colors or shapes, run:
sh
pip install pillow numpy
python3 tools/make_app_icons.pyIt rewrites:
- iOS:
AppIconwith light, dark and tinted variants. - macOS:
MacAppIcon, 16 to 1024 px on Apple's grid with a drop shadow. - Android: an adaptive icon with a monochrome layer for themed icons, WebP launchers for Android 7, and the 512 px Play Store image.
- Windows:
Assets/AppIcon.ico(16 to 256 px) andAppIcon.pngfor the title bar.
At 32 px and below the glass disc is dropped and the camera is drawn larger, so it stays readable.
Credits
- Stickers are based on Noto Emoji (Apache License 2.0, see
effects/stickers/LICENSE). The headphones were reshaped and recolored. - Background pictures and videos come from Pexels and Pixabay, under the Pexels license and the Pixabay Content License.
- The MediaPipe models (
selfie_segmenter,face_landmarker) are bundled with the Android app, converted to ONNX for the Windows app (Apache License 2.0, seewindows/models/NOTICE.txt), and loaded from MediaPipe's model storage on the web.
