@stefanmartin/expo-video-watermark
v1.0.0
Published
Creating video watermarks on locally stored videos
Maintainers
Readme
expo-video-watermark
An Expo native module for adding watermark images to videos on iOS and Android. The watermark is placed at the bottom of the video and stretched to fit the full width (left to right edges).
Features
- Works on iOS and Android with the Expo 54 new architecture
- Supports HDR and SDR videos
- Supports H.265 (HEVC) and H.264 codecs
- Watermark is positioned at the bottom of the video, stretched edge-to-edge
Installation
npx expo install @stefanmartin/expo-video-watermarkUsage
import ExpoVideoWatermark from '@stefanmartin/expo-video-watermark';
// Add a watermark to a video
const outputPath = await ExpoVideoWatermark.watermarkVideo(
'/path/to/source/video.mp4',
'/path/to/watermark.png',
'/path/to/output/video.mp4'
);
console.log('Watermarked video saved to:', outputPath);API
watermarkVideo(videoPath, imagePath, outputPath)
Adds a watermark image onto a video and writes the result to the specified output path.
Parameters:
| Name | Type | Description |
|------|------|-------------|
| videoPath | string | Local filesystem path to the source MP4 video |
| imagePath | string | Local filesystem path to the PNG watermark image |
| outputPath | string | Local filesystem path where the output MP4 should be written |
Returns: Promise<string> - Resolves with the output path on success.
Platform Support
| Platform | Supported | |----------|-----------| | iOS | Yes | | Android | Yes | | Web | No |
License
MIT
