NickeManarin / ScreenToGif

🎬 ScreenToGif allows you to record a selected area of your screen, edit and save it as a gif or video.
http://www.screentogif.com
Microsoft Public License
23.04k stars 2.15k forks source link

[Bug] The coding progress rate exceeds 100% #1279

Closed inoyakaigor closed 3 months ago

inoyakaigor commented 4 months ago

Describe the bug Often percenatge of encoding process exceed 100%

To Reproduce Steps to reproduce the behavior: Just tryed to save a video with these config screen to gif

Expected behavior Progress must not exceed 100%

Screenshots Link to video (Can't attach because it exceed GH file size limit) But there is most important frame: videoframe_70020

Desktop (please complete the following information):

Additional context The video was shot when I set the latest version of ffmpeg 6.1.1 but I've met this bug with in box ffmpeg 4

pawlos commented 3 months ago

Yeah, there's an issue when the ffmpeg encoder produces duplicated frames. The returned frame count number is such case can be greater then one that was passed. We should consider reducing the frame number by the duplicated ones. I'll create a PR to fix this.

pawlos commented 3 months ago

Ok, this is a bit more interesting that initially anticipated.

One of the output lines from ffmpeg:

frame= 1 fps=0.0 q=32.7 size= 0kB time=-00:00:00.04 bitrate=N/A dup=12 drop=0 speed=N/A

So it's not just a matter of removing the dup's as that would produce problems on the other end. Values below 0%. Investigating.