Communitygithub.com

beachyphotoandfilm-arch/video-skills

從 DaVinci Resolve 渲染完成的 Reels、以創作者口吻撰寫字幕、從 reel-covers 附加自訂 Instagram 封面,並透過 Metricool 排程發佈到 Instagram、TikTok 與 YouTube Shorts。負責處理 Drive 上傳跳轉、與現有行事曆衝突檢查及清理工作。觸發關鍵字如「安排 Reels」、「發布這些」、「放入行事曆」,或在 Reels 核准後自動執行。

video-skills 是什麼?

這項技能專為需要大量產出短影音並同時發佈到多個社群平台的創作者與團隊設計。它將影片從 DaVinci Resolve 渲染、字幕撰寫、封面生成到透過 Metricool 排程的整個流程自動化,大幅減少手動操作與人為錯誤。 技能支援 Instagram (Reels)、TikTok 與 YouTube Shorts 三個主要平台,並能智慧避開行事曆上已排程的時段,確保每日穩定發布。其核心工作流程包括:透過 Google Drive 作為中繼站解決 Metricool 僅接受公開 URL 的限制、從影片逐字稿提取關鍵字 CTA 並自動生成教學式字幕,以及使用連結 reels-covers 技能產生 Instagram 專用封面。 渲染方面,此技能直接操作 DaVinci Resolve API,將字幕以 Alpha 疊加層嵌入影片,並提供兩個渲染版本(交付用與歸檔用主檔),交付檔還會透過 ffmpeg 進一步壓製以符合 Instagram 上傳限制。整個流程包含嚴格的品質檢查環節,例如在排程前用 ffmpeg 生成校對圖像,並在成功發佈後自動清理 Drive 上的暫存檔案。 排程時它會先讀取現有行事曆,從明日開始每天安排一篇,並自動跳過已被佔用的日期。若發生上傳失敗,它會重新上傳並重試,確保內容不會遺失。這項技能非常適合需要頻繁、大量排程短影音的內容創作者、行銷團隊與社群媒體經理。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/beachyphotoandfilm-arch/video-skills/tree/HEAD/skills/schedule-social

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

排程到社群平台

設定:填寫以下項目

在首次執行前,將下列所有佔位符替換為實際值。

佔位符說明
<YOUR_METRICOOL_BLOG_ID>你的 Metricool 品牌的 blogId(從 getBrandSettings 取得)
<YOUR_TIMEZONE>用於排程的 IANA 時區,例如 America/Chicago
<YOUR_POST_TIME>每日預設發佈時間,例如 10:00
<YOUR_IG_HANDLE>, <YOUR_TIKTOK_HANDLE>, <YOUR_YOUTUBE_CHANNEL_ID>已在 Metricool 中連結的帳號
<YOUR_DRIVE_UPLOAD_FOLDER_ID>一個設為「知道連結的任何人皆可檢視」的 Google Drive 資料夾(請見媒體跳轉說明)
<YOUR_VIDEO_LIBRARY>存放已完成的影片檔案的路徑,例如 ~/Videos/Finished
<YOUR_STANDING_CTA>可選:你放在每則字幕結尾的固定結尾呼籲文字
<YOUR_VOICE_FILE>可選:用於字幕的語音/風格指南檔案路徑

品牌: blogId <YOUR_METRICOOL_BLOG_ID>,時區 <YOUR_TIMEZONE>。 已連結: Instagram (<YOUR_IG_HANDLE>),TikTok (<YOUR_TIKTOK_HANDLE>),YouTube (<YOUR_YOUTUBE_CHANNEL_ID>)。

媒體跳轉(不容易理解的部分)

Metricool 的 API 只接受公開 URL,無法接受本機檔案。運作流程如下:

  1. 將 MP4 上傳到一個 Drive 資料夾,例如 Metricool Uploads (Claude)(<YOUR_DRIVE_UPLOAD_FOLDER_ID>)。將該資料夾設定為「知道連結的任何人皆可檢視」一次;檔案會繼承此權限,因此無需逐一設定。
    cd <包含檔案的目錄> && gws drive files create \
      --params '{"uploadType":"multipart","supportsAllDrives":true}' \
      --json '{"name":"<name>.mp4","mimeType":"video/mp4","parents":["<YOUR_DRIVE_UPLOAD_FOLDER_ID>"]}' \
      --upload "<file>"
    
  2. 使用 直接下載 的 URL 進行排程:https://drive.google.com/uc?id=<fileId>&export=download。 使用 /view 連結會失敗,並顯示「無法標準化媒體」。
  3. Metricool 會將檔案複製到其自己的儲存空間;回應中的 media 會變成 static.metricool.com/...。
  4. 看到此變化後,刪除 Drive 上的副本。儲存空間就不會累積。

Claude 通常無法使 Drive 檔案公開(沙箱會阻止)也無法編輯自己的權限。這就是為何需要共用資料夾。如果檔案落在資料夾之外,請要求使用者手動移動,而不是嘗試分享它。

字幕

如果你有語音指南,請先閱讀 <YOUR_VOICE_FILE> 並遵循其風格。否則使用以下預設規則。

當 Reel 包含關鍵字 CTA(會觸發自動 DM 或Email 的關鍵字)時,第一行是 CTA:

  • 第一行: 留言 <KEYWORD> 我會免費寄送你 <資源名稱> 👇,關鍵字要大寫,且必須與 Reel 的 CTA 片段中的口語完全一致。
  • 接著是鉤子行和下方的 2-4 句教學行。
  • 結尾加上固定 CTA(如果你有的話)。
  • 關鍵字必須與 Reel 的口語 CTA 一致(影片狀態檔案中的 reel_cta)。每支影片一個關鍵字。

沒有關鍵字 CTA 的 Reel 格式:

  • 第一行是鉤子。 它是動態消息中唯一顯示的行。通常與 Reel 開頭的第一行相同。
  • 2-4 行短句,教會一件事。行與行之間用換行分隔,不要寫成段落。
  • 不要大量使用主題標籤。儘量少用或不用。
  • 結尾加上 <YOUR_STANDING_CTA>(如果你有的話),一字不差。

根據 Reel 中的實際內容撰寫,使用創作者在逐字稿中的用詞,而非泛泛的建議。簡短但具有教育意義:觀看者應能僅從字幕中學到一個實用的東西。

通用的範例形狀:

「每天發文 = 倦怠 / 每週發 3 篇優質影片 = 成長」

「如果你想獲得更好的音質,一個小技巧:把麥克風放近一點,而不是把增益調高...」

渲染

字幕是內嵌的:video-reels 將它們放在 V3 軌道作為 Alpha 疊加素材,文字鉤子卡片放在 V2 軌道。無需匯入,也沒有內嵌核取方塊。

  1. 使用者修剪 Reel。兩個疊加軌道都是獨立的素材,因此修剪 V1 不會移動它們。如果重新剪輯了時間,請重新渲染該 Reel 的字幕,而不是滑動它們。
  2. Claude 透過 Resolve API 渲染它們。 四個 Reel 大約需要 90 秒。
out = os.path.expanduser("~/Movies/<video>-deliverables/reels-final")
os.makedirs(out, exist_ok=True)
project.DeleteAllRenderJobs()
for i in range(project.GetTimelineCount()):
    t = project.GetTimelineByIndex(i+1)
    if not t.GetName().startswith("Reel"):
        continue
    project.SetCurrentTimeline(t)
    project.SetRenderSettings({"TargetDir": out, "CustomName": t.GetName().replace(" ", "_"),
                               "SelectAllFrames": True, "FormatWidth": 1080, "FormatHeight": 1920,
                               "ExportVideo": True, "ExportAudio": True})
    project.SetCurrentRenderFormatAndCodec("mp4", "H264")
    project.AddRenderJob()

然後執行 start_rendering。編解碼器字串是 "H264",不是 "H.264",格式是 "mp4"。輪詢輸出目錄而不是工作狀態;檔案完成時會出現。30 秒的影片約 40MB。 3. 渲染是時間上的不歸路,所以請先進行所有修剪。 4. 在上傳之前,使用 ffmpeg 抽樣檢查輸出,在鉤子視窗內取一格,在 Reel 中間取一格:

ffmpeg -v error -ss 1.5 -i reel.mp4 -frames:v 1 hook.png -y
ffmpeg -v error -ss 8   -i reel.mp4 -frames:v 1 cap.png  -y

將它們疊成一個校對圖並仔細查看。這是最後一個可以發現遺漏鉤子卡片或空白字幕軌道的地方,排程之後就無法刪除了。

完成檔案存放位置

所有保留的檔案都存放在 <YOUR_VIDEO_LIBRARY>/,每支影片一個資料夾:

