Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FFmpeg importer drops any frames with unchanged pixels into the editor #1068

Open
ParticleCore opened this issue Feb 3, 2022 · 7 comments
Open
Assignees
Labels
🔷 Bug 🐛 Type • An undesired situation happens. ⬜ Pending Status • This issue stills needs to be analyzed.

Comments

@ParticleCore
Copy link

ParticleCore commented Feb 3, 2022

Describe the bug
When importing an mp4 using the ffmpeg importer any unchanged frames are automatically dropped and there is no option to disable that behavior.
When importing the same video using the mediaplayer importer, all frames are imported correctly, but the frame rate becomes really choppy/not as smooth as when importing with ffmpeg.

Note: I am not referring to when we save the video as a gif, but when we import it into the editor. Right away I can tell there are missing frames when I hit play in the editor.

To Reproduce
Steps to reproduce the behavior:

A good video sample to test this with is a 30s recording of your desktop where nothing at all changes. When importing using the ffmpeg only 1 frame shows in the editor.

Open editor
With the ffmpeg import an mp4 that has at least one period where no pixels change at all
Press play in the editor
The period with no pixels changed is gone
Repeat the same process above but use the mediaplayer importer
The period with no pixels changed is present, but the framerate is really bad

Expected behavior
The importer should not be dropping frames arbitrarily

Desktop (please complete the following information):

  • OS: Windows 10
  • Version 10.0.19042 Build 19042
  • ScreenToGif 2.35.4

Comments
I don't know if the ffmpeg issue is normal and its the editor that is not adding the correct time to the frames that should represent the period where nothing changes in the video, and instead is putting the same short duration for all frames making it look like the unchanged pixels periods are missing. I mention this because that is what makes sense to me, the period with no pixels change at all should be represented by a single frame with a duration of that period.

@ParticleCore ParticleCore added ⬜ Pending Status • This issue stills needs to be analyzed. 🔷 Bug 🐛 Type • An undesired situation happens. labels Feb 3, 2022
@NickeManarin
Copy link
Owner

Hi, do you have a sample video so that I could test?

@ParticleCore
Copy link
Author

I am not sure what is going on now, but the issue I reported originally appears to have changed to a different issue where the gif produced using FFmpeg is being slowed down even though I did not configure it to be slowed down.

When I imported the video I used these settings:
image

And these are the settings I used for exporting the gif:
image

This is the resulting GIF, it's apparently playing at half the speed despite not having configured it to do such thing: https://file.io/n6HCwU12XfNQ

This is the original video I used for this example: https://file.io/cdstlV1ZSazc

I had to upload them off site because they were bigger than the GitHub 10MB limit.

@ParticleCore
Copy link
Author

By the way that was done using v2.37

@ParticleCore
Copy link
Author

Seems like this new version basically ignores the frame times when exporting. I've tried multiple recordings and even reduced the time for all frames to the min possible (10ms) and after saving the gif it plays very slow, like 30ms per frame or so. I don't understand what is going on right now, and I tried different decoders.

@ParticleCore
Copy link
Author

I was able to find the settings for the app and deleted them entirely after uninstalling the app and switched to the portable version, it is working correctly now. I do not understand what was happening in the settings before, but something was causing my problems there somehow.

@ParticleCore
Copy link
Author

I was able to recover the deleted settings in case it might be useful to find why this issue was happening to me
Settings - Copy.txt

@ParticleCore
Copy link
Author

ParticleCore commented May 24, 2022

I believe the issue is with frame rates higher than 30fps. If I record using screentogif with the frame rate set to 60 then the slowness output occurs. It feels like when it is saving the recording into gif it is doubling the times based on the 60fps, instead of adjusting for that in the frames themselves, their own individual timings.

As a temporary workaround for this problem I have enabled "Fixed frame rate" in the recording settings, and now I am able to record and export in 60fps without the slowness problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔷 Bug 🐛 Type • An undesired situation happens. ⬜ Pending Status • This issue stills needs to be analyzed.
Projects
None yet
Development

No branches or pull requests

2 participants