Use this skill when Codex needs to split a large podcast or audio file with ffmpeg so every output file stays under 200MB. Trigger this skill when the user provides a podcast file plus timeline markers or chapter timestamps and wants Codex to choose safe split points, cut at those timestamps, validate the output sizes, and iterate if any segment is still too large. Works for common audio containers such as m4a, mp3, mp4, aac, and other ffmpeg-readable files.
按用户提供的时间轴候选点拆分大播客文件,并确保每段都低于 200MB。
优先无损拆分:先用 ffprobe 读取总时长、码率和文件大小,再根据平均字节速率从时间轴里挑选安全切点。默认在候选点附近用 silencedetect 吸附到真实停顿处,最后用 ffmpeg -c copy 输出并逐段校验文件大小。
ffmpeg 拆分。-c copy。只有时间戳异常、切口损坏、或用户明确要求时才重编码。按下面顺序做:
ffprobe 读取总时长和码率,或直接读取文件大小。max_bytes / total_size * total_duration 估算单段最大安全时长。示例:
200 / 243。03:20:00、03:30:00、03:40:00,优先选 03:20:00 或 03:30:00,不要选更晚的点。先看规划,不直接写文件:
python3 scripts/split_podcast_by_markers.py INPUT_FILE \
--markers 01:20:00 02:45:00 03:30:00 \
--plan-only
确认方案后执行拆分:
python3 scripts/split_podcast_by_markers.py INPUT_FILE \
--markers 03:25:07 \
--output-dir OUTPUT_DIR
如果时间轴在文本里:
python3 scripts/split_podcast_by_markers.py INPUT_FILE \
--markers-file timeline.txt \
--output-dir OUTPUT_DIR
--markers: 直接给出多个切点,支持 HH:MM:SS、MM:SS、SS。--markers-file: 从文本文件读取切点;空行和 # 注释行会忽略。--max-mb: 每段最大体积,默认 200。--plan-only: 只输出估算方案,不执行 ffmpeg。--force-reencode: 当流复制失败或切口异常时,改用 AAC 128k 重编码。--no-snap-to-silence: 关闭静音吸附,严格按传入时间轴切。--silence-window: 搜索窗口,默认前后各 30 秒。--silence-noise-db: 静音阈值,默认 -35dB。--silence-duration: 最短静音时长,默认 0.35 秒。执行完成后要向用户明确给出:
scripts/split_podcast_by_markers.py读取媒体信息、估算分段、执行 ffmpeg 拆分,并校验输出文件大小。
references/marker-guidelines.md提供时间轴格式和切点选择规则;当用户给的是章节列表、shownotes、口播提纲时,按这里的格式整理后再喂给脚本。