<YOUR_VIDEO_LIBRARY>/<Video> YYYY-MM-DD/
    Reels/              發佈的內容。1080x1920 H.264
    Reels/Masters/      相同剪輯,60 Mbps 歸檔
    Timelines/          每個時間線一個 .drt 檔案 + 專案的 .drp 檔案
    Covers/             已核准的 Instagram Reel 封面,1080x1920 JPG
    Thumbnails/         完整尺寸的選項
    YouTube/            匯出的長片,包含交付版與主檔
    Posting schedule.txt   列出每支 Reel 的日期、時間與網路

上傳檔案:盡可能符合 Instagram 的發佈 API 上限

Metricool 透過 Meta 的內容發佈 API 發文,該 API 對接受的內容設有上限。請上傳符合這些上限的最佳檔案,該檔案由 60 Mbps 的主檔製作而成,而非來自 Resolve 的交付渲染:

  • H.264 High, yuv420p, 1080x1920, closed GOP, moov 在前(+faststart)
  • 影片最高 24 Mbps(上限為 25),音訊 AAC 128 kbps 48 kHz(Resolve 會寫入 320 kbps,超過上限)
  • 僅包含影片與音訊串流。 Resolve 會加入時間碼資料軌道;使用 -dn 丟棄
ffmpeg -i "Masters/<n>.mp4" -map 0:v:0 -map 0:a:0 -map_metadata -1 -dn \
  -c:v libx264 -preset slow -crf 11 -maxrate 24M -bufsize 48M -pix_fmt yuv420p -profile:v high \
  -g 48 -keyint_min 48 -sc_threshold 0 -flags +cgop \
  -c:a aac -b:a 128k -ar 48000 -movflags +faststart "Reels/<n>.mp4"

在 CRF 16 時,講話頭影片僅使用約 8 Mbps,因此 CRF 11 會花費更多預算。由於多個 Reel 在 -preset slow 下需要幾分鐘,請在背景執行。一次只編碼一個檔案,不要平行進行: 許多平行編碼可能會在寫入過程中填滿磁碟並截斷所有檔案。Instagram 仍會在其端重新壓縮;這可以確保它從盡可能乾淨的檔案開始。

每個 Reel 兩個渲染版本,而非一個。 相同的編解碼器,相同的解析度,不同的位元率:

解析度位元率用途
交付版1080x1920 H.264Resolve 傳遞,然後被上方上傳檔案取代上傳
主檔1080x1920 H.26460 Mbps,透過 "VideoQuality": 60000歸檔

長片(1920x1080)也相同兩次處理:10 分鐘的影片,交付版約 900MB,主檔約 4.5GB。

1080x1920 是正確的解析度:Instagram 無論如何都提供 1080 寬度,而且 Reel 裁切已經從 4K 過度採樣。除非被要求,否則不要提供 ProRes 或更大的畫面。

VideoQuality 是持續存在的設定。每次執行都要設定它。

渲染設定存在於專案上,而非工作。如果在 SetRenderSettings 呼叫中遺漏了 VideoQuality,渲染會靜默地重複使用前一次使用的任何值。從 Reel 主檔繼承 60000 的長片交付版本,其輸出會比預期大 5 倍。

project.SetRenderSettings({..., "VideoQuality": 12000})   # 交付版,約 12 Mbps
project.SetRenderSettings({..., "VideoQuality": 60000})   # 主檔,約 60 Mbps

永遠不要依賴交付版本的預設值。而且永遠不要相信工作列表:即使 VideoQuality 已套用,從 GetRenderJobList() 讀回的值也可能是 None。請檢查完成的檔案:

ffprobe -v error -select_streams v:0 -show_entries stream=bit_rate -of csv=p=0 out.mp4

在佇列長片配對之前,檢查可用空間。 一部 60 Mbps 的 10 分鐘主檔約 4.5GB。

也將時間線匯出到資料夾中,以便在沒有專案資料庫的情況下也能攜帶剪輯:

for i in range(project.GetTimelineCount()):
    t = project.GetTimelineByIndex(i+1)
    t.Export(os.path.join(d, t.GetName() + ".drt"), resolve.EXPORT_DRT)
