video-publish
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseVideo Publish
视频发布
One finished video out, on the creator's own accounts. Making it is .
/video-editNothing is posted before the creator's explicit yes on the plan of step 5. That yes covers that video only.
Talk to them in their language. = .
<edit>video-agent/edits/<slug>/让一个成片发布到创作者自己的账号。制作视频请使用 。
/video-edit在创作者对第 5 步中的计划明确表示同意之前,不得发布任何内容。该同意仅适用于该视频。
使用用户的语言与其沟通。 = 。
<edit>video-agent/edits/<slug>/1. Which video
1. 选择视频
First match wins:
- A path, a slug or a title they give: .
<edit>/final.mp4 - The video finished in this conversation.
- Nothing: the newest . Name it in the plan.
video-agent/edits/*/final.mp4
Then check : already there with this platform, say so and stop (unless they want to post it again).
<edit>/published.mdRead the format with ffprobe: vertical (a short, for YouTube Shorts, Reels and TikTok) or horizontal (a long video, YouTube only by default).
按以下顺序匹配,首个匹配项优先:
- 用户提供的路径、slug 或标题:。
<edit>/final.mp4 - 本次对话中已完成的视频。
- 均未找到:最新的 。在计划中写明其名称。
video-agent/edits/*/final.mp4
然后检查 :如果其中已有该平台的发布记录,则告知用户并停止(除非用户希望再次发布)。
<edit>/published.md使用 ffprobe 读取格式:竖版(短视频,适用于 YouTube Shorts、Reels 和 TikTok)或横版(长视频,默认仅发布到 YouTube)。
2. Setup Treg (once)
2. 设置 Treg(仅需一次)
Treg posts for them on their own accounts, free. Check:
bash
treg --version
treg connections lsEach platform they post on must show in the list with posting rights ( with on Instagram, on TikTok, or on YouTube).
scopescontent_publishvideo.publishyoutube.uploadyoutubeMissing: explain in one line, ask, then:
- Install (macOS and Linux; on Windows use the MCP: , then
claude mcp add --transport http treg https://treg.to/mcp/to sign in):/mcpbashcurl -fsSL https://treg.to/install.sh | sh treg login - Connect only the platforms they post on, each opens the platform's own login:
Instagram needs a professional account (Creator or Business, free switch in the app's settings).bash
treg connections connect --provider instagram --capability post treg connections connect --provider tiktok --capability post treg connections connect --provider youtube --capability post
They don't want Treg: the manual route (6a) works with no setup.
Treg 可免费帮助用户发布到其自己的账号。检查:
bash
treg --version
treg connections ls每个要发布的平台都必须在列表中显示,并具有发布权限(Instagram 的 中包含 ,TikTok 包含 ,YouTube 包含 或 )。
scopescontent_publishvideo.publishyoutube.uploadyoutube如果缺少权限:用一行说明情况,询问用户,然后:
- 安装(macOS 和 Linux;Windows 上使用 MCP:,然后通过
claude mcp add --transport http treg https://treg.to/mcp/登录):/mcpbashcurl -fsSL https://treg.to/install.sh | sh treg login - 连接 仅连接用户要发布的平台;每个命令都会打开对应平台自己的登录页面:
Instagram 需要专业账号(Creator 或 Business,可在应用设置中免费切换)。bash
treg connections connect --provider instagram --capability post treg connections connect --provider tiktok --capability post treg connections connect --provider youtube --capability post
如果用户不想使用 Treg:手动发布流程(6a)无需设置即可使用。
3. The files
3. 文件
- Master: , full quality, for YouTube.
<edit>/final.mp4 - Social export (shorts only): , H.264 + AAC, under 30 MB so Treg can host it for Instagram (TikTok accepts up to 64 MB). Missing or older than the master, re-encode at a bitrate that fits (about 28 MB × 8000 ÷ duration in seconds, minus 160 kb/s of audio, in kb/s):
<edit>/social.mp4Check its size, and that it decodes:bashffmpeg -y -i <edit>/final.mp4 -c:v libx264 -preset slow -b:v <rate>k -maxrate <rate>k -bufsize <2x rate>k -pix_fmt yuv420p -c:a aac -b:a 160k -movflags +faststart <edit>/social.mp4.ffmpeg -v error -i <edit>/social.mp4 -f null - - Cover: , always. Without one, Instagram takes frame 0, often a blink or a blank frame. Pick it from the hook: the face with the eyes open, the hook card fully in. Contact sheet of the first 3 seconds, read it, then extract the chosen time
<edit>/cover.jpg:<t>Vertical: keep the key visual inside the central 3:4 (y 240 to 1680), the profile grid crops to it. A long video: a 1280x720 thumbnail is better; offerbashffmpeg -v error -y -ss 0.1 -t 3 -i <edit>/final.mp4 -vf "fps=10,scale=270:-1,tile=6x5" -frames:v 1 video-agent/.tmp/hook-sheet.jpg ffmpeg -v error -y -ss <t> -i <edit>/final.mp4 -frames:v 1 -q:v 2 <edit>/cover.jpgto make one, or use a frame./codex-images
- 主文件:,保留完整画质,用于 YouTube。
<edit>/final.mp4 - 社交平台导出(仅限短视频):,使用 H.264 + AAC,文件大小低于 30 MB,以便 Treg 为 Instagram 托管该文件(TikTok 接受最高 64 MB)。如果文件缺失或其修改时间早于主文件,则按适合目标大小的码率重新编码(目标约为 28 MB:视频码率约为 28 MB × 8000 ÷ 时长(秒),再减去 160 kb/s 的音频码率,结果单位为 kb/s):
<edit>/social.mp4检查文件大小以及能否正常解码:bashffmpeg -y -i <edit>/final.mp4 -c:v libx264 -preset slow -b:v <rate>k -maxrate <rate>k -bufsize <2x rate>k -pix_fmt yuv420p -c:a aac -b:a 160k -movflags +faststart <edit>/social.mp4。ffmpeg -v error -i <edit>/social.mp4 -f null - - 封面:,必须始终准备。若没有封面,Instagram 会使用第 0 帧,而这一帧往往是眨眼瞬间或空白画面。从开场钩子部分挑选封面:选择眼睛睁开的正面画面,或钩子卡片完整显示的画面。生成并查看前 3 秒的画格总览,然后提取选定时间
<edit>/cover.jpg:<t>竖版视频:将关键画面保留在中央 3:4 区域内(y 240 到 1680),因为个人主页宫格会裁切到该区域。长视频:1280x720 缩略图更合适;可提供bashffmpeg -v error -y -ss 0.1 -t 3 -i <edit>/final.mp4 -vf "fps=10,scale=270:-1,tile=6x5" -frames:v 1 video-agent/.tmp/hook-sheet.jpg ffmpeg -v error -y -ss <t> -i <edit>/final.mp4 -frames:v 1 -q:v 2 <edit>/cover.jpg生成一张,或直接使用某一帧。/codex-images
4. The texts
4. 文本
From (written by video-edit) when it exists, else from the video's script or transcript and , in the video's language:
<edit>/post.mdvideo-agent/voice.md- Caption (Instagram and TikTok): a first line that hooks without repeating the spoken hook word for word (the first 125 characters show before "more"), 2 to 4 short lines on what the viewer gets, the ask from voice.md, then 3 to 5 hashtags of the topic. No #fyp, no wall of emoji.
- TikTok caption only when it should differ (shorter, other hashtags).
- YouTube title: Shorts under 60 characters, long under 70, the promise of the video, true to it.
- YouTube description: the caption, the chapters for a long video (from post.md), then their links (ask once and add them to voice.md).
Run the humanize pass of (its ) on all of them when that skill is installed. Every name, number and claim comes from the video; none is added. Save them in , one heading per text.
video-scriptreferences/humanize.md<edit>/post.md如果 (由 写入)存在,则从中获取内容;否则从视频脚本或转录稿以及 获取,并使用视频的语言:
<edit>/post.mdvideo-editvideo-agent/voice.md- 配文(Instagram 和 TikTok):首行应当吸引人,但不要逐字重复口播的开场钩子(前 125 个字符会显示在“更多”之前);用 2 到 4 个短句说明观众将获得什么;加入 中的行动号召;然后添加 3 到 5 个与主题相关的 hashtag。不要使用 #fyp,也不要堆砌 emoji。
voice.md - TikTok 配文:仅在需要与 Instagram 不同时单独编写(更短或使用其他 hashtag)。
- YouTube 标题:Shorts 少于 60 个字符,长视频少于 70 个字符;写出视频承诺提供的内容,并且必须与视频一致。
- YouTube 描述:使用配文;长视频还需加入章节(来自 ),然后附上创作者的链接(询问一次,并将链接添加到
post.md)。voice.md
如果已安装该 skill,对以上所有文本运行 的 humanize 流程(其 )。所有姓名、数字和说法都必须来自视频,不得添加任何内容。将文本保存到 ,每份文案使用一个标题。
video-scriptreferences/humanize.md<edit>/post.md5. The plan (mandatory)
5. 计划(必须执行)
- Platforms: a short goes to YouTube + Instagram + TikTok, a long video to YouTube, unless they name others.
- Time: the one they give (written in their local time and in UTC), else now.
- Route per platform: Treg (connected) or manual. Instagram and TikTok have no scheduling through Treg: they post now. YouTube can wait for a date (private + ). A later time on Instagram or TikTok: run
publishAtagain at that time, or go manual and use the app's scheduler./video-publish
Show it and wait for a clear yes:
text
PLAN · budget-margins · 0:47 · social.mp4 18 MB
Cover: cover.jpg (0.8 s) [shown as an image]
YouTube Shorts · Treg · 2026-10-11 18:00 Paris (16:00 UTC) · private until then
Instagram Reel · Treg · now
TikTok · manual (not connected)
Title: Your margin is lying to you
Caption: ...
Reply yes to publish, or tell me what to change.A change on the plan: apply it, show the plan again.
- 平台:短视频发布到 YouTube + Instagram + TikTok,长视频发布到 YouTube,除非用户指定其他平台。
- 时间:使用用户提供的时间(同时以当地时间和 UTC 表示),否则为 立即。
- 发布路径(按平台):Treg(已连接)或手动。Treg 无法为 Instagram 和 TikTok 定时发布,因此它们会 立即 发布。YouTube 可以指定未来日期(先设为 ,并使用
private)。若要稍后发布到 Instagram 或 TikTok:在该时间再次运行publishAt,或者改为手动并使用应用的定时发布功能。/video-publish
展示计划并等待用户明确同意:
text
PLAN · budget-margins · 0:47 · social.mp4 18 MB
Cover: cover.jpg (0.8 s) [shown as an image]
YouTube Shorts · Treg · 2026-10-11 18:00 Paris (16:00 UTC) · private until then
Instagram Reel · Treg · now
TikTok · manual (not connected)
Title: Your margin is lying to you
Caption: ...
Reply yes to publish, or tell me what to change.如果用户要求修改计划:应用修改,然后再次展示计划。
6a. Manual
6a. 手动
Open the folder (macOS , Windows , Linux ), then give the steps:
open <edit>explorer <edit>xdg-open <edit>- YouTube: studio.youtube.com → Create → Upload videos → → title and description from
final.mp4,post.mdas thumbnail → Visibility → Schedule or Public.cover.jpg - Instagram: the app → + → Reel → → the caption → Edit cover → Add from camera roll →
social.mp4→ Share (or Schedule in the advanced settings of a professional account).cover.jpg - TikTok: the app or tiktok.com/upload → → the caption → cover at the cover time → Post (or Schedule on the web).
social.mp4
打开文件夹(macOS ,Windows ,Linux ),然后提供操作步骤:
open <edit>explorer <edit>xdg-open <edit>- YouTube:→
studio.youtube.com(创建)→Create(上传视频)→Upload videos→ 使用final.mp4中的标题和描述 → 将post.md设为缩略图 →cover.jpg(可见性)→Visibility(定时发布)或Schedule(公开)。Public - Instagram:应用 → + → →
Reel→ 配文 →social.mp4(编辑封面)→Edit cover(从相机胶卷添加)→Add from camera roll→cover.jpg(分享)(或在专业账号的高级设置中选择Share〔定时发布〕)。Schedule - TikTok:应用或 →
tiktok.com/upload→ 配文 → 在封面时间点选择封面 →social.mp4(发布)(或在网页上选择Post〔定时发布〕)。Schedule
6b. Treg
6b. Treg
Before each call, for the exact parameters (they change). All of these are free on their own accounts. Keep stdout only (). One platform failing never blocks the others.
treg catalog get <id>2>/dev/nullInstagram reel
- Host the files (30 MB max each, 7 days): and
treg host <edit>/social.mp4print public URLs.treg host <edit>/cover.jpg - with
instagram.instagram.media.container.create(theig_user_idof their Instagram inresource_ref),treg connections ls,media_type=REELS,video_url,cover_url.caption - Poll every 10 s until
instagram.instagram.media.container.status(FINISHED: show it and stop for Instagram).ERROR - with the container id. Then its
instagram.instagram.post.publish(permalinkwithinstagram.instagram.user.posts, the newest one).fields=id,permalink
TikTok
- : the privacy options they may use.
tiktok.tiktok.creator.info - with the caption, a
tiktok.tiktok.video.publish.initfrom that list (public when it is there),privacy_level= the cover time in ms (TikTok takes a frame, never an image), andvideo_cover_timestamp_mssource_infowith the file size as one chunk.FILE_UPLOAD - PUT to the returned
social.mp4withupload_urlandContent-Type: video/mp4.Content-Range: bytes 0-<size-1>/<size> - Poll until it is published.
tiktok.tiktok.publish.status
An answer (or only in the options): send it to their TikTok inbox instead with (same upload, no caption), and tell them to open TikTok within 24 hours, paste the caption and post.
unaudited_client_can_only_post_to_private_accountsSELF_ONLYtiktok.tiktok.video.inbox.initYouTube
- with
youtube.youtube.video.upload, the snippet (title, description) anduploadType=resumablestatusplus{"privacyStatus": "private", "selfDeclaredMadeForKids": false}for a date ("publishAt": "<UTC ISO time>"for now)."public" - PUT to the session URL it returns.
final.mp4 - with
youtube.youtube.video.thumbnail.set(works on verified YouTube accounts; a refusal is fine, say it).cover.jpg
No session URL in the answer: go manual for YouTube.
每次调用前,运行 以获取准确参数(参数会发生变化)。所有这些操作在用户自己的账号上均免费执行。仅保留 stdout()。一个平台失败时,绝不能阻止其他平台继续发布。
treg catalog get <id>2>/dev/nullInstagram Reel
- 托管文件(每个文件最大 30 MB,有效期 7 天):和
treg host <edit>/social.mp4会打印公开 URL。treg host <edit>/cover.jpg - 调用 ,传入
instagram.instagram.media.container.create(ig_user_id中该 Instagram 的treg connections ls)、resource_ref、media_type=REELS、video_url和cover_url。caption - 每 10 秒轮询 ,直到状态为
instagram.instagram.media.container.status(如果为FINISHED:显示错误并停止 Instagram 发布)。ERROR - 使用容器 id 调用 。然后通过
instagram.instagram.post.publish获取其instagram.instagram.user.posts(参数为permalink,取最新一条)。fields=id,permalink
TikTok
- :获取其可用的隐私选项。
tiktok.tiktok.creator.info - :传入配文、从该列表中选择的
tiktok.tiktok.video.publish.init(如果列表中有privacy_level,则使用它)、public= 封面时间(毫秒)(TikTok 会截取一帧,而不会使用图片),以及video_cover_timestamp_mssource_info,并将文件大小作为一个分块。FILE_UPLOAD - 使用 和
Content-Type: video/mp4,将Content-Range: bytes 0-<size-1>/<size>PUT 到返回的social.mp4。upload_url - 轮询 ,直到内容发布完成。
tiktok.tiktok.publish.status
如果响应为 (或选项中只有 ):改用 将其发送到用户的 TikTok 收件箱(使用相同的上传流程,但不传配文),并告知用户在 24 小时内打开 TikTok、粘贴配文并发布。
unaudited_client_can_only_post_to_private_accountsSELF_ONLYtiktok.tiktok.video.inbox.initYouTube
- 调用 ,使用
youtube.youtube.video.upload、snippet(标题、描述)以及 statusuploadType=resumable,对于指定日期还要加入{"privacyStatus": "private", "selfDeclaredMadeForKids": false}(立即发布则使用"publishAt": "<UTC ISO time>")。"public" - 将 PUT 到返回的会话 URL。
final.mp4 - 使用 调用
cover.jpg(适用于已验证的 YouTube 账号;如果遭到拒绝,可以接受该结果并告知用户)。youtube.youtube.video.thumbnail.set
如果响应中没有会话 URL:为 YouTube 改用手动发布。
7. Record it
7. 记录发布情况
Write , one line per platform: date, time, route, and the link ( or , the reel, the TikTok) once live. Manual route: write it when they say it is posted.
<edit>/published.mdhttps://youtube.com/shorts/<id>https://youtu.be/<id>Then say what is live, the links, and offer in a week to see how it did.
/video-audit将发布情况写入 ,每个平台一行:上线后的日期、时间、发布路径和链接( 或 ,以及 Reel 或 TikTok 的链接)。手动发布路径:在用户确认已经发布后再写入。
<edit>/published.mdhttps://youtube.com/shorts/<id>https://youtu.be/<id>然后说明哪些内容已经上线,提供链接,并建议在一周后运行 查看效果。
/video-auditHonest limits
诚实说明
- Instagram and TikTok can't be scheduled through Treg, only posted now. Their own apps can schedule.
- TikTok keeps posts from new third-party apps private until the app is audited; the inbox route works around it.
- A platform can refuse a video (length, format, music rights). The error is shown as is; the manual route always works.
- Only post videos the creator owns or has the rights to, music included.
- Instagram 和 TikTok 无法通过 Treg 定时发布,只能立即发布。它们自己的应用可以定时发布。
- TikTok 会在新第三方应用通过审核之前,将来自该应用的帖子设为私密;收件箱流程可以绕过此限制。
- 平台可能因时长、格式或音乐版权问题拒绝视频。按原样显示错误;手动发布流程始终可用。
- 只能发布创作者拥有或已获授权的视频,包括其中的音乐。