ai-news-video-pipeline

For automatically collecting AI news from multiple free data sources and generating 30-second voice scripts plus copy for Douyin/WeChat Channels/Xiaohongshu, and composing Remotion dynamic videos. Supports end-to-end automation for non-face content creators and can run in offline mode without an API key.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "ai-news-video-pipeline" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-89d329621d9092b27a57c502eb27654c69af6059e740867ab71aa8aa1a337847. Verify the upstream source and version against https://skillhub.cn/skills/user_28cdc485/ai-news-video-pipeline before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

For automatically collecting AI news from multiple free data sources and generating 30-second voice scripts plus copy for Douyin/WeChat Channels/Xiaohongshu, and composing Remotion dynamic videos. Supports end-to-end automation for non-face content creators and can run in offline mode without an API key.

0 Downloads

Introduction source: third_party · user_28cdc485 · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: ai-news-video-pipeline
description: 本技能从多个免费数据源自动采集 AI 资讯,生成 30 秒口播脚本与三平台(抖音/视频号/小红书)文案,并合成 Remotion 动态视频。支持不露脸自媒体全流程自动化,离线模式无需 API key 即可运行。当用户想做 AI 快讯短视频、批量生成不露脸口播内容、搭建自动化内容管线时使用。
version: 1.0.0
author: 留空替换
agent_created: true

AI 快讯视频自动生成

定位

"懂代码的 AI 资讯博主"——用快讯做流量,用技术做信任,用服务做变现。

本技能提供一套完整的不露脸短视频自动化生产线:采集→脚本→配图→配音→视频合成→三平台文案,从 6+ 免费数据源到成品 mp4,全程可离线跑通,零 API key 也能用。

适用场景

  • AI 资讯自媒体日更(抖音/视频号/小红书)
  • 想做短视频引流但不想露脸
  • 需要批量生产 30-60 秒口播类视频
  • 展示技术能力,吸引软件开发 / vibecoding 客户
  • 搭建从内容到私域转化的自动化管线

目录结构

ai-news-video-skill/
├── SKILL.md                          # 本文件
├── scripts/
│   └── ai_news_pipeline/             # 核心管线全部源码
│       ├── main.py                   # CLI 入口 (--once/--generate/--produce/--legacy)
│       ├── config.py                 # 全局配置(数据源/权重/LLM/Prompt)
│       ├── pipeline.py               # 采集→去重→评分→存储 编排
│       ├── processor.py              # 去重(URL + TF-IDF 语义) + 热度评分
│       ├── script_generator.py       # 口播脚本生成(DeepSeek/OpenAI/离线模板)
│       ├── storage.py                # SQLite 存储层
│       ├── models.py                 # 数据模型
│       ├── app.py                    # Streamlit 可视化控制台(可选)
│       ├── requirements.txt          # Python 依赖
│       ├── collectors/               # 6+ 数据源采集器
│       │   ├── arxiv.py / github_trending.py / hackernews.py
│       │   └── producthunt.py / rss_feeds.py / rsshub_twitter.py
│       ├── video_producer/           # 视频生产层
│       │   ├── producer.py           # 编排器(Remotion 默认 / --legacy 旧版)
│       │   ├── tts.py                # Edge-TTS 免费配音
│       │   ├── card_renderer.py      # Pillow 静态卡片(旧版)
│       │   ├── subtitle.py           # ASS 字幕
│       │   └── video_composer.py     # FFmpeg 合成(旧版)
│       └── remotion/                 # Remotion React 动画渲染(默认)
│           ├── package.json          # npm install 后安装依赖
│           ├── src/components/       # 动画组件(StatCard/ComparisonCard/HookCard 等)
│           └── public/images/        # 示例配图
├── references/
│   ├── architecture.md               # 全链路架构 + 热度评分公式 + CTA 自定义指南
│   └── operations.md                 # 三平台差异化运营策略 + 引流变现路径
└── assets/
    └── 封面模板.html                  # 静态封面兜底模板