resolve.GetProjectManager().ExportProject(project.GetName(), os.path.join(d, project.GetName() + ".drp"))
  • 直接渲染到其中。 將 Resolve 的 TargetDir 設定為 <that folder>/Reels,這樣之後就不用移動任何東西。
  • 根據 Resolve 時間線名稱重新命名。 Reel_2_-_my_best_tip.mp4 變成 2. my best tip.mp4:編號以便排序,易於閱讀。主檔和 .drt 檔案也使用相同的名稱,這樣三個資料夾就能對齊。
  • 移動,不要複製。 ~/Movies/<video>-* 存放工作檔案(whisper JSON, SRT, overlay mov, caption mov)。這些檔案保留原位以便重新渲染;完成的匯出檔案離開。
  • 排程後撰寫 Posting schedule.txt,列出每支 Reel 的日期、時間和網路,讓使用者無需開啟 Metricool 就能看到已發佈的內容。

僅在渲染因空間不足而失敗,或長片配對明顯無法容納時,才提及磁碟空間。

封面(僅限 Instagram)

每支 Reel 在排程之前都會獲得一個自訂的 Instagram 封面。在字幕核准之後、排程之前,執行 reel-covers 技能。它會為每支 Reel 在 <Video>/Covers/ 中提供一個已核准的 JPG 檔案。在與字幕和時段相同的閘道中顯示封面,讓所有內容一次性核准。

每個封面透過與影片相同的 Drive 跳轉上傳(相同資料夾 <YOUR_DRIVE_UPLOAD_FOLDER_ID>,mimeType: image/jpeg),並使用 uc?id=...&export=download 形式作為 videoThumbnailUrl 傳遞。一旦 Metricool 擁有自己的副本,就刪除 Drive 上的副本,與影片相同。

排程

每支 Reel 一篇貼文,涵蓋三個網路,包含封面。 封面僅在 Instagram 上有效。TikTok 在個人帳號上會忽略它,而 Shorts 僅在經過驗證的頻道上顯示它。請勿拆分貼文。

"providers":[{"network":"instagram"},{"network":"tiktok"},{"network":"youtube"}],
"media":["https://drive.google.com/uc?id=<video id>&export=download"],
"videoThumbnailUrl":"https://drive.google.com/uc?id=<cover id>&export=download",
"instagramData":{"type":"REEL","showReelOnFeed":true,"isAiGenerated":false},
"tiktokData":{"privacyOption":"PUBLIC_TO_EVERYONE","title":"<short title>"},
"youtubeData":{"type":"short","privacy":"public","madeForKids":false,"title":"<title, <100 chars>"}
  • 為已排程的貼文新增封面: 使用 updateScheduledPost,並提供貼文完整的原始欄位(文字、提供者、媒體、所有網路資料、日期)再加上 videoThumbnailUrl。它會覆寫且無法復原,因此請從 getScheduledPosts 逐字複製欄位。絕對不要取代現有的 videoThumbnailUrl 或 videoCoverMilliseconds:已有其中一個的貼文代表已選定封面。
  • 如果其中一個更新失敗並顯示「無法標準化媒體」,而其他更新成功,則表示該次從 Drive 的擷取失敗。貼文保持不變。重新上傳檔案(取得新的 id)並重試。重試相同的 URL 沒有幫助。
  • 然後使用 getScheduledPosts 檢查每篇貼文的 videoThumbnailUrl 是否現在以 static.metricool.com 開頭,並刪除 Drive 上的副本。
  • YouTube 需要標題和 madeForKids。 TikTok 需要一個簡短的標題。
  • autoPublish: true 讓 Metricool 自動發佈。

何時排程(預設規則,可依需求調整)

從明天開始。每天一篇。如果某天已有內容,則移到下一個空閒日。

day = tomorrow
for each post in order:
    while day already has a scheduled post:  day += 1
    schedule at <YOUR_POST_TIME> local on day
    day += 1
  • <YOUR_POST_TIME> 在 <YOUR_TIMEZONE> 是預設發佈時間。
  • 務必先呼叫 getScheduledPosts,範圍涵蓋明天到明天 +(貼文數量 + 14 天),這樣才能看到空缺。跳過此檢查可能會導致貼文落在已被佔用的時段。
  • 如果某天有任何排程內容(包含草稿),則該天視為已被佔用。
  • 不要將多篇貼文擠在同一天,也不要留下空缺:重點是從現在開始穩定地每日發佈。
  • 絕對不要在字幕文字中加入測試標籤。 不要有「測試草稿」,不要有「可安全刪除」。字幕始終是完成的文案,即使在測試執行中也是如此;使用者可能想保留它。 使用 draft: true + autoPublish: false 標記測試貼文(草稿在規劃程式中視覺上不同),並提供 plannerUrl 和貼文 id,以便一鍵刪除。

