animator-video-reference icon indicating copy to clipboard operation
animator-video-reference copied to clipboard

GIF frame counts are inaccurate, why not use -count_frames option?

Open KnowZero opened this issue 4 years ago • 3 comments

The gif frame calculation if off.

I suggest changing:

self.cmd = "ffprobe -v quiet -print_format json -show_streams"

to

self.cmd = "ffprobe -v quiet -print_format json -count_frames -show_streams"

That will make nb_read_frames show up for gifs

and

self.ffprobeData_totalFrameCount = int(rawFrameRate.split("/")[0]) 

to

self.ffprobeData_totalFrameCount = int(self.ffprobeOutput['streams'][0]['nb_read_frames'])

KnowZero avatar Sep 15 '20 06:09 KnowZero

Wich file contains the code to make the changes,

Don't quite sure if this is a change I have to make in krita or ffmpeg, and if is a notepad file or console programming.

I don't know much of programming, sorry if I'm not clear

Rulonkobalski avatar Oct 12 '20 03:10 Rulonkobalski

extract the zip file and look for animationimporter.py

Then in notepad or any other text editing tool (not MS word) search for the lines and replace them with the changed lines.

Then save and zip it again. Then add the modified plugin to krita.

Pretty straight forward, but If you run into problems, i'll make a fork of this project with the changes so you can just download it.

KnowZero avatar Oct 12 '20 16:10 KnowZero

Man THANKS that actually solve my problem.

image

Rulonkobalski avatar Oct 13 '20 03:10 Rulonkobalski