Skip to content

Allow frame number input instead of time input#11

Merged
skeskinen merged 1 commit intoskeskinen:mainfrom
snelg:frame-numbers
Jan 8, 2025
Merged

Allow frame number input instead of time input#11
skeskinen merged 1 commit intoskeskinen:mainfrom
snelg:frame-numbers

Conversation

@snelg
Copy link
Copy Markdown
Contributor

@snelg snelg commented Jan 4, 2025

I had the same need as #8, so here's a quick-and-dirty patch to allow frame-number input instead of timestamp input.
For example,
smartcut input.mp4 output.mp4 --keep 513,2772 --frames
will create output.mp4 with frames 513 through 2772 from input.mp4.

NOTES:

  • Frame numbers are zero-indexed, i.e. 0 is the first frame of the video, not 1.
  • As a convenient shortcut, -1 is interpreted as the final frame of the input video. So smartcut input.mp4 output.mp4 --frames --keep 76,-1 will output from frame 76 through the end of the input video.

@skeskinen
Copy link
Copy Markdown
Owner

Looks good, thanks!

@skeskinen skeskinen merged commit 345c7b3 into skeskinen:main Jan 8, 2025
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