v0.24.0
HotClip v0.24.0 — HDR 素材进来,社媒成片不再灰白或炸高光
这一版补上自动 HDR 色彩安全链。PQ/HLG 且原色、矩阵、范围完整并经捆绑运行时验证的素材,会在本机受控映射到兼容抖音、快手、B站、视频号、小红书与 TikTok 的 SDR BT.709。色彩路径不完整或不支持时不猜测,并明确提示未转换;普通 SDR 保持原有行为。
- 严格元数据门:读取像素格式、位深、原色、传递、矩阵与范围;自动转换只接受
smpte2084(PQ)或arib-std-b67(HLG)加 BT.2020 原色、BT.2020 非恒定亮度矩阵与 TV/PC 范围,不凭 10-bit 或任一单项猜测。若有 MaxCLL 或 mastering-display 峰值则用于约束高光,缺失时保留 FFmpeg 的安全自动估计。 - 受控映射:显式声明输入路径,先在线性光域处理高光,再以保色优先的 Mobius tone map 和 10→8-bit 误差扩散抖动输出电视范围
yuv420pSDR,并明确写入 BT.709 标签。 - 全渲染路径一致:连续剪、跳剪、多片段、高潮前置、Web 动态字幕与质检修复保持同一输出色彩约定;转换发生在裁切、智能构图、运镜、字幕和水印之前。
- 异常也不藏:检测到 HDR 但色彩路径不完整/不支持时沿用既有渲染并明确标记未转换;色彩信息检查失败时使用独立状态,避免把“无法判断”误报为 SDR。桌面、CLI、MCP 与
clips.json保持一致。 - 多轨不串色:探测、HDR 峰值、连续剪、跳剪、关键帧判断与缓存都绑定同一条明确选中的视频轨;单视频轨 SDR 的像素处理与安全直拷判定不变,多轨缓存按所选视频/音频轨隔离。
- 防止错误校正:所有检测到的 HDR 都暂不叠加基于 SDR 采样域的“智能画面校正”,包括无法安全转换的输入。
- 可审计:
clips.json记录源色彩元数据、判定、决定、原因和 BT.709 目标;合集也继承转换/跳过状态。 - 完全本地:复用安装包自带 FFmpeg,无新增模型、依赖、下载、上传或云端费用。
验证覆盖纯计划单测、连续/跳剪滤镜顺序、流复制失效条件、字幕叠加与修复输出标签,并用捆绑 FFmpeg 生成带 PQ/HLG 色彩标签的合成 10-bit 色卡/渐变、transfer-only 不完整样片与正反布局双视频轨样片。支持路径完整执行 probe → plan → cut → probe 后确认 yuv420p、TV range、BT.709 原色/传递/矩阵;不支持路径确认安全直通且不崩溃。当前样片验证路由、滤镜执行与输出标签,不冒充校准亮度/色差金样。完整测试、类型检查、生产构建与中英文响应式验收均为发布门槛。
HotClip v0.24.0 — Safe social output for tagged HDR footage
This release adds an automatic HDR colour-safety path. PQ or HLG footage is tone-mapped locally to widely compatible SDR BT.709 only when primaries, matrix and range form a complete, bundled-runtime-verified input path. Incomplete or unsupported HDR is never guessed and is explicitly marked unconverted. SDR behaviour remains unchanged.
- Strict metadata gate: pixel format, bit depth, primaries, transfer, matrix and range are probed. Automatic conversion requires
smpte2084(PQ) orarib-std-b67(HLG), BT.2020 primaries, a BT.2020 non-constant matrix and TV/full range; it is never inferred from one tag alone. MaxCLL or mastering-display peak metadata constrains highlights when present, while its absence keeps FFmpeg's safe automatic estimate. - Controlled mapping: the input path is explicit, highlights are processed in linear light, and a colour-preserving Mobius tone map plus 10→8-bit error-diffusion dithering emits TV-range
yuv420pSDR with explicit BT.709 tags. - Render-path parity: continuous cuts, jump cuts, stitched clips, cold opens, web captions and QA repairs keep the same output colour contract. Tone mapping runs before crop, reframe, motion, captions and watermarks.
- Failures stay visible: incomplete or unsupported HDR keeps the established render path and is marked unconverted; a colour-inspection failure uses a distinct state so “unknown” is never misreported as SDR. Desktop, CLI, MCP and
clips.jsonagree. - Multi-track colour cannot drift: probing, HDR peak metadata, continuous/jump rendering, keyframe checks and cache identity bind the same selected video stream. Single-video SDR keeps its pixel treatment and stream-copy decision; multi-track cache entries are isolated by selected video/audio streams.
- No invalid double correction: SDR-domain adaptive picture finishing is skipped for every detected HDR source, including those that cannot be converted safely.
- Auditable output:
clips.jsonrecords source metadata, detection, decision, reason and the BT.709 target; compilation results inherit conversion/skipped status. - Fully local: the feature reuses the bundled FFmpeg and adds no model, dependency, download, upload or cloud cost.
Release verification covers pure planning, continuous/jump-cut filter ordering, stream-copy invalidation, overlay and repair output tags, plus bundled-FFmpeg synthetic 10-bit bars/gradients carrying PQ/HLG tags, transfer-only incomplete metadata and reversed dual-video layouts. Supported inputs run through probe → plan → cut → probe and verify tagged BT.709 output; unsupported paths verify safe non-crashing passthrough. These fixtures prove routing, filter execution and output tags, not calibrated luminance or colour-difference accuracy. Full tests, both TypeScript targets, the production build and bilingual responsive QA remain release gates.