AI-translated from English; not yet reviewed by a fluent editor.

# 將一段自有長影片製作成五支經過檢查的直式短片

> 以文件為依據，製作五個對照原片查核的片段，搭配修正字幕、直式構圖與人工審查。

By BIG CHANGE Editorial

Published: 2026-10-21T09:43:38.285Z
Updated: 2026-10-21T09:43:38.285Z
Canonical: https://bigchange.ai/blog/five-checked-video-shorts-claude-code-whisper-ffmpeg

![Conceptual charcoal illustration of five upright unbranded phones in a wall shelf, each showing a generic vertical image with a blank orange caption bar.](https://bigchange.ai/api/media/file/owned-video-five-shorts-hero-v1.png)
AI-generated conceptual illustration by BIG CHANGE.

一段錄影可以提供多個短片，但逐字稿不能判斷節選是否忠於上下文，1080 × 1920 的匯出尺寸也不代表影片適合觀看。本指南用五個手動呼叫的 Claude Code 專案技能安排轉錄、排序、剪輯、字幕及轉譯輸出。人工編輯核准每個原片區間，並完整觀看每份成品。流程僅適用於你擁有或明確獲准編輯及分享的影片。

這份操作方式以文件為依據，適用於 macOS Terminal 與 zsh。BIG CHANGE 未執行這些命令、查看私人素材或製作五份檔案。操作前請查閱已安裝工具的說明與實際媒體。主圖只是創作者將審查之五支直式影片的概念插畫，並非真實片段、軟體輸出或 BIG CHANGE 對流程的測試。

## 關鍵變化

- **變化是什麼：** Claude Code 專案技能能將本機影片編輯分成五個手動呼叫階段。建議的交接紀錄將原片時間、核准剪輯、修正字幕與最終檔案連結起來；工具文件不代表這條特定流程已成功執行。
- **為何重要：** 持有素材使用許可的創作者可在每個階段交給人工編輯一項明確決定，包括是否真的存在五段不同的可用節選。這種安排讓薄弱或誤導的剪輯能在加字幕匯出前被拒絕。
- **需注意什麼：** 能否分享結果仍取決於權利、所選 Claude 帳戶的資料政策，以及對每份已儲存 MP4 的完整播放檢查。技術檢測通過不能解決這些問題。

## 開始之前

你需要本機的 `source.mp4` ，其中音訊可用，並有足夠儲存空間、Claude Code 存取權、可運作的本機 whisper.cpp `whisper-cli` 與支援目標語言的模型，以及包含所需編碼器、濾鏡的 FFmpeg、ffprobe。還需一名能查核原片與五份匯出檔的編輯。記錄 Claude Code 帳戶及資料政策、安裝版本、whisper.cpp 提交或建置、模型 SHA-256 與授權、使用限制。即使轉錄與輸出在本機執行，Claude Code 仍可能使用託管模型。只授權它存取符合素材權利及帳戶政策的逐字稿或媒體。其 [技能說明](https://code.claude.com/docs/en/skills) 不會限制存取；另有獨立的 [工具權限控制](https://code.claude.com/docs/en/permissions) 管理工具呼叫。視設定而定，一般唯讀操作可能無須詢問就執行。應主動檢查技能可讀取什麼，而非只看它打算寫入或執行什麼。

在可信的新本機執行資料夾放入不可變的原片副本與 `rights.json` 。權利紀錄應列出原片 SHA-256、編輯、允許的節選及後續用途、講者、音樂和畫面的許可，以及儲存與保留規則。權利不明時不要繼續。在該資料夾開啟 Terminal，確認 `pwd`，再建立工作資料夾：

```shell
mkdir -p transcript clips captions shorts probes .claude/skills/video-transcribe .claude/skills/video-rank .claude/skills/video-cut .claude/skills/video-caption .claude/skills/video-vertical
command -v claude
command -v ffmpeg
command -v ffprobe
claude --version
ffmpeg -version
ffprobe -version
ffmpeg -hide_banner -h encoder=libx264
ffmpeg -hide_banner -h encoder=aac
ffmpeg -hide_banner -h filter=subtitles
ffmpeg -hide_banner -h filter=scale
```

將 `WHISPER_CLI` 與 `WHISPER_MODEL` 設為真實且加引號的絕對路徑。將 `LANGUAGE` 設為已查核的口語語言代碼，例如 `en` 只在音訊為英語時使用。確認模型支援該語言；僅支援英語的 `.en` 模型不能處理其他語言。混合或不支援的語言須先有經查核的方案。 [whisper.cpp CLI 參考文件](https://github.com/ggml-org/whisper.cpp/blob/master/examples/cli/README.md) 記載 `-l`、 `-m`、 `-f`、 `-osrt`、 `-oj` 與 `-of`；請對照安裝版本的說明檢查。不要啟用它的翻譯選項。

```shell
WHISPER_CLI='/absolute/path/to/whisper-cli'
WHISPER_MODEL='/absolute/path/to/approved-model.bin'
LANGUAGE='en'
test -x "$WHISPER_CLI"
test -r "$WHISPER_MODEL"
"$WHISPER_CLI" --help
ffprobe -v error -show_entries format=duration:stream=index,codec_type,codec_name,width,height,sample_aspect_ratio -of json source.mp4
```

執行前替換範例路徑及語言。檢查原片長度、串流、方向、音訊與可用空間。確認已安裝的 `subtitles` 濾鏡支援 libass，並確認 `scale` 接受 `force_original_aspect_ratio`、 `force_divisible_by` 與 `reset_sar`。缺少必要功能時，依維護者建置說明處理，再重做檢查。不要默默省略字幕。

## 建立五個範圍明確的專案技能

在可信專案中分別儲存五個 `.claude/skills/<name>/SKILL.md` 檔案。每個都需要自己的 `name`、 `description`、 `disable-model-invocation: true`，以及完整的輸入、動作、輸出與停止規則。按以下順序手動呼叫： `/video-transcribe`、 `/video-rank`、 `/video-cut`、 `/video-caption`、 `/video-vertical`。不要加入 `allowed-tools`：Claude Code 表示，這個欄位會在呼叫時授予所列工具無須詢問的使用權限，並不是將技能限制在這些工具內。保留正常權限設定並主動審查存取。唯讀呼叫可能不詢問，寫入及執行則依實際帳戶控制處理。

使用以下完整內容，以及下文共用的執行紀錄。技能中的文字是給 Claude Code 的指示，不是強制執行的存取邊界。

**`.claude/skills/video-transcribe/SKILL.md`**

```markdown
---
name: video-transcribe
description: Transcribe the authorized local source for the five-short workflow.
disable-model-invocation: true
---

Input: rights.json, immutable source.mp4, checked source probe, verified language and local whisper.cpp executable/model. Confirm matching source and model hashes, usable audio and permitted access before any command.
Action: From the checked run directory, confirm source.wav and both transcript output paths do not exist. Extract mono 16 kHz 16-bit PCM source.wav with explicit first-audio mapping and no overwrite. Continue to whisper-cli only after a zero exit and valid WAV readback; use the verified model and explicit language, SRT and JSON output, and translation off. Inspect both outputs, parse source-relative times, and compare representative passages and uncertain names or quotes against source audio. Record a nonzero exit or uncertain output as a manifest blocker before any next stage.
Output: transcript/source.srt and transcript/source.json, recorded hashes, corrections or marked uncertainties, tool and model identity in manifest.json.
Stop: Missing rights, changed inputs, absent audio, empty or malformed transcript, or unverified relevant speech. Do not upload, publish or overwrite accepted files; ask the editor to settle uncertainty.
```

**`.claude/skills/video-rank/SKILL.md`**

```markdown
---
name: video-rank
description: Suggest source moments for human selection of five distinct clips.
disable-model-invocation: true
---

Input: Checked source transcript and hash, immutable source hash and probe duration, rights.json, intended audience. Verify all identities and authorized transcript access.
Action: Suggest more than five moments with numeric source-second start/end, source words, surrounding context and editorial rationale. Treat ranking as a suggestion, never a viral forecast. Have the editor open each candidate in the original and check speaker, wording, facts, context and rights. Record exactly five distinct coherent approved intervals and a rejected-candidate log.
Output: approved-moments.json with order, source hash and five numeric bounds satisfying 0 <= start < end <= source duration.
Stop: Fewer than five permissible, meaningful moments, mismatched hashes, uncertain bounds or missing human approval. Do not invent a fifth excerpt.
```

**`.claude/skills/video-cut/SKILL.md`**

```markdown
---
name: video-cut
description: Cut the five approved source intervals into separate local clips.
disable-model-invocation: true
---

Input: Immutable source.mp4, source hash/probe and five human-approved intervals. Verify hashes and calculate each duration as end minus start.
Action: For each 01-05, confirm its unique output path is unused, then transcode the approved source-relative interval with input -ss, -t duration, explicit first video/audio mapping, libx264, AAC and -n. Continue only on zero exit and file readback. Probe streams and duration, inspect first and last frames, and have the editor watch each whole cut for boundaries, sync and context. Record the exact command and output hash. Any failure or uncertain write is a manifest blocker; never pass that clip to captioning.
Output: Five accepted numbered clips, individual probe records and links to approved intervals in manifest.json.
Stop: Wrong bounds, absent stream, drift, misleading context, output collision or uncertain command result. Read back the existing path first; correct bounds with human approval and use a new filename. Never overwrite or reuse an old clip hash.
```

**`.claude/skills/video-caption/SKILL.md`**

```markdown
---
name: video-caption
description: Create and check local captions from each accepted clip.
disable-model-invocation: true
---

Input: Five accepted clip hashes, verified language and local model identity. Reject stale clips or mismatched source links.
Action: For each actual numbered clip 01-05, verify its accepted hash and unused WAV/raw-SRT paths, then extract its own mono 16 kHz 16-bit PCM WAV with -n. Run whisper-cli only after zero exit and WAV readback, with the matching language and SRT output; translation stays off. Preserve raw SRT. Have the editor correct words, names, numbers, cue timing, overlaps and readability against the actual clip, then save a distinct .checked.srt. Use clip-local times, not source-offset cues. Record failures as blockers before rendering.
Output: Five checked SRTs with raw-ASR and exact clip hash links in manifest.json.
Stop: Any cue outside clip duration, uncertain speech, bad alignment or stale clip hash. Repair and replay before rendering; a recut requires matching new captions.
```

**`.claude/skills/video-vertical/SKILL.md`**

```markdown
---
name: video-vertical
description: Render and review five captioned 1080x1920 MP4s.
disable-model-invocation: true
---

Input: Five accepted clip hashes/probes, matching checked SRT hashes, rights record and a human-approved crop or framing plan for each clip.
Action: Check decoded orientation and sample aspect ratio. Choose even integer crop width, height and x/y for each clip; require positive dimensions, nonnegative offsets and a rectangle within the decoded frame. A fixed crop does not track motion. Verify unique output and probe paths are unused. From the established run directory, render each separately with crop, aspect-preserving scale, pad, clip-local subtitles, explicit video/audio mapping, libx264, yuv420p, AAC and -n. Continue only on zero exit and saved-file readback. Create probe JSON without clobbering an existing path, reopen the MP4 and have the editor watch its entire video and audio, checking cut context, every caption, framing, sync, facts and rights. Record any failure or uncertain output as a blocker.
Output: Five distinct accepted 1080x1920 MP4s, hashes, probe JSON, exact source/clip/SRT lineage and UTC human acceptance notes.
Stop: Unknown orientation, invalid crop, missing filter, collision, unreadable file, silent audio, cut-off text, wrong duration, bad context or failed full playback. Inspect uncertain existing outputs; revise to a new filename, probe and watch again. No upload or publishing.
```

每次執行保留一份 `manifest.json` 。每次交接記錄權利紀錄、不可變原片 SHA-256、工具版本、模型 SHA-256、授權與語言、附 SHA-256 的輸入輸出、核准的數字原片區間、精確命令與 UTC 決定。指定檔案或雜湊不同就停止，解決後再進下一技能。

將每個 shell 程式區塊視為一個階段，放在新的 zsh 指令碼或受控 shell 中，使用 `set -e` 讓命令失敗時停止該階段。執行前確認每條輸出路徑未被占用，並在清單中將非零結束碼、缺失檔案或不確定寫入記為阻礙。後續技能必須讀取狀態與輸出雜湊，不能因舊片段仍存在就接受失敗剪輯。

## 1. 轉錄原片

根據 [whisper.cpp 維護者的 README](https://github.com/ggml-org/whisper.cpp/blob/master/README.md) ，目前 CLI 範例需要 16 位元 WAV。確認原片音訊後，從查核過的專案目錄執行以下命令。 `-n` 可防止 FFmpeg 覆寫現有 WAV。

```shell
set -e
test ! -e source.wav
test ! -e transcript/source.srt
test ! -e transcript/source.json
ffmpeg -i source.mp4 -map 0:a:0 -ar 16000 -ac 1 -c:a pcm_s16le -n source.wav
test -s source.wav
"$WHISPER_CLI" -m "$WHISPER_MODEL" -f source.wav -l "$LANGUAGE" -osrt -oj -of transcript/source
test -s transcript/source.srt
test -s transcript/source.json
```

確認 `transcript/source.srt` 與 `.json` 都存在、包含附時間的語音，且未超過探測的原片長度。聆聽具代表性段落，並對照原片查核不確定的人名、數字與引文。保留修正逐字稿或明確標記不確定處。音訊擷取或轉錄為空時，先檢查原片串流、程式、語言與模型相容性，再嘗試以新名稱輸出。

## 2. 在原片選取五個時刻

呼叫 `/video-rank` ，提供查核過的逐字稿與目標觀眾。要求超過五個候選，讓編輯能淘汰薄弱節選。每個候選須有從原片開頭起算的數字起迄秒數、原話、前後文及可獨立理解的原因。在原片開啟每個區間。編輯決定剪輯是否仍保留講者、措辭、畫面脈絡、事實與許可。將恰好五個不同的核准區間存入 `approved-moments.json`，包含順序、原片雜湊及 `0 <= start < end <= source duration`。逐字稿段落只是定位線索。較小範圍的時間定位任務請參閱 [編輯影片前找出說話時刻](https://bigchange.ai/blog/find-spoken-moment-before-video-editing)。

錄影沒有五段合理可用的時刻就停止。五檔案任務仍未完成。

## 3. 剪出核准區間

呼叫 `/video-cut`。依核准數字邊界為每段計算 `DURATION = END - START` 。將下方角括號預留位置替換為實際數字；預留位置本身不能執行。從 `clip-02.mp4` 到 `clip-05.mp4`分別重複。FFmpeg 文件說明輸入定位、長度、明確串流選擇及 [不覆寫輸出的行為](https://ffmpeg.org/ffmpeg.html)。為達到預定剪點，請轉碼而非直接複製串流。

```shell
set -e
test ! -e clips/clip-01.mp4
ffmpeg -ss <START_SECONDS> -i source.mp4 -t <DURATION_SECONDS> -map 0:v:0 -map 0:a:0 -c:v libx264 -c:a aac -n clips/clip-01.mp4
test -s clips/clip-01.mp4
```

探測每個實際片段的串流及長度，檢查首尾影格，再完整觀看。記錄雜湊與核准原片區間。錯誤剪輯需要重新核准邊界並用新輸出名稱。命令失敗或結果不確定時，重做前先檢查現有檔案及探測結果；不要向同名檔重試。

## 4. 對照實際剪輯修正字幕

呼叫 `/video-caption`。重新轉錄每個接受的片段，因為字幕時間零點必須對應片段開頭。片段 01 的命令如下：

```shell
set -e
test ! -e captions/clip-01.wav
test ! -e captions/clip-01.srt
ffmpeg -i clips/clip-01.mp4 -map 0:a:0 -ar 16000 -ac 1 -c:a pcm_s16le -n captions/clip-01.wav
test -s captions/clip-01.wav
"$WHISPER_CLI" -m "$WHISPER_MODEL" -f captions/clip-01.wav -l "$LANGUAGE" -osrt -of captions/clip-01
test -s captions/clip-01.srt
```

針對 02 至 05，使用相符的兩位數編號與不同路徑重複。保留每份原始 `captions/clip-NN.srt`。編輯逐條對照片段，修正詞語、人名及數字，檢查時間與可讀性，再儲存 `captions/clip-NN.checked.srt`。字幕超出片段長度就阻止輸出。記錄各 SRT 雜湊與片段雜湊的關聯。剪輯變更時，對新檔重新產生或查核字幕。

## 5. 重新構圖、輸出並驗收五份檔案

呼叫 `/video-vertical`。針對每個接受的片段檢查解碼圖像、方向、像素長寬比與動態。編輯為各片段分別選擇偶數整數 `CROP_W`、 `CROP_H`、 `CROP_X`、 `CROP_Y`。裁剪矩形須位於解碼影格內。固定裁剪不會跟隨移動主體；若遺失關鍵內容，改用經審查的縮放加留邊方案或修改剪輯。旋轉或座標不明就停止輸出。 [FFmpeg 濾鏡手冊](https://ffmpeg.org/ffmpeg-filters.html) 說明 crop、scale、pad 及以 libass 支援的 subtitles 濾鏡。

在既定執行目錄將 `CLIP` 設為實際兩位數編號，四個裁剪變數設為該片段核准的整數。這是命令範本，並非測試過的例子。保留這裡簡單的字幕相對路徑；檔名若有特殊字元，須另外做濾鏡圖跳脫。對 02 至 05 各自重複。

```shell
set -e
setopt noclobber
CLIP=01
CROP_W=<CHECKED_EVEN_INTEGER>
CROP_H=<CHECKED_EVEN_INTEGER>
CROP_X=<CHECKED_EVEN_INTEGER>
CROP_Y=<CHECKED_EVEN_INTEGER>
test ! -e "shorts/short-${CLIP}.mp4"
test ! -e "probes/short-${CLIP}.json"
ffmpeg -i "clips/clip-${CLIP}.mp4" -map 0:v:0 -map 0:a:0 -vf "crop=${CROP_W}:${CROP_H}:${CROP_X}:${CROP_Y},scale=1080:1920:force_original_aspect_ratio=decrease:force_divisible_by=2:reset_sar=1,pad=1080:1920:(ow-iw)/2:(oh-ih)/2,subtitles=captions/clip-${CLIP}.checked.srt" -c:v libx264 -pix_fmt yuv420p -c:a aac -n "shorts/short-${CLIP}.mp4"
test -s "shorts/short-${CLIP}.mp4"
ffprobe -v error -show_entries format=duration:stream=index,codec_type,codec_name,width,height,sample_aspect_ratio -of json "shorts/short-${CLIP}.mp4" > "probes/short-${CLIP}.json"
test -s "probes/short-${CLIP}.json"
```

五份 JSON 探測檔都必須有 1080 × 1920、像素長寬比 1:1 的視訊串流、音訊串流，以及經編碼或影格取整後符合核准剪輯的正長度。缺失或未知值都尚待解決。 [ffprobe 的 JSON 輸出](https://ffmpeg.org/ffprobe.html) 檢查檔案屬性而非剪輯品質。重新開啟並完整觀看每份 MP4，對照原片區間、接受的剪輯與查核 SRT。檢查語句邊界、字幕與安全位置、動態構圖、音畫同步、事實及權利。在清單記錄接受、修改或拒絕與 UTC 時間。恰好五份接受檔，各自連結原片雜湊、核准區間、片段雜湊、查核 SRT 雜湊及探測 JSON，才算完成。四份不夠。

## 限制與復原

Claude Code 存取可能涉及訂閱或 API 費用及用量限制。下載本機模型、轉錄、轉碼及多次修訂會消耗儲存與運算。帳戶提供費用時記錄實際金額；未知成本不是零。本流程未量測速度、準確性、字幕品質、節省或受歡迎程度。

保留原片與已接受產物。模型缺失、選項不支援、轉錄錯誤、輸出失敗或寫入不確定時，修改前先核對精確輸入雜湊與現有檔案。修復具體原因、給修訂新路徑，再重新探測及完整播放。人工編輯接受內容與權利前，不要上傳或分享成片。

## Sources

- [Claude Code 技能](https://code.claude.com/docs/en/skills) — Anthropic 說明專案 SKILL.md、手動呼叫，以及 allowed-tools 會暫時授予無須詢問的工具使用權。它未證實任何影片流程成果。
- [Claude Code 權限](https://code.claude.com/docs/en/permissions) — Anthropic 說明獨立權限系統。技能文字不強制限制媒體存取或上傳；使用者須審查帳戶與專案設定，包括可能無須詢問的唯讀存取。
- [whisper.cpp README](https://github.com/ggml-org/whisper.cpp/blob/master/README.md) — 維護者的建置、模型指南與目前 whisper-cli 範例說明 16 位元 WAV 輸入前提及 FFmpeg 轉換。分別檢查已安裝建置與模型。
- [whisper.cpp CLI README](https://github.com/ggml-org/whisper.cpp/blob/master/examples/cli/README.md) — 維護者 CLI 列出 -m、-f、-l、-osrt、-oj、-of 與 -tr。本指南設定已核實語言並關閉翻譯；本機轉錄不保證字詞或時間正確。
- [FFmpeg 命令列文件](https://ffmpeg.org/ffmpeg.html) — 輸入定位、-t、明確 -map、轉碼及 -n 的參考。須檢查實際邊界與輸出；本流程不採直接複製串流的剪輯方式。
- [FFmpeg 濾鏡文件](https://ffmpeg.org/ffmpeg-filters.html) — crop、scale、pad 與 subtitles 的參考。字幕濾鏡需要 libass 及支援程式庫；請確認安裝建置有必要的 scale 選項。
- [ffprobe 文件](https://ffmpeg.org/ffprobe.html) — 機器可讀串流與格式輸出的參考。技術探測不能確認剪輯脈絡、字幕可讀性、同步、事實準確性或權利。
- [編輯影片前找出說話時刻](https://bigchange.ai/blog/find-spoken-moment-before-video-editing) — 相關 BIG CHANGE 報導用於定位帶時間的逐字稿段落。本指南繼續完成五段核准剪輯、本機字幕、直式輸出與完整審查，是不同任務，並非某事件的後續報導。
