360 Secure SkillHub
360 安全技能中心

SocialKit YouTube Assemble

读取 shot-list.json,把图片和片段缩放到目标分辨率,叠加配音、可选背景音乐与字幕,经 FFmpeg 渲染为 H.264/AAC MP4。支持 --check 预校验素材、--overwrite 重渲染,并在标准输出返回 JSON 结果。

分类:创作
ahmadhussain0335
ahmadhussain0335
热度 35.95
最近更新 2026-11-06 15:10:14

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add ahmadhussain0335/socialkit-youtube-assemble
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
socialkit-youtube-assemble
description
Renders a YouTube video from shot-list.json - images and clips scaled to the target resolution, voiceover, optional background music and subtitles - into an H.264/AAC MP4 using FFmpeg. Use when the user wants to assemble, render, stitch or export the final video file for a YouTube project.
license
MIT
compatibility
Requires Node.js 22.12+ and FFmpeg (FFMPEG_PATH, the ffmpeg-static binary from a global install of social-agent-skills, or ffmpeg on PATH).
metadata
{"author":"Ahmad Hussain","platform":"youtube","requires":"socialkit-social-core"}

YouTube assemble

Steps

  1. Validate first: node scripts/assemble.mjs --dir <project-folder> --check It reports missing files, unsupported types, missing durations and a voiceover longer than the visuals. Fix shot-list.json or ask the user for the missing assets.
  2. Render: node scripts/assemble.mjs --dir <project-folder> Output goes to output/video.mp4 unless the shot list sets output.
  3. Tell the user the output path and length, and ask them to watch it. Collect changes, update the shot list or assets, and re-render with --overwrite.

Run node scripts/assemble.mjs --help for the shot list format.

Output contract

JSON on stdout with ok, output and totalSeconds, and an MP4 in the project folder.

Failure handling

  • FFMPEG_MISSING: show the hint; the user installs FFmpeg or sets FFMPEG_PATH.
  • OUTPUT_EXISTS: ask before re-running with --overwrite. Overwriting invalidates an existing upload approval.
  • FFMPEG_FAILED: show the last lines of the error. Common causes are corrupt inputs or unsupported codecs; re-encode the asset or replace it.