長片 YouTube(主要影片,非 Short)

建議:不要透過 Metricool 傳送大型長片檔案。請在 YouTube Studio 中上傳它們。 約 1GB 的匯出檔案透過 Metricool 傳送可能會在中途被截斷儲存。Resolve 將 MP4 索引(moov)放在檔案末尾,因此被截斷的副本無法讀取,YouTube 會回報「處理已放棄」,即使它已經「發佈」。Metricool 可能不會回報錯誤。將檔案、標題、描述和縮圖交給使用者,讓他們貼到 Studio 中,以 4K 渲染(Studio 沒有檔案大小問題)。以下是保留作為參考。

如果透過 Metricool 傳送大型檔案,請檢查儲存的...

…[翻譯時已截斷]

Individual skills in this repo

This repo contains 7 individual skills — each has its own dedicated page.

beachyphotoandfilm-arch/video-skills

Sync camera footage to a separate lapel or field-recorder track (e.g. Tascam DR-10L and similar) and lay it up in DaVinci Resolve. Stitches the recorder's split files, finds each clip's exact place in the audio by matching words then waveforms, cuts one lapel slice per clip so every later skill works unchanged, checks for clipping, and builds a synced timeline in a new Resolve project. Trigger on "sync the lapel", "sync my audio", "line up the recorder", "I used a lav", or any shoot with a separate audio folder (live talks, events, workshops). Run it before paper-edit or video-reels.

beachyphotoandfilm-arch/video-skills

Turn raw talking-head footage into an assembled rough cut inside DaVinci Resolve. Pulls the clips off your footage drive, transcribes them locally, removes failed takes, restarts, asides and dead air, then creates a new Resolve project with two paper-edit timelines ready for your fine trim. Trigger on "paper edit", "cut my raw footage", "make a rough cut", "clean up this video", or when the user points at a folder of raw camera files for a YouTube video.

beachyphotoandfilm-arch/video-skills

Design a unique Instagram cover for each reel in your house style. Reads what the reel is about, writes a short hook headline, picks one of your own photos from a tagged photo library, lays it out like your existing covers, and proofs it in grid view at phone size. Renders locally, never with AI image generation. Can be called by a scheduling skill before reels are scheduled. Trigger on "make covers", "reel covers", "cover photo for this reel", "design the IG covers".

beachyphotoandfilm-arch/video-skills

Build animated brand overlays (motion graphics) for a talking-head video, timed to the speaker's exact words, plus a DaVinci Resolve import file. House style is in-scene type (text beside and behind the speaker's head) plus diagrams. Transcribes the rough cut locally, picks the moments, renders transparent .mov clips, and writes an FCPXML that drops every clip onto the timeline already in position. Trigger on "make animations for this video", "add overlays/motion graphics", "animate this", "b-roll graphics for my YouTube video", or when the user shares a rough cut and asks for graphics.

beachyphotoandfilm-arch/video-skills

Cut vertical Instagram reels out of a long-form talking-head video, hook first. Picks the strongest standalone moments from the transcript, opens each reel on its punchiest line, builds vertical timelines in DaVinci Resolve framed on the speaker's face with the LUT applied, and finishes them: a hook (a held text card, or a word-by-word "build" hook with punch-in) and burned-look captions on V3; this-or-that reels get product graphics and a comment-keyword CTA card. You trim and render, nothing to import. Trigger on "make reels", "clip this for Instagram", "cut some verticals", or after a YouTube video is cut.

beachyphotoandfilm-arch/video-skills

Design YouTube thumbnails and titles for a talking-head video. Pulls graded full-res frames out of the raw footage, renders brand-styled variants in two proven layouts, and proofs them at phone size where the click actually gets decided. Trigger on "make thumbnails", "thumbnail for this video", "title and thumbnail", or after a video is cut.

beachyphotoandfilm-arch/video-skills

Run the whole YouTube video pipeline end to end, one stage at a time, stopping for the creator's approval at every gate. Paper edit, punch-ins, reels, reel covers, scheduling the reels, overlays, thumbnail and title, then scheduling the long-form video, all through Metricool. Keeps state per video so you can stop anywhere and pick up later. Trigger on "/youtube", "let's do the whole video", "run the video pipeline", "continue the <name> video", or when handed raw footage for a YouTube video.

相關技能