[GH-ISSUE #223] [Enhancement Request] Deduce the same frames #1552

Closed
opened 2026-03-01 18:46:25 +03:00 by kerem · 8 comments
Owner

Originally created by @Esmool on GitHub (Dec 23, 2017).
Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/223

While I recording the scene of typing process, the recorder records too many duplicate frames those have absolutely the same content, as human typing speed is much slower than the frame rate. That makes the file to large, and useless if one tends to present a lecture on some kind of programming skills.

Right now, I have to manually delete those redundant frames. And that is quick a huge amount of work to do. All I need is just keep those frames different to its previous.

Would you please kindly add some button in the toolbar to help me achieve this? Thanks.

Originally created by @Esmool on GitHub (Dec 23, 2017). Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/223 While I recording the scene of typing process, the recorder records too many duplicate frames those have absolutely the same content, as human typing speed is much slower than the frame rate. That makes the file to large, and useless if one tends to present a lecture on some kind of programming skills. Right now, I have to manually delete those redundant frames. And that is quick a huge amount of work to do. All I need is just keep those frames different to its previous. Would you please kindly add some button in the toolbar to help me achieve this? Thanks.
kerem closed this issue 2026-03-01 18:46:26 +03:00
Author
Owner

@NickeManarin commented on GitHub (Dec 23, 2017):

This process of deleting duplicated frames happens during the encoding of the image (watch for "Analyzing unchanged pixels").

Any frame that has no changes based on the previous frame gets deleted and the delay of previous frame is adjusted.

Are you asking to add a button to do this right after the recording?

<!-- gh-comment-id:353749159 --> @NickeManarin commented on GitHub (Dec 23, 2017): This process of deleting duplicated frames happens during the encoding of the image (watch for "Analyzing unchanged pixels"). Any frame that has no changes based on the previous frame gets deleted and the delay of previous frame is adjusted. Are you asking to add a button to do this right after the recording?
Author
Owner

@vatterspun commented on GitHub (Dec 25, 2017):

I'm going to write this out as a bug report just because it makes the most sense. Keep in mind it's really a feature request based on what I'm hoping is what @Esmool 's asking for.

Steps:

  1. Recorded a section of screen with no changes
  2. Used the editor to add "free text" to different places on the 1st, 10th, and 61st (and last) frames
  3. Click some kind of de-duplication button in the "Edit" tab
  4. Save the animation

Expected results: The only frames that should remain are the remaining 5 unique frames:

-1-               -2-                     -3-                  -4-                    -5-
[1] - [all the frames between 2 and 9] - [10] - [all the frames between 11 and 60] - [61]

Defect: many more than just 5 frames in the recording (watch for the little blips of black text):

7777aa

[Note that the image above is in APNG format and can't be viewed by Internet Explorer or older browser versions.]

<!-- gh-comment-id:353830604 --> @vatterspun commented on GitHub (Dec 25, 2017): I'm going to write this out as a bug report just because it makes the most sense. Keep in mind it's really a feature request based on what I'm *hoping* is what @Esmool 's asking for. **Steps**: 1. Recorded a section of screen with no changes 2. Used the editor to add "free text" to different places on the 1st, 10th, and 61st (and last) frames 3. Click some kind of de-duplication button in the "Edit" tab 4. Save the animation **Expected results**: The only frames that should remain are the remaining 5 unique frames: ``` -1- -2- -3- -4- -5- [1] - [all the frames between 2 and 9] - [10] - [all the frames between 11 and 60] - [61] ``` **Defect**: many more than just 5 frames in the recording (watch for the little blips of black text): ![7777aa](https://user-images.githubusercontent.com/1289134/34333125-e033823e-e8fe-11e7-8a48-57357e7cffcd.png) [Note that the image above is in APNG format and can't be viewed by Internet Explorer or older browser versions.]
Author
Owner

@Esmool commented on GitHub (Dec 25, 2017):

@NickeManarin The feature you said is to reduce the final file size while saving the animation, and what I suggested is to enhance the watching experiences. The difference is right located at the point of the time delay.

I mean just delete the duplicate frame, not extend the delay time of its previous. And if the succeeding next frame (originally the 3rd frame) is still duplicate to the original previous one, delete it too.

@vatterspun suggestion seems to have common with mine.

Usually, while recording the typing process, what I want to provide the watcher is NOT the REAL TIME feeling of that process, but the result of its result. Illustrating the typing process is just to help watcher keep track with what I typed, but doesn't need them suffer the bothering real time typing process.

Additionally, I'm thinking about the duplicate condition could generalize to some kind of similarity check, Those two neighbor frames with similarity less then a specified threshold may be considered as duplicate. This is for the situation like unconscious mouse shake.

<!-- gh-comment-id:353842844 --> @Esmool commented on GitHub (Dec 25, 2017): @NickeManarin The feature you said is to reduce the final file size while saving the animation, and what I suggested is to enhance the watching experiences. The difference is right located at the point of the time delay. I mean just delete the duplicate frame, not extend the delay time of its previous. And if the succeeding next frame (originally the 3rd frame) is still duplicate to the original previous one, delete it too. @vatterspun suggestion seems to have common with mine. Usually, while recording the typing process, what I want to provide the watcher is NOT the REAL TIME feeling of that process, but the result of its result. Illustrating the typing process is just to help watcher keep track with what I typed, but doesn't need them suffer the bothering real time typing process. Additionally, I'm thinking about the duplicate condition could generalize to some kind of similarity check, Those two neighbor frames with similarity less then a specified threshold may be considered as duplicate. This is for the situation like unconscious mouse shake.
Author
Owner

@vatterspun commented on GitHub (Dec 25, 2017):

unique frames

I gave this some additional thought and actually have a possible trick you might run to enable what you're describing without a new feature from @NickeManarin ...

HOWTO - autocapture - only-whats-changed.docx

Those two neighbor frames with similarity less then a specified threshold may be considered as duplicate. This is for the situation like unconscious mouse shake.

So if the previous frame and the current one are 98% similar, it should delete one of them?

<!-- gh-comment-id:353884845 --> @vatterspun commented on GitHub (Dec 25, 2017): > unique frames I gave this some additional thought and actually have a possible trick you might run to enable what you're describing without a new feature from @NickeManarin ... [HOWTO - autocapture - only-whats-changed.docx](https://github.com/NickeManarin/ScreenToGif/files/1586083/HOWTO.-.autocapture.-.only-whats-changed.docx) > Those two neighbor frames with similarity less then a specified threshold may be considered as duplicate. This is for the situation like unconscious mouse shake. So if the previous frame and the current one are 98% similar, it should delete one of them?
Author
Owner

@Esmool commented on GitHub (Dec 26, 2017):

sorry, typo, 'with similarity LARGER then a specified threshold ...'

<!-- gh-comment-id:353955463 --> @Esmool commented on GitHub (Dec 26, 2017): sorry, typo, 'with similarity LARGER then a specified threshold ...'
Author
Owner

@NickeManarin commented on GitHub (Dec 27, 2017):

@Esmool Ok, I got it. A "Remove duplicate frames" with a configurable threshold.

<!-- gh-comment-id:354032761 --> @NickeManarin commented on GitHub (Dec 27, 2017): @Esmool Ok, I got it. A "Remove duplicate frames" with a configurable threshold.
Author
Owner

@NickeManarin commented on GitHub (Jan 28, 2018):

Done! It will be available with v2.12.

dup

<!-- gh-comment-id:361092817 --> @NickeManarin commented on GitHub (Jan 28, 2018): Done! It will be available with v2.12. ![dup](https://user-images.githubusercontent.com/14798947/35486609-9ec59ffc-0457-11e8-94bd-ad07701f7f91.png)
Author
Owner

@Esmool commented on GitHub (Feb 5, 2018):

Thank you so much~~~~~

<!-- gh-comment-id:363043179 --> @Esmool commented on GitHub (Feb 5, 2018): Thank you so much~~~~~
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ScreenToGif#1552
No description provided.