Skip to content

Add keyframe format v1 CLI export - #565

Open
MuhammadBilalKhan267 wants to merge 1 commit into
Breakthrough:mainfrom
MuhammadBilalKhan267:feature/534-keyframe-export
Open

Add keyframe format v1 CLI export#565
MuhammadBilalKhan267 wants to merge 1 commit into
Breakthrough:mainfrom
MuhammadBilalKhan267:feature/534-keyframe-export

Conversation

@MuhammadBilalKhan267

Copy link
Copy Markdown
Contributor

Summary

Adds a save-keyframes CLI command that exports detected scene changes using keyframe format v1.

The command supports custom filenames and output directories through CLI options and scenedetect.cfg.

Testing

Added CLI tests covering:

  • Default output
  • Custom filenames
  • Detection with a start offset

Known limitation

VFR inputs may produce incorrect frame numbers because cuts currently store timestamps and FrameTimecode.frame_num derives a frame number using the average frame rate. Exact VFR frame ordinal support will be handled separately.

Addresses #534

@Breakthrough

Breakthrough commented Aug 17, 2026

Copy link
Copy Markdown
Owner

VFR inputs may produce incorrect frame numbers because cuts currently store timestamps and FrameTimecode.frame_num derives a frame number using the average frame rate. Exact VFR frame ordinal support will be handled separately.

Can we add a test case somehow for downstream usage of the file format to ensure it's valid? E.g. if ffmpeg accepts it can we run it to verify the output. I would like VFR handled in this PR if possible.

@MuhammadBilalKhan267

Copy link
Copy Markdown
Contributor Author

I think the VFR problem deserves it's own issue. frame_num gets used in save_qp and threshold_detector as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants