Логотип Multicam Video Preprocessing

Multicam Video Preprocessing

Спільнота
sylphlin
multicam-video-preprocessing

Universal multi-camera video preprocessing and AI editing suite for 2 to 6 camera setups. Executes MFCC acoustic time alignment with subframe refinement (<0.125ms), EBU R128 two-pass linear loudness normalization (-14 LUFS), synchronized full-length camera master exporting (frame-accurate hardware re-encoding), Multi-in-One compact grid composition (canvas <= 1920x1080, min >= 640x480/CAM), zero-split Gemini 3.8 Flash Agentic Video EDL generation (100% Google Cloud Vertex AI via ADC + GCS storage with 2-day lifecycle auto-cleanup), FCP7 XML timeline export with NTSC fractional fps & drop-frame support (Primary), and direct video rendering (Secondary). Keywords: multicam, multi-camera, dual-cam, 4-cam, 6-cam, time alignment, audio sync, loudness normalization, video preprocessing, multicam pipeline, multi-in-one, token optimization, fcp7 xml, agentic video, vertex ai, gcs, adc.

Огляд

Видавецьsylphlin
Репозиторійmulticam-video-preprocessing
Назва навичкиmulticam-video-preprocessing
Зірки
22
Форки
1
Файли в пакеті
16
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 16

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Опубліковано на GitHub користувачем sylphlin. Перегляньте вихідний вміст перед установленням.

Встановлення

Установіть навичку ШІ Multicam Video Preprocessing у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до Плагіни → Навички.
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/sylphlin/multicam-video-preprocessing/tree/main/skills/multicam-video-preprocessing
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Нова навичка → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/sylphlin/multicam-video-preprocessing.git /tmp/multicam-video-preprocessing
mkdir -p .claude/skills
cp -r /tmp/multicam-video-preprocessing/skills/multicam-video-preprocessing .claude/skills/multicam-video-preprocessing
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Multicam Video Preprocessing в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Multicam Video Preprocessing, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції Markdown, а не код для певного постачальника, тому навичка Multicam Video Preprocessing не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож невикористана навичка нічого не коштує.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Multi-Camera Video Pipeline & AI Editing Suite (Antigravity Native Skill)

Universal end-to-end toolkit for multi-camera video production (2 to 6 Cameras), AI-assisted long-form video editing (Gemini 3.8 Flash 1M Token Context via Vertex AI), and professional NLE timeline export (DaVinci Resolve / Adobe Premiere Pro / Final Cut Pro).


Prerequisites & Environment

  • Google Antigravity IDE / Agent Framework
  • FFmpeg (with h264_videotoolbox hardware encoding and loudnorm filter support)
  • Python 3.8+ with numpy, google-genai, google-cloud-storage, requests
  • Cloud Credentials (100% ADC + Vertex AI & GCS):
    • Authenticate via gcloud auth application-default login
    • Run ./setup.sh once to automatically provision the GCS bucket (gs://multicam-video-${GOOGLE_CLOUD_PROJECT}), two-tier Lifecycle auto-cleanup rules (raw/ staging: 2 days; output/, deliverables/, multicam_assets/ deliverables: 15 days), Vertex AI Service Agent IAM (roles/storage.objectUser), and .env configuration.

Modular Toolset Architecture

StepScriptCore Module (scripts/modules/)Function
Step 1scripts/multicam_pipeline.pyaudio_sync.py, audio_normalizer.py, video_composer.pyMFCC Acoustic Sync + Subframe Refinement (0.125ms), EBU R128 (-14 LUFS), Synced Masters, Multi-in-One Full Grid (multicam_merged_full.mp4)
Step 2scripts/generate_edl.pyllm_client.py, gcp_client.py, video_segmenter.py, progress.py, edl_validator.py, assets/edl_interview_template.mdVertex AI Gemini 3.8 Flash Multimodal (Silence-Aware 30-40m Segmentation + Parallel Low-Res Inference) + EDL Validation -> edl_full.csv + Report
Step 3Ascripts/export_fcp7_xml.pyreporter.py, time_utils.py, edl_validator.pyFull-length EDL CSV -> FCP7 XML (final_cut_full.xml) for DaVinci / Premiere (EDL validation, NTSC float fps & drop-frame support)
Step 3Bscripts/edl_to_video.pyvideo_composer.py, edl_validator.pyHardware-accelerated clip cutting directly from synced masters -> final_cut_full.mp4 (with EDL validation)

Core Technical Principles

  1. MFCC Acoustic Time Alignment & Subframe Refinement (<0.125ms Accuracy):
    • Multi-camera synchronization is computed via pure numpy MFCC cross-correlation with a 3-tier fallback ladder (Fast 120s scan -> Full-length MFCC -> Raw waveform fallback) and localized time-domain subframe acoustic refinement, achieving sub-millisecond physical accuracy (<0.125ms, single audio sample at 8kHz) with 97.7% lower memory consumption. Evaluated against BBC standard score thresholds ($Z \ge 12.0$ High ✓ Aligned, $7.0 \le Z < 12.0$ Medium ℹ Aligned (marginal), $Z < 7.0$ Low ⚠️ LOW CONFIDENCE + stderr warnings & Summary Gate). Passing --strict-sync exits non-zero on low confidence. Synchronized camera masters (CAM*_synced.mp4) default to hardware-accelerated frame-accurate re-encoding (h264_videotoolbox / libx264 -crf 18), eliminating stream-copy keyframe snapping drift and black-frame stutter.
  2. EBU R128 Two-Pass Linear Loudness Normalization:
    • Audio tracks are normalized to $-14.0\text{ LUFS}$ ($LRA=11.0\text{ LU}$, $TP=-1.5\text{ dBTP}$) compliant with YouTube broadcast standards. Uses two-pass analysis: Pass 1 null-sink acoustic measurement, Pass 2 linear gain offset (linear=true) to eliminate dynamic pumping artifacts.
  3. Silence-Aware Smart Segmentation & Parallel Non-Agentic Inference:
    • Evaluates videos up to 40 minutes in a single pass via Vertex AI Gemini 3.8 Flash (MEDIA_RESOLUTION_LOW + dynamic thinking_budget). For long recordings (>40 minutes), generate_edl.py automatically detects natural speech pauses in 30-to-40-minute windows (silencedetect + RMS energy minimum), slices temporary chunks into <output_dir>/_edl_chunks/, runs parallel Vertex AI inference, shifts and stitches timestamps into a single edl_full.csv, and deletes all temporary local and GCS chunks in finally.
  4. Token- & Seek-Optimized Compact Grid Composition:
    • Merges 2 to 6 camera angles into a single multi-view canvas ($\le 1920 \times 1080$, each CAM $\ge 640 \times 480$) encoded at 1200k video bitrate, 10 fps, short GOP (-g 10, one keyframe per second), 16 kHz mono audio (64k), and -movflags +faststart for fast stream-copy slicing and cloud ingestion.
  5. Universal Pre-roll & Countdown Elimination (Zero-Tolerance & Asymmetric Safety Margin):
    • Systematically purges all on-set countdown noises ("5, 4, 3, 2, 1", "五四三二", "Ready Action") and pre-roll clutter. Enforces asymmetric safety margins where the start point is self-verified on the [Start, Start+2s] window to guarantee the opening frame aligns cleanly with the speaker's true opening word.
  6. 100% Pure Vertex AI (ADC) & GCS Cloud Architecture (Zero AI Studio Keys):
    • All model calls and multimodal media ingestion run exclusively on Google Cloud Vertex AI (GOOGLE_CLOUD_LOCATION=global) authenticated via Application Default Credentials (gcloud auth application-default login). Media assets are staged to Google Cloud Storage (gs://multicam-video-${PROJECT_ID}/raw/) with SHA-256 hash caching (avoiding redundant large video uploads on same-day re-runs), a 2-day GCS Bucket Lifecycle auto-deletion policy, and optional --cleanup-gcs immediate cleanup.
  7. Deterministic EDL Semantic Validation & --strict-edl Safeguard:
    • Pre-flight semantic validation covering 8 structural dimensions across 3 execution points (before disk write in generate_edl.py, and on EDL loading in export_fcp7_xml.py and edl_to_video.py). Evaluates 6 critical ERRORs (E_NO_ROWS, E_PARSE_TIME, E_NEGATIVE_DURATION, E_NON_MONOTONIC, E_OVERLAP, E_EMPTY_CAMERA) and 2 WARNs (W_UNKNOWN_CAMERA, W_GAP). Passing --strict-edl halts execution with exit code 1 on ERROR (default warns and continues; generate_edl.py always writes bad data to disk before exit for post-mortem inspection). Supports report localization via --lang (built-in en and zh-TW, with silent fallback to en), customizable gap threshold via --edl-max-gap-sec (default: 0.05), and camera whitelist via --edl-known-cameras (defaults to ^CAM\d+$ regex in generator, auto-inferred from media directory in exporter/renderer).

3-Stage Gated Execution Runbook

When executing a multi-camera task, follow this sequential 3-stage gated workflow. Resolve ${SKILL_DIR} to the directory containing this SKILL.md (skills/multicam-video-preprocessing).

Live Progress Reporting & User Feedback Protocol

  • Before Each Stage: Output a concise status update to the user announcing the active stage and its sub-steps (Stage 1: Step 1/4 Audio Sync -> Step 2/4 -14 LUFS Norm -> Step 3/4 Synced Masters -> Step 4/4 Grid Merge, Stage 2: Step 1/3 Silence Segmentation -> Step 2/3 Gemini 3.8 Flash Inference -> Step 3/3 8-Check EDL Validation, Stage 3A: FCP7 XML Export, Stage 3B: Direct Video Render).
  • During Long-Running Commands (NotificationTimeoutSeconds=60):
    • Always set NotificationTimeoutSeconds=60 when running multicam_pipeline.py, generate_edl.py, or edl_to_video.py via run_command.
    • Whenever a command is still running after 60 seconds, inspect the latest [Stage N - Step X/Y] and ⏳ [In Progress] lines in the task output, send a 1-line progress update to the user in the chat window (e.g., which step/part is currently running and elapsed time), and schedule a 60-second follow-up check (schedule with DurationSeconds="60" and TimerCondition="<task-id>") until the command completes.

Stage 1: Physical Preprocessing (Sync, Normalization, Master Export, Grid Merge)

  • User Status Update: "正在執行 Stage 1:多機位聲學對齊、-14 LUFS 響度標準化、同步母帶匯出與多分割網格合成..." (localized to user's language)
  • Execution Command (run with NotificationTimeoutSeconds=60):
    bash
    # Local Camera Files or Google Drive File Links:
    python3 "${SKILL_DIR}/scripts/multicam_pipeline.py" \
      --ref <CAM1.mp4_OR_GDRIVE_LINK> --targets <CAM2.mp4_OR_GDRIVE_LINK...> \
      --normalize --merge -o <OUTPUT_DIR>
    
    # Or Direct Google Drive Folder URL / Folder ID (Auto-discovers & sorts CAM1..CAMn via ADC):
    python3 "${SKILL_DIR}/scripts/multicam_pipeline.py" \
      --gdrive-folder "<GDRIVE_FOLDER_URL_OR_ID>" \
      --normalize --merge -o <OUTPUT_DIR>
  • Exit Gate 1 Verification (Mandatory before Stage 2):
    • <OUTPUT_DIR>/multicam_sync.json exists with valid offset data.
    • <OUTPUT_DIR>/<CAM>_synced.mp4 full-length synchronized masters exist for all cameras.
    • <OUTPUT_DIR>/multicam_merged_full.mp4 grid video exists and is non-empty.

Stage 2: Gemini AI Multimodal Rough-Cut (Silence-Aware Smart Segmentation + Parallel Low-Res Inference)

  • User Status Update: "正在執行 Stage 2:靜音感知智慧分段與 Gemini 3.8 Flash 多模態鏡頭粗剪分析..." (localized to user's language)
  • Execution Command (run with NotificationTimeoutSeconds=60):
    bash
    python3 "${SKILL_DIR}/scripts/generate_edl.py" \
      -v <OUTPUT_DIR>/multicam_merged_full.mp4 \
      --strict-edl --lang <zh-TW|en>
  • Exit Gate 2 Verification (Mandatory before Stage 3):
    • <OUTPUT_DIR>/edl_full.csv exists and size $> 0\text{ bytes}$.
    • Deterministic EDL semantic validation passed with zero ERROR issues (E_NO_ROWS, E_PARSE_TIME, E_NEGATIVE_DURATION, E_NON_MONOTONIC, E_OVERLAP, E_EMPTY_CAMERA).
    • <OUTPUT_DIR>/edl_full_report.md exists with cutting rationale and validation report table.

Stage 3A: Export NLE Timeline (Primary Path / 90% Use Case)

  • User Status Update: "正在執行 Stage 3A:匯出剪輯時間線 (FCP7 XML)..." (localized to user's language)
  • Execution Command:
    bash
    python3 "${SKILL_DIR}/scripts/export_fcp7_xml.py" \
      -d <OUTPUT_DIR> -o <OUTPUT_DIR>/final_cut_full.xml \
      --strict-edl --lang <zh-TW|en>
  • Exit Gate 3A Verification & Proactive Stage 3B Offer:
    • Verify <OUTPUT_DIR>/final_cut_full.xml exists and size $> 0\text{ bytes}$.
    • Mandatory User Prompt: When finishing at Stage 3A (without running Stage 3B), ALWAYS inform the user in your final summary that if they also want a directly playable multi-camera rough-cut MP4 video (<OUTPUT_DIR>/final_cut_full.mp4) assembled according to edl_full.csv, you can immediately run Stage 3B (edl_to_video.py) to render it for them.

Stage 3B: Direct Video Rendering (Secondary Fast Preview Path / 10% Use Case)

  • User Status Update: "正在執行 Stage 3B:依照 EDL 切換機位渲染成品影片 (final_cut_full.mp4)..." (localized to user's language)
  • Execution Command (run with NotificationTimeoutSeconds=60):
    bash
    python3 "${SKILL_DIR}/scripts/edl_to_video.py" \
      --edl <OUTPUT_DIR>/edl_full.csv --media-dir <OUTPUT_DIR> \
      -o <OUTPUT_DIR>/final_cut_full.mp4 --strict-edl --lang <zh-TW|en>
  • Exit Gate 3B Verification:
    • <OUTPUT_DIR>/final_cut_full.mp4 exists with duration $> 0$.

CLI Options Reference

1. Stage 1 — multicam_pipeline.py

OptionDefaultDescription
--refNoneReference anchor camera video path or Google Drive link (CAM1)
--targets, --targetNoneTarget camera video paths or Google Drive links (CAM2..CAM6)
--gdrive-folderNoneGoogle Drive Folder URL or ID containing 2–6 camera videos
-o, --output-diroutputOutput directory for synced camera masters, grid video, and reports
--normalizeFalseEnable EBU R128 (-14.0 LUFS) two-pass linear audio normalization
--merge, --multi-in-oneFalseRender merged multi-in-one grid video (multicam_merged_full.mp4)
--lufs / --lra / --tp-14.0 / 11.0 / -1.5EBU R128 integrated loudness, loudness range, and true peak targets
--encoderh264_videotoolboxHardware video encoder (fallback: libx264)
--stream-copyFalseExport synced masters using -c copy instead of frame-accurate re-encoding
--strict-syncFalseExit non-zero if any camera alignment confidence score is low (Z < 7.0)

2. Stage 2 — generate_edl.py

OptionDefaultDescription
-v, --video, -i, --input(Required)Path to composite grid video (multicam_merged_full.mp4)
-o, --output-dir<video_dir>Output directory for edl_full.csv and edl_full_report.md
-t, --templateassets/edl_interview_template.mdCustom prompt template file path
--modelgemini-3.8-flashVertex AI Gemini model name
--processingstandardVideo processing mode: standard (Low-Res + silence segmentation) or agentic
--chunk-min-dur / --chunk-max-dur1800.0 / 2400.0Min/Max chapter duration in seconds (30–40 min) for silence splitting
--strict-edlFalseExit with code 1 when EDL validation finds ERROR issues
--langenLanguage for the EDL validation report (en, zh-TW)
--edl-max-gap-sec0.05Maximum allowed gap in seconds between consecutive EDL cuts
--edl-known-cameras^CAM\d+$Comma-separated expected camera names (CAM1,CAM2,...)
--cleanup-gcsFalseImmediately delete staged grid video from GCS after completion

3. Stage 3A — export_fcp7_xml.py

OptionDefaultDescription
-d, --dirNoneDirectory containing edl_full.csv and synced camera masters
-e, --edlNoneExplicit path(s) to EDL CSV file(s)
-o, --outputfinal_cut_full.xmlOutput FCP7 XML timeline path
-m, --media-dir<edl_dir>Directory containing camera media files
--fps30.0Sequence frame rate (23.976, 24, 25, 29.97, 30, 50, 59.94, 60)
--drop-frameFalseEnable drop-frame timecode (DF) for NTSC sequences
--use-raw-mediaFalseLink to original raw camera files using multicam_sync.json offsets
--strict-edl / --langFalse / enEnforce strict EDL validation and set report language

4. Stage 3B — edl_to_video.py

OptionDefaultDescription
--edl(Required)Path to input EDL CSV file (edl_full.csv)
--media-dir<edl_dir>Directory containing synchronized camera masters (CAM*_synced.mp4)
-o, --outputfinal_cut_full.mp4Output rendered MP4 path
--encoderh264_videotoolboxHardware video encoder for single-pass rendering
--strict-edl / --langFalse / enEnforce strict EDL validation and set report language

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ Multicam Video Preprocessing?

Universal multi-camera video preprocessing and AI editing suite for 2 to 6 camera setups. Executes MFCC acoustic time alignment with subframe refinement (<0.125ms), EBU R128 two-pass linear loudness normalization (-14 LUFS), synchronized full-length camera master exporting (frame-accurate hardware re-encoding), Multi-in-One compact grid composition (canvas <= 1920x1080, min >= 640x480/CAM), zero-split Gemini 3.8 Flash Agentic Video EDL generation (100% Google Cloud Vertex AI via ADC + GCS storage with 2-day lifecycle auto-cleanup), FCP7 XML timeline export with NTSC fractional fps & drop-fr...

Навіщо використовувати Multicam Video Preprocessing у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Multicam Video Preprocessing — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Multicam Video Preprocessing у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/sylphlin/multicam-video-preprocessing/tree/main/skills/multicam-video-preprocessing. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Multicam Video Preprocessing?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Multicam Video Preprocessing?

Зі скількома забажаєте. Якщо модель підтримує навички, ви можете використовувати з нею Multicam Video Preprocessing — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama та інші — усе в TypingMind із власними ключами API.

Чи безкоштовна навичка ШІ Multicam Video Preprocessing?

Навичку опубліковано на GitHub: sylphlin. Умови ліцензування дивіться в репозиторії. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це багаторазовий набір інструкцій, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти для виклику — код, який десь виконується й повертає результат. Натомість навичка ШІ надає моделі знання та порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