Preserve frame position order for auto insertion
- Allow system frame position percentages to keep two decimal places without reordering saved values. - Stop frontend and backend settings normalization from sorting framePositions on load or save. - Capture automatic video frames in timeline order while retaining each configured position index. - Insert automatically selected frames into report placeholders according to the configured percentage order. - Add frame position utilities and unit coverage for two-decimal rounding, clamping, order preservation, and timeline capture planning. - Update README, AGENTS, feature, requirement, report editor, system settings, progress, and testing docs for the new frame ordering behavior.
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
|
||||
## 视频与抽帧
|
||||
|
||||
用户上传视频后,系统使用浏览器对象 URL 进行即时预览,同时优先通过 `POST /api/files` 以 `kind = VIDEO` 上传后端文件资源。抽帧逻辑按系统设置中的 `framePositions` 百分比定位视频时间,绘制到 canvas 后转为 JPEG,并优先以 `kind = FRAME` 上传后端文件资源。
|
||||
用户上传视频后,系统使用浏览器对象 URL 进行即时预览,同时优先通过 `POST /api/files` 以 `kind = VIDEO` 上传后端文件资源。抽帧逻辑按系统设置中的 `framePositions` 百分比定位视频时间,绘制到 canvas 后转为 JPEG,并优先以 `kind = FRAME` 上传后端文件资源。实际截图会按视频时间从早到晚执行和展示;自动插入报告图片占位符时按系统设置中的百分比配置顺序插入。
|
||||
|
||||
支持:
|
||||
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
配置字段包括:
|
||||
|
||||
- `frameCount`:抽取帧数。
|
||||
- `framePositions`:每帧对应的视频进度百分比。
|
||||
- `framePositions`:每帧对应的视频进度百分比,支持保留两位小数,并保留管理员配置顺序。
|
||||
- `frameMode`:调整帧数时使用整体均匀抽取或保持当前抽帧。
|
||||
- `autoInsertFrames`:是否自动插入关键帧。
|
||||
- `autoInsertDelay`:自动插入延迟。
|
||||
- `autoInsertFrameIndices`:哪些抽帧序号参与自动插入。
|
||||
|
||||
保存时会对 `framePositions` 排序,并把 `frameCount` 同步为位置数组长度。
|
||||
保存时不会对 `framePositions` 排序,只会把每个百分比规范到 0-100 区间和两位小数,并把 `frameCount` 同步为位置数组长度。报告编辑器自动截帧时会按时间顺序执行实际截图;自动插入图片时按 `framePositions` 的配置顺序和 `autoInsertFrameIndices` 插入。
|
||||
|
||||
## AI 接口配置
|
||||
|
||||
|
||||
Reference in New Issue
Block a user