تقسيم الفيديو
قسّم فيديو طويلًا إلى مقاطع تبدأ حيث يتغيّر الفيديو نفسه — لا كل ثلاثين ثانية. كل شيء يجري على جهازك.
متصفحك هو الذي يقرأ الملف ويعيد ترميزه. لا يُرسَل في أي طلب إلى أي مكان — فهذه الصفحة لا تملك خادمًا يُرفع إليه.
أسئلة
بم يختلف عن أدوات التقسيم الأخرى؟
معظمها يقطع كل عدد ثوانٍ، فيبدأ المقطع في منتصف جملة وينتهي في منتصف حركة. هذه الأداة تجد القطعات الموجودة في الفيديو أصلًا — أي تغيّرات اللقطة — وتبني المقاطع من لقطات كاملة. وتبقى المدة التقريبية اختيارك؛ الحدود وحدها هي التي تستقر عند أقرب تغيّر حقيقي بدل ساعة إيقاف.
ما النجوم بجانب كل مقطع؟
يقيّم المحرّك كل إطار مأخوذ من حيث الحدّة والإضاءة والتباين وثراء اللون والتفاصيل، ثم ينال كل مقطع المتوسط الموزون بالمدة للقطات داخله. والنجوم نسبية إلى أفضل مقطع في هذا الفيديو لا مقياسًا مطلقًا: هي اقتراح بما ينبغي النظر إليه أولًا، لا حكم على ما هو ممتع.
هل سيقطع القصّ العمودي أشخاصًا خارج الكادر؟
يأخذ وسط الكادر، وهو صواب في معظم الأحيان وخطأ حين يكون الموضوع إلى أحد الجانبين. ولا يوجد تتبّع للوجوه هنا بعد، فراجع المعاينات قبل النشر. وإن كانت اللقطة واسعة، فالقصّ اليدوي أفضل عادةً.
هل يُرفع الفيديو؟
لا. يفكّه المتصفح، ويحلّل WebAssembly إطاراته، وتُرمَّز المقاطع محليًا عبر WebCodecs — المسار العتادي نفسه الذي يستخدمه متصفحك لتشغيل الفيديو. لا يُرسَل شيء إلى أي مكان، ولهذا أيضًا لا توجد حدود اشتراك ولا طوابير ولا علامات مائية.
الأدوات الأخرى
أضف هذا إلى مشروعك
Splitting video at its shot changes — the same way this page does it, on the user's machine, with no server. Take the code, or hand the prompt to a coding agent.
// Shot detection uses the Life2Film engine:
// https://life2film.com/wasm/va_wasm.js
const engine = await import('https://life2film.com/wasm/va_wasm.js');
await engine.default({ module_or_path: 'https://life2film.com/wasm/va_wasm_bg.wasm' });
// pixels: centre-column mean RGB per sampled frame, timestamps in seconds
const { scenes } = JSON.parse(engine.detect_scenes_slick(JSON.stringify({
pixels, timestamps, duration, algo: 'adjacent_diffs',
}))); Build a video splitter that cuts at the shot changes instead of every N seconds, in the browser.
Requirements:
- Every other splitter cuts on a fixed interval, so clips open mid-gesture. Find the cuts the video
already has and build clips out of whole shots.
- Detect shots with the "life2film-engine" npm package (WebAssembly): sample frames, take the mean RGB
of the centre column, pass pixels + timestamps to detect_scenes_slick.
- Sampling rate decides accuracy, not the algorithm. At 2 samples/second boundaries land 1-3 seconds
out and all sixteen algorithms are wrong the same way; at 10/second they land on the frame. Use a
coarse pass to find candidates, then re-sample tightly around each one at ten times the resolution.
- Group whole shots into clips near the target length; never cut inside a shot. A shot longer than the
target becomes its own clip. Absorb a short tail into the previous clip rather than leaving a
two-second orphan.
- Rank clips by picture quality using score_frame, taking the MEDIAN score per shot (one bad frame
should not sink a good shot) and weighting by duration when combining shots.
- Encode with "mediabunny", trim: {start, end} per clip, and offer a 9:16 crop via
video: { width: 1080, height: 1920, fit: 'cover' }.
- Cap the input length — every sample is a seek costing tens of milliseconds.
Reference implementation: https://life2film.com/tools/video-splitter/
The engine is documented for agents, and every tool page is available as
markdown by adding .md to its address.