JZSub is a Codex skill that downloads videos from popular platforms, generates bilingual subtitles via GPT, and burns them into MP4 files with high quality and customizable delivery options.

Stars

891

7-day growth

No data

Forks

97

Open issues

0

License

MIT

Last updated

2026-07-14

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It fully automates the process of downloading, translating, and burning bilingual subtitles into videos across multiple platforms, using GPT for context-aware translation and libass for accurate subtitle rendering, all within the Codex ecosystem.

Who it is for

  • Content creators who want to localize their videos with bilingual subtitles
  • Language learners who need subtitled videos for study
  • Video editors who require burned-in subtitles for distribution
  • Developers building automation workflows with Codex skills

Use cases

  • Download a YouTube video and generate a Chinese-English bilingual subtitled MP4
  • Extract original subtitles from Bilibili and create a bilingual SRT file
  • Batch download videos from various platforms with minimal resource usage
  • Create vertical-subtitled MP4s from TikTok or YouTube Shorts

Strengths

  • Supports YouTube, Bilibili, Vimeo, Twitch, Dailymotion, TikTok, and more via yt-dlp
  • Efficient translation with batch context and sentence-aware splitting, preserving original text
  • Professional subtitle burning with libass, including vertical-screen adaptation and MiSans font
  • Lightweight operation: reads compact subtitle files, not full manifests, and shows progress every 5% during burn

Considerations

  • Requires Python 3.10+, Deno 2.3+, FFmpeg with libass, and MiSans Bold font to be installed manually
  • Only downloads content the user has legal access to; does not bypass DRM, paywalls, or captchas
  • Subtitle availability and format depend on the source platform; some platforms may not offer subtitles for all content

README quick start

给 JZSub 一个视频链接,拿回最高画质视频、封面、双语字幕和烧录完成的 MP4。

支持的平台

YouTube
Bilibili
Vimeo
Twitch
Dailymotion
TikTok

以及 yt-dlp 支持的其他站点。实际可用格式、字幕和登录要求由平台决定。

主要功能

  • 最高画质:下载最佳视频与音频,尽可能无损封装 MP4
  • 按需交付--deliver 可选完整烧录、仅视频(含原始字幕文件)、仅原始字幕、或双语字幕文件
  • 双语字幕:紧凑分批翻译、批间上下文衔接,再按句子边界重新切分;原文保持不变。默认译成中文,--target-lang 可指定日语、法语等任意目标语言
  • 自动烧录:MiSans 字幕、底部双语堆叠、自适应竖屏、精确背景、libass 渲染
  • 低耗运行:只读取紧凑字幕文档,不读取完整清单;烧录每 5% 显示一次进度
  • 封面直取:自动下载并转换为 封面.jpg
  • 静默登录:需要时直接读取 Chrome 登录态,不导出 Cookie
  • 无字幕也能用:平台没有字幕时直接交付视频、MP4 和封面
烧录 [██████████░░░░░░░░░░]  50%  01:11 / 02:23  0.68x

视频前后对比

左:下载后的原片 · 右:JZSub 生成并烧录的原文+中文双语字幕

竖屏视频支持

左:无字幕原片 · 右:JZSub 竖屏双语字幕成片。自动使用更紧凑的字号与更大的底部安全区。截图来自 Parking Sensor (DIY)。

封面自动获取

  与视频一起交付
  封面.jpg
  自动选择平台封面并转换为通用 JPEG,无需另存网页图片。

在 Codex 中使用

npx 一键安装(推荐)

npx skills add pengchujin/jzsub --skill jzsub -g -a codex -y

需要 Node.js 18+。命令会从 GitHub 获取最新版,并把 JZSub 全局安装到 Codex。

手动安装

git clone https://github.com/pengchujin/jzsub.git
mkdir -p ~/.codex/skills
cp -R jzsub/skills/jzsub ~/.codex/skills/

在 Codex 新任务中发送:

$jzsub https://www.youtube.com/watch?v=VIDEO_ID

JZSub 会持续执行下载、模型翻译、字幕渲染、烧录与交付检查。翻译通过紧凑队列逐批进行,不读取完整字幕清单,也不会停在仅下载完成的中间状态。

默认中文交付会生成 封面.jpg双语字幕版「视频名」.mp4;文件名由下载清单统一声明,续传与交付验证使用同一名称。

按需交付

告诉 agent 你只要什么,它会选择对应的 --deliver 目标;也可以直接运行脚本:

目标说明产物
full(默认)完整流水线视频、封面、字幕、双语烧录 MP4
video只要视频,不翻译不烧录视频、封面,平台有字幕时同样保存原始字幕文件
subs只要字幕,不下载视频流原始字幕 + 衍生 SRT
bilingual-subs只要双语字幕文件原始字幕 + 翻译渲染的双语 SRT/ASS,不下载视频
python3 skills/jzsub/scripts/fetch_video.py "" \
  --output-dir job --deliver video --browser-cookies auto

videosubs 下载完成即结束;fullbilingual-subs 会继续翻译流程,交付检查按声明的目标判定完成。subs 类目标在平台没有合适字幕时会明确报错。

依赖

Python 3.10+、yt-dlp、Deno 2.3+、带 libass 的 FFmpeg/ffprobe,以及 MiSans Bold。macOS 可运行:

brew install yt-dlp ffmpeg-full deno

MiSans 请从小米 HyperOS 官方页面获取;字体文件不包含在本仓库中。

仅下载你有权访问和保存的内容。JZSub 不绕过 DRM、付费墙、验证码或平台安全限制。

开发者验证

python3 skills/jzsub/scripts/fetch_video.py --self-test
python3 -m unittest discover -s skills/jzsub/tests -v

License

MIT · 平台 Logo 与商标归各自权利人所有。

Description

JZSub — 一条视频链接,自动交付最高画质、封面和 GPT 双语字幕 MP4。

Related repositories

Similar projects matched by category, topics, and programming language.

powerycy
Featured
powerycy GitHub avatar

goutoujunshi

An AI relationship coach that provides emotional support, relationship science, and actionable strategies through a multidisciplinary knowledge base.

Python
1,174
makecindy
Featured
makecindy GitHub avatar

cindy

Cindy is an open-source AI agent that runs locally on your machine, integrates multiple AI harnesses and models, and provides memory, skills, and automation to perform real work in your projects and apps.

AI & Machine LearningLarge Language Models
958
7-e1even
Featured
7-e1even GitHub avatar

learn-agent

A collection of notes on building coding agents, derived from the production development of the desktop agent Reina, with each mechanism simplified into a zero-dependency, single-file Node.js demo.

AI & Machine LearningLarge Language Models
218