Files
SnapOtter/apps/docs/ar/tools/video/resize-video.md
T
SnapOtterandGitHub 4963ab3bbd feat(docs-i18n): translate all documentation into 20 languages
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.
2026-07-11 13:52:47 +08:00

2.3 KiB

description, i18n_source_hash, i18n_provenance, i18n_output_hash
description i18n_source_hash i18n_provenance i18n_output_hash
تغيير حجم الفيديو إلى دقة جديدة أو حجم مُعَدّ مسبقاً. bb1f67871fea human 920828e251a8

Resize Video

تغيير حجم الفيديو إلى دقة جديدة باستخدام أبعاد بكسل مخصصة أو إعداد مسبق قياسي.

API Endpoint

POST /api/v1/tools/video/resize-video

يقبل بيانات نموذج متعدد الأجزاء تحتوي على ملف فيديو وحقل JSON settings.

Parameters

Parameter Type Required Default Description
width integer No - العرض المستهدف بالبكسل (16-7680)
height integer No - الارتفاع المستهدف بالبكسل (16-4320)
preset string No "custom" إعداد الدقة المسبق: custom أو 2160p أو 1440p أو 1080p أو 720p أو 480p أو 360p

عندما تكون preset هي "custom"، يجب توفير واحد على الأقل من width أو height. يتغير البُعد الآخر بشكل متناسب.

Example Request

curl -X POST http://localhost:1349/api/v1/tools/video/resize-video \
  -H "Authorization: Bearer si_your-api-key" \
  -F "file=@clip.mp4" \
  -F 'settings={"preset": "720p"}'

تغيير الحجم إلى أبعاد مخصصة:

curl -X POST http://localhost:1349/api/v1/tools/video/resize-video \
  -H "Authorization: Bearer si_your-api-key" \
  -F "file=@clip.mp4" \
  -F 'settings={"width": 1280, "height": 720}'

Example Response

{
  "jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip.mp4",
  "originalSize": 25000000,
  "processedSize": 8500000
}

Notes

  • تُطابِق قيم الإعداد المسبق ارتفاعات قياسية (مثلاً 720p = 1280x720، 1080p = 1920x1080). يتغير العرض بشكل متناسب من نسبة العرض إلى الارتفاع للمصدر.
  • تُقرَّب الأبعاد إلى أرقام زوجية كما تتطلب معظم برامج ترميز الفيديو.
  • أقصى دقة مدعومة هي 7680x4320 (8K UHD).