executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
ai-tech-news-video用于制作 AI 科技资讯快报视频。包含:新闻检索与筛选、真实素材下载、edge-tts 口播、HyperFrames 画面编排、音频与字幕同步、最终渲染导出。触发词:AI快报、科技资讯视频、AI新闻视频、news flash video、weekly AI digest。
Independent GitHub snapshot · Automated classification · Original documentation governs
使用 HyperFrames + edge-tts + 素材检索 生产专业 AI 资讯快报视频。
只要任务需要生成、扩图、修复或重绘静态图片,必须先读 ../../marketplace/pptx/editable-reconstruction.md,复用其中的图片模型优先级、无字生成和残影验收规则。生成图片中不得烘焙标题、数字、标签、字幕或伪文字;这些内容必须留在 HyperFrames/HTML 可编辑动画层。
本规则不降低“真实新闻素材”硬门槛。生成图只能作为解释或氛围辅助,不能替代每条新闻必需的官方截图、新闻截图、真实产品界面或可核验照片。
1. 新闻检索与筛选 → 2. 素材获取 → 3. 口播生成 → 4. 编写 HyperFrames 页面 → 5. 渲染导出
1920x1080,适合 B 站、YouTube、网页内嵌、横屏播放器和演示场景。1080x1920。X月X日的 AI 信息差来了。 然后立刻开始播第一条内容,不要铺垫、不要自我介绍、不要解释栏目。web_fetch 可用性排序)| Source | URL | Fetchable? | Best For |
|---|---|---|---|
| The Verge AI | theverge.com/ai-artificial-intelligence | ✅ Yes | Comprehensive AI coverage |
| Hacker News | news.ycombinator.com | ✅ Yes | Tech community trending |
| GitHub trending | github.com/trending | ✅ Yes | Dev tools & open source |
| Ars Technica | arstechnica.com/ai | ❌ JS-rendered | Skip unless using browser |
| 36kr | 36kr.com/information/AI | ❌ JS-rendered | Skip unless using browser |
| TechCrunch | techcrunch.com/category/artificial-intelligence | ❌ JS-rendered | Skip unless using browser |
JS 渲染站点:优先使用 browser 工具,不要只用 web_fetch。
| Tag | Emoji | Color | CSS Class |
|---|---|---|---|
| 新功能 | 🧠 | Yellow | tag-feature |
| 公司动态 | 🚀 | Indigo | tag-company |
| 基础设施 | ⚡ | Green | tag-infra |
| 法律 | ⚖️ | Red | tag-legal |
| 能源/社会 | 💡 | Blue | tag-energy |
| 开源 | 📦 | Purple | tag-opensource |
| 研究 | 🔬 | Cyan | tag-research |
If any selected item has no real asset, stop and replace that news item or ask the user how to proceed. Do not substitute fake logos, fake dashboards, fake screenshots, generic icon cards, abstract AI art, or purely CSS-drawn panels as the only visual for a news item.
Before final render, add timed subtitles for every voiceover clip. If there is narration audio without corresponding visible subtitle text, stop and add subtitles before rendering.
| Source | URL | License | Notes |
|---|---|---|---|
| Official announcement/blog | company site | Varies | Best source for product/news screenshots |
| News article screenshot | The Verge / TechCrunch / Reuters / 36kr / etc. | Editorial fair use considerations | Use as visual proof of a reported item |
| Product website/app screenshot | official product page/app | Varies | Best for feature and launch stories |
| Unsplash | unsplash.com | Free | Best quality, use ?w=640&q=80 for optimized downloads |
| Pexels | pexels.com | Free | Good variety |
| Wikimedia | commons.wikimedia.org | Varies | Logos, diagrams |
assets/images/manifest.md and understand where each image came from.cd assets/images
curl -sL -o ai-brain.jpg "https://images.unsplash.com/photo-XXXXXXXXX?w=640&q=80"
Use a browser or Playwright screenshot when an official/news page is the best available visual:
mkdir -p assets/images
# Example filename convention:
# assets/images/01-perplexity-official-page.png
# assets/images/02-anthropic-announcement.png
After every screenshot, quickly inspect the saved image. If it captured a Cloudflare/security verification page instead of the real article, discard it and redo the capture through an interactive browser after clicking the human verification checkbox. The manifest should cite the real source page, not the verification page.
Crop or resize screenshots only after saving the original. Keep names numbered by card order so it is obvious which asset belongs to which news item.
| Topic | Unsplash Search Terms |
|---|---|
| AI/ML | artificial intelligence, neural network, machine learning, brain digital |
| Space | rocket launch, space, nasa, spacex |
| Legal | law, courtroom, gavel, justice |
| Infrastructure | server room, data center, technology, network |
| Energy | power lines, electricity, energy, solar panels |
| Open source | code, programming, developer, github |
| Research | laboratory, science, microscope, quantum |
pip3 install --break-system-packages edge-tts
| Voice | Language | Style | Best For |
|---|---|---|---|
| zh-CN-YunxiNeural | Chinese | Young male, energetic | Tech news, dynamic delivery |
| zh-CN-XiaoxiaoNeural | Chinese | Female, professional | Formal news, corporate |
| zh-CN-YunjianNeural | Chinese | Male, deep | Dramatic reveals, impacts |
| en-US-GuyNeural | English | Male, mature | English news |
cd assets/audio
# Intro (brief, punchy)
edge-tts --voice zh-CN-YunxiNeural --rate="+30%" \
--text "AI快报,5月7日,本周最热资讯。" \
--write-media intro.mp3
# News cards — 直接说内容,不说"第X条"
edge-tts --voice zh-CN-YunxiNeural --rate="+30%" \
--text "Anthropic 让 Claude 学会了做梦。Claude 可在会话间隙回顾历史,发现错误模式并自我改进。" \
--write-media card1.mp3
# No default outro
# 信息差视频默认不生成“以上就是本期/关注我/下期见”这类片尾口播。
--rate="+30%" 参数加速,默认语速太慢,不适合快节奏资讯X月X日的 AI 信息差来了。,例如 5月9日的 AI 信息差来了。 后面直接进入新闻内容。intro.mp3、card*.mp3 都要在 HTML 里有对应字幕 clip;字幕起止时间以配音时长为准,允许比配音前后各多留 0.1-0.2 秒。ffprobe -v quiet -show_entries format=duration -of csv=p=0 card1.mp3必须添加背景音乐。 没有BGM的视频感觉空、不专业。
assets/audio/bgm.mp3assets/audio/bgm.wavassets/audio/ 下其他可用音乐文件(.mp3/.wav/.m4a)示例检查命令:
ls assets/audio
data-volume 设 0.08-0.12,远低于配音(0.85),作为氛围层<audio id="bgm" class="clip"
data-start="0" data-duration="86"
data-track-index="20" data-volume="0.10"
src="assets/audio/bgm.mp3"></audio>
data-start="0",data-duration 等于视频总时长tech-news-flash/
├── index.html # Main composition
├── assets/
│ ├── images/ # Downloaded images
│ │ ├── ai-brain.jpg
│ │ ├── spacex-rocket.jpg
│ │ └── ...
│ └── audio/ # Voiceover files
│ ├── intro.mp3
│ ├── card1.mp3
│ └── ...
├── hyperframes.json
├── meta.json
└── package.json
<meta name="viewport" content="width=1920, height=1080" />
<div
id="root"
data-composition-id="main"
data-start="0"
data-duration="86"
data-width="1920"
data-height="1080"
>
横屏渲染命令:
npx hyperframes render --resolution landscape -o renders/ai-tech-news.mp4
只有明确要求竖屏时再使用:
npx hyperframes render --resolution portrait -o renders/ai-tech-news-portrait.mp4
┌─────────────────────────────────────────────────┐
│ ┌──────────────┐ ┌──────────────────────────┐ │
│ │ │ │ NO. 01 │ │
│ │ IMAGE │ │ 🧠 新功能 │ │
│ │ (45%) │ │ │ │
│ │ │ │ Headline Text │ │
│ │ │ │ │ │
│ │ │ │ Description text... │ │
│ └──────────────┘ └──────────────────────────┘ │
│ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░ progress bar │
└─────────────────────────────────────────────────┘
Before npx hyperframes render, verify:
assets/images/ contains one real asset per news item.assets/images/manifest.md maps every card to a source and asset file.<img> or visible background image.npx hyperframes inspect has no layout errors.Web Audio API does NOT render into HyperFrames MP4. Always use <audio> tags:
<audio id="voice1" class="clip"
data-start="6" data-duration="17"
data-track-index="5" data-volume="0.85"
src="assets/audio/card1.mp3"></audio>
| Element | Duration | Notes |
|---|---|---|
| Intro | 5-6s | Title + date animation |
| News Card | voice_duration + 1s | Let voice finish, then transition |
| Card Transition | 0.3s | Fade/slide out |
| End beat | 0.5-1s | Last news finishes, then fade/hard cut. No CTA unless requested |
Always check voice duration first, then set card data-duration to match.
Math.random() — use mulberry32 seeded PRNGclass="clip" required on all timed elements<audio> tags with data-track-index — not Web Audio APIWeb Audio API 合成的音效不会渲染进 HyperFrames 的 MP4 输出。
解决方案:用 Python 脚本把音效预渲染成 WAV 文件,然后用 <audio> 标签引入。
python3 scripts/render_sfx.py assets/audio/sfx
默认会先产出 6 种常用音效(基础参考包):
| 文件 | 时长 | 用途 |
|---|---|---|
| whoosh.wav | 350ms | 卡片转场 |
| impact.wav | 400ms | 卡片揭示/重音 |
| pop.wav | 150ms | 通知/轻反馈 |
| click.wav | 100ms | UI 点击 |
| sparkle.wav | 600ms | 揭晓/成就/片尾 |
| rise.wav | 1000ms | 紧张/铺垫 |
这 6 种只是默认参考,不是上限。
如果分镜需要其他声音(例如机械启动、扫描、故障告警、数据流、倒计时、转场吸附、胜利提示等),应在 scripts/render_sfx.py 里新增对应合成函数并输出新的 WAV 文件,再按时间线接入。
新增音效建议遵循:
scan.wav、alarm.wav、countdown.wav)并写入音效映射注释<!-- 卡片入场音效:whoosh + impact 组合 -->
<audio id="sfx-card1" class="clip"
data-start="4.0" data-duration="0.5"
data-track-index="6" data-volume="0.4"
src="assets/audio/sfx/whoosh.wav"></audio>
<audio id="sfx-card1b" class="clip"
data-start="4.1" data-duration="0.5"
data-track-index="7" data-volume="0.35"
src="assets/audio/sfx/impact.wav"></audio>
修改 scripts/render_sfx.py 中的合成函数即可。每个函数是纯数学(正弦波+噪声+包络),无需外部依赖。
source ~/.nvm/nvm.sh && nvm use 22
cd tech-news-flash
npx hyperframes lint # Check for errors
npx hyperframes snapshot --at 3,8,25,42,58,82 # Verify key frames
npx hyperframes render -o output.mp4 # Render final video
# 1. Init project
source ~/.nvm/nvm.sh && nvm use 22
npx hyperframes init ai-news-$(date +%Y%m%d)
cd ai-news-$(date +%Y%m%d)
# 2. Create asset directories
mkdir -p assets/images assets/audio
# 3. Download images (edit URLs for your news)
curl -sL -o assets/images/topic1.jpg "https://images.unsplash.com/photo-XXX?w=640&q=80"
# 4. Generate voiceover
edge-tts --voice zh-CN-YunxiNeural --text "..." --write-media assets/audio/card1.mp3
# 5. Write index.html (use the card layout template)
# 6. Lint, preview, render
npx hyperframes lint
npx hyperframes preview
npx hyperframes render -o output.mp4