mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
All 181 docs markdown files translated into 20 languages (apps/docs/<locale>/**). Companion to the i18n code PR; admin-merged because the file count exceeds GitHub's per-PR CI trigger limit. Validated by pnpm i18n:check (all surfaces, 0 stale/missing) and a clean all-locale docs build.
2.7 KiB
2.7 KiB
description, i18n_source_hash, i18n_provenance, i18n_output_hash
| description | i18n_source_hash | i18n_provenance | i18n_output_hash |
|---|---|---|---|
| ฝังลายน้ำข้อความลงบนเฟรมของวิดีโอ | 937bb075b894 | human | d293cc610da3 |
Watermark Video
ฝังลายน้ำข้อความลงบนทุกเฟรมของวิดีโอ พร้อมกำหนดค่าตำแหน่ง ขนาด ความทึบแสง และสีได้
API Endpoint
POST /api/v1/tools/video/watermark-video
รับข้อมูลแบบ multipart form พร้อมไฟล์วิดีโอและฟิลด์ JSON settings
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| text | string | Yes | - | ข้อความลายน้ำ (1-200 อักขระ) |
| position | string | No | "br" |
ตำแหน่งบนเฟรม: tl, tc, tr, l, c, r, bl, bc, br |
| fontSize | integer | No | 36 |
ขนาดฟอนต์เป็นพิกเซล (8-120) |
| opacity | number | No | 0.5 |
ความทึบแสงของลายน้ำ (0.05-1) |
| color | string | No | "#ffffff" |
สี Hex สำหรับข้อความ (เช่น "#ffffff") |
Position Values
- tl - บนซ้าย, tc - บนกลาง, tr - บนขวา
- l - กลางซ้าย, c - ตรงกลาง, r - กลางขวา
- bl - ล่างซ้าย, bc - ล่างกลาง, br - ล่างขวา
Example Request
curl -X POST http://localhost:1349/api/v1/tools/video/watermark-video \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@clip.mp4" \
-F 'settings={"text": "PREVIEW", "position": "c", "fontSize": 48, "opacity": 0.3}'
Example Response
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip.mp4",
"originalSize": 12500000,
"processedSize": 12400000
}
Notes
- ลายน้ำจะถูกเรนเดอร์ลงในเฟรมของวิดีโออย่างถาวรและไม่สามารถลบออกได้หลังการประมวลผล
- ลายน้ำใช้ฟอนต์ sans-serif ที่มีอยู่ในตัวของ FFmpeg
- สำหรับลายน้ำแบบรูปภาพ ให้ใช้เครื่องมือ Watermark สำหรับรูปภาพแทน