qiaomu-cut
Verified把一句话需求转成可复现、可验收视频工程的乔木智能剪辑导演。Use when the user asks to create, plan, edit, remix, explain, narrate, subtitle, animate, composite, or render a video—including one-line requests such as “制作一个科普视频:介绍 LLM 中的 RL”. Builds English-learning movie mixes, person profiles, explainers, code-drawn motion graphics (UI morph loops, showreels, kinetic-type promos, line-art/pixel/Three.js animation, lyric MVs), product launch videos, cinematic shorts, social clips, course/PPT videos, AI image/video/TTS/music-assisted stories, stock-footage stories, or multi-source montage. Routes across 33台词, ClipSeek/open media, local files, ListenHub, image generation, HTML/SVG/Canvas motion graphics with beat-grid storyboards and determinism probes, Manim, ffmpeg-full, captions, sound design, frame-0 video covers with YouTube thumbnails, and release checks.
scripts/verify_video.js
View on GitHub#!/usr/bin/env node
'use strict';
const fs = require('fs');
const os = require('os');
const path = require('path');
const childProcess = require('child_process');
function commandPath(command) {
try {
const result = childProcess.spawnSync('which', [command], { encoding: 'utf8' });
return result.status === 0 ? result.stdout.trim() : null;
} catch {
return null;
}
}
function preferredFfprobe() {
const candidates = [
process.env.QIAOMU_FFPROBE,
'/opt/homebrew/opt/ffmpeg-full/bin/ffprobe',
'/usr/local/opt/ffmpeg-full/bin/ffprobe',
commandPath('ffprobe')
].filter(Boolean);
return candidates.find((candidate) => fs.existsSync(candidate) || !candidate.includes('/')) || null;
}
function displayPath(file) {
const home = os.homedir();
return file === home || file.startsWith(`${home}${path.sep}`)
? `<HOME>${file.slice(home.length)}`
: file;
}
function verifyVideo(filePath) {
const absolute = path.resolve(filePath);
if (!fs.existsSync(absolute)) {
return {
ok: false,
file: displayPath(absolute),
errors: [`File not found: ${displayPath(absolute)}`],
warnings: []
};
}
const ffprobe = preferredFfprobe();
if (!ffprobe) {
return {
ok: false,
file: displayPath(absolute),
errors: ['ffprobe not found. Install ffmpeg-full or set QIAOMU_FFPROBE.'],
warnings: []
};
}
const result = childProcess.spawnSync(ffprobe, [
'-v', 'error',
'-show_format',
'-show_streams',
'-of', 'json',
absolute
], { encoding: 'utf8' });
if (result.status !== 0) {
return {
ok: false,
file: displayPath(absolute),
errors: [result.stderr || result.stdout || 'ffprobe failed.'],
warnings: []
};
}
const data = JSON.parse(result.stdout);
const video = (data.streams || []).find((stream) => stream.codec_type === 'video');
const audio = (data.streams || []).find((stream) => stream.codec_type === 'audio');
const format = data.format || {};
const warnings = [];
const errors = [];
if (!video) errors.push('No video stream found.');
if (!audio) warnings.push('No audio stream found.');
if (video && Number(video.width) < 720) warnings.push(`Video width is low: ${video.width}px.`);
if (format.duration && Number(format.duration) <= 0) errors.push('Duration is zero or invalid.');
if (format.size && Number(format.size) <= 0) errors.push('File size is zero.');
return {
ok: errors.length === 0,
file: displayPath(absolute),
ffprobe: displayPath(ffprobe),
format: {
duration: format.duration ? Number(format.duration) : null,
size: format.size ? Number(format.size) : null,
bitRate: format.bit_rate ? Number(format.bit_rate) : null,
formatName: format.format_name || null
},
video: video ? {
codec: video.codec_name,
width: video.width,
height: video.height,
frameRate: video.avg_frame_rate,
pixFmt: video.pix_fmt
} : null,
audio: audio ? {
codec: audio.codec_name,
channels: audio.channels,
sampleRate: audio.sample_rate
} : null,
warnings,
errors
};
}
module.exports = {
verifyVideo,
preferredFfprobe
};
if (require.main === module) {
const file = process.argv[2];
if (!file) {
console.error('Usage: verify_video.js /path/to/video.mp4');
process.exit(2);
}
const report = verifyVideo(file);
process.stdout.write(JSON.stringify(report, null, 2) + '\n');
process.exit(report.ok ? 0 : 1);
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |