Files
ISISeg/工程分析/实现方案-2026-05-18-20-18-20.md

32 lines
1.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 实现方案
开始时间2026-05-18-20-18-20
## 后端
1. 修改 `_process_video`
- 结果视频改为按 `source_fps` 写出完整视频时间轴。
- 每读到一帧都写入结果视频。
- 命中抽帧策略的帧执行分割并写入叠加画面。
- 未命中抽帧策略的帧写入原始画面。
2. 统一时间映射
- `result_fps = source_fps`
- `result_duration = duration`
- 每个结果帧的 `result_time = source_time`
- 每个结果帧的 `result_index = frame_index`
3. 抽帧覆盖
- 当视频总帧数可获取时,先根据 `frame_stride` 得到候选帧。
- 如果候选帧超过 `max_frames`,在候选帧中均匀抽取,避免只覆盖视频前半段。
## 前端
1. 双视频同步改为相同时间点同步
- 源视频 seek 到 `t` 时,结果视频也 seek 到 `t`
- 结果视频 seek 到 `t` 时,源视频也 seek 到 `t`
2. 当前帧选择仍按最近的已分割结果帧更新
- 用于高亮下方结果卡片。
- 用于多方法对比按钮的当前帧上下文。