环境依赖

Python 3.11+

# 创建虚拟环境(推荐)
python3 -m venv .venv
source .venv/bin/activate

# 安装依赖
pip install -r scripts/ai_news_pipeline/requirements.txt

主要依赖:requests, feedparser, beautifulsoup4, scikit-learn, openai, edge-tts, Pillow, imageio-ffmpeg, streamlit(可选可视化)。

Node.js 18+ (Remotion 渲染, 仅默认模式需要)

cd scripts/ai_news_pipeline/remotion
npm install

不走 Remotion 可用 --legacy 降级到 Pillow+FFmpeg 旧版,无需 Node。

FFmpeg (仅 --legacy 旧版需要)

系统自动检测:ffmpeg 在 PATH → 直接用;否则用 imageio-ffmpeg(pip 自带)。

快速开始

所有命令从 scripts/ai_news_pipeline/ 目录下运行:

cd scripts/ai_news_pipeline/

# 1. 单次采集(采集→去重→评分→存储→导出 Top 10)
python main.py --once

# 2. 查看数据库统计
python main.py --stats

# 3. 从导出新闻生成 30 秒口播脚本(自动检测 LLM 模式)
python main.py --generate

# 4. 从口播脚本生产视频(默认 Remotion 动态渲染)
python main.py --produce

# 5. 只生产前 3 条
python main.py --produce --max 3

# 6. 使用旧版 Pillow+FFmpeg(无需 Node)
python main.py --produce --legacy

# 7. 可视化控制台(Streamlit)
python -m streamlit run app.py

工作流详解

层 1 — 采集

6 个免费数据源,可通过 config.py 中 COLLECTOR_ENABLED 独立开关:

数据源 source_key 获取方式
Hacker News hackernews 官方 API
arXiv cs.AI arxiv 官方 API
机器之心/量子位/OpenAI/Google AI Blog rss RSS
GitHub Trending github_trending HTML 爬虫
Product Hunt producthunt RSS
Twitter/X (via RSSHub) rsshub_twitter RSSHub(默认关闭)

层 2 — 处理

  1. URL 去重 → TF-IDF 语义去重(阈值 0.65) → 热度评分(来源权重 + 时效性 + 社交量)
  2. 导出 Top N → LLM 生成口播脚本(120-180 字,约 30 秒) + 三平台文案
  3. LLM 模式自动选择: DEEPSEEK_API_KEY → 优先 DeepSeek; OPENAI_API_KEY → 备选; 否则离线模板自动降级(零成本)

层 3 — 生产

默认引擎 — Remotion(推荐)

React 动画组件:动态渐变背景 + 粒子 + 文字飞入 + 关键词高亮 + 5 种转场 + 智能组件选择(StatCard/ComparisonCard/CodeSnippetCard/ContentCard)。输出:1080×1920 竖版 mp4 + Edge-TTS 中文配音 + ASS 字幕。

旧版备用(--legacy)

Pillow 静态文字卡片 → Edge-TTS 配音 → ASS 字幕 → FFmpeg 合成。输出:1080×1920 竖版 mp4, 4 张卡(钩子/内容1/内容2/CTA)。

数据源与新闻源配置

  • 7 个已接入数据源:Hacker News, arXiv(AI 类), GitHub Trending, Product Hunt, 机器之心, 量子位, OpenAI/Google AI Blog(RSS)
  • 额外示例源(RSSHub):Twitter/X 通过 RSSHub(需自建实例) 监控 AI 领域专家动态
  • 采集频率: 默认每小时
  • 流量估算: RSS 调用极少,GitHub Trending 需爬虫(但极少被限)

视频生产配置

  • 渲染引擎: Remotion(React 动画,1080x1920 竖版)
  • 配音引擎: Edge-TTS 中文(可选男/女/语速/音色)
  • 字幕效果: ASS 格式,关键词高亮
  • 优化设置: config.py 中的 FETCH_LIMIT_PER_SOURCE 和 max_videos

自定义: 品牌与 CTA

使用前务必修改以下位置,替换为你的账号和引流信息:

视频品牌

  • scripts/ai_news_pipeline/remotion/src/components/BrandHeader.tsx 第 12 行:
    brand = "你的账号名"  // 替换 "AI 快讯"
  • CTVACard.tsx 第 14 行: brand = "你的账号名"

CTA 关注引导

  • scripts/ai_news_pipeline/remotion/src/components/CTACard.tsx 第 106 行:
    {segment.text}  // 或改此行: "加我微信 xxx,免费领 AI 工具包"
  • 旧版 Pillow 卡片的 CTA 文字在 video_producer/card_renderer.py 中修改。

引流变现参考

详细策略见 references/operations.md。一句话:视频结尾引导「评论区扣 1」→ 私信发工具链接 → 加微信 → 拉群 → 展示技术案例 → 接单。

测试方法

cd scripts/ai_news_pipeline/

# 完整一次跑通
python main.py --once && python main.py --generate && python main.py --produce --max 1

# 只用离线模板(无需 API key)
# 不设置 DEEPSEEK_API_KEY / OPENAI_API_KEY 即可自动降级

# 可视化调试
python -m streamlit run app.py
# 浏览器打开 http://localhost:8501

常见问题

Q: 视频输出在哪? A: scripts/ai_news_pipeline/data/videos/ 目录。口播脚本在 data/scripts/,采集导出在 data/exports/。

Q: Remotion 渲染报错? A: 确保已 cd scripts/ai_news_pipeline/remotion && npm install。若不想装 Node,用 --legacy 降级到 Pillow+FFmpeg。

Q: GitHub Trending 报 SSL 错误? A: 本机有代理(Clash/V2Ray)做 SSL 拦截。config.py 中 VERIFY_SSL = False 即可。

Q: 如何切换 LLM 提供商? A: 设置环境变量 DEEPSEEK_API_KEY=sk-xxx 或 OPENAI_API_KEY=sk-xxx,或显式设 LLM_PROVIDER=deepseek / LLM_PROVIDER=openai。都不设则自动走离线模板(零成本)。

Q: 可以换配音音色吗? A: 编辑 video_producer/tts.py 中的 VOICES 字典,支持女声温暖/女声冷静/男声活力/男声沉稳。

Q: SkillHub 上架后如何更新? A: 修改源码 → 重新打包 → 在 SkillHub 开发者后台提交新版本。

参考资料

  • references/architecture.md — 全链路架构、评分公式、组件选择逻辑、CTA 替换详细说明
  • references/operations.md — 三平台(抖音/视频号/小红书)运营策略、发布节奏、引流变现路径
  • assets/封面模板.html — 静态封面兜底模板,可用浏览器打开截图当视频封面

Current listing version

1.0.0

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value95/100

Highlights

  • 提供完整的不露脸短视频自动化生产线,从采集到视频合成全流程覆盖
  • 支持6+免费数据源,离线模式无需API key即可运行,零成本启动
  • 解决自媒体用户批量生成AI资讯短视频的核心痛点,实用价值高
Trigger Precision85/100

Highlights

  • 触发词精准完整,覆盖多种变体(AI快讯短视频、不露脸口播内容、自动化内容管线等)
  • 边界清晰,明确区分了适用场景和非适用场景
Structure and Standards90/100

Highlights

  • Phase/步骤清晰,有明确的出口条件和端到端示例
  • frontmatter完整,目录结构合理,单文件控制在500行以内
  • 提供了详细的快速开始指南和工作流详解
Execution Reliability88/100

Highlights

  • 工具来源明确(Remotion、Edge-TTS、FFmpeg等),参数配置清晰
  • 覆盖主要异常情况(SSL错误、渲染报错等)并提供解决方案
  • 支持降级方案(--legacy模式),确保在不同环境下都能运行
Evidence Verifiability (mean of the first four)90/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • localhost

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.