@stefanmartin/expo-video-watermark 0.4.4 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
# expo-video-watermark
|
|
2
2
|
|
|
3
|
-
An Expo native module for adding watermark images to videos on iOS and Android.
|
|
3
|
+
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).
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Works on **iOS** and **Android** with the **Expo 54 new architecture**
|
|
8
|
+
- Supports **HDR** and **SDR** videos
|
|
9
|
+
- Supports **H.265 (HEVC)** and **H.264** codecs
|
|
10
|
+
- Watermark is positioned at the bottom of the video, stretched edge-to-edge
|
|
4
11
|
|
|
5
12
|
## Installation
|
|
6
13
|
|
|
@@ -349,8 +349,13 @@ class ExpoVideoWatermarkModule : Module() {
|
|
|
349
349
|
// Build composition with HDR mode if needed
|
|
350
350
|
val compositionBuilder = Composition.Builder(listOf(sequence))
|
|
351
351
|
if (isHdr) {
|
|
352
|
-
|
|
353
|
-
|
|
352
|
+
// Use OpenGL-based tone-mapping instead of MediaCodec-based
|
|
353
|
+
// MediaCodec tone-mapping (HDR_MODE_TONE_MAP_HDR_TO_SDR_USING_MEDIACODEC) is not
|
|
354
|
+
// widely supported and fails with ERROR_CODE_DECODING_FORMAT_UNSUPPORTED on many
|
|
355
|
+
// devices (e.g., Pixel 8 Pro with Exynos HEVC decoder). OpenGL tone-mapping is
|
|
356
|
+
// more compatible as it uses shader-based processing.
|
|
357
|
+
Log.d(TAG, "[Step 14b] HDR video detected. Applying OpenGL-based tone-mapping to composition.")
|
|
358
|
+
compositionBuilder.setHdrMode(Composition.HDR_MODE_TONE_MAP_HDR_TO_SDR_USING_OPEN_GL)
|
|
354
359
|
} else {
|
|
355
360
|
Log.d(TAG, "[Step 14b] SDR video detected. No tone-mapping needed.")
|
|
356
361
|
}
|