GithubHelp home page GithubHelp logo

scottpetrovic / animator-video-reference Goto Github PK

View Code? Open in Web Editor NEW
43.0 43.0 7.0 756 KB

A Python plugin for Krita 4.2 that allows you to load a video for reference and import frames to your document

License: GNU General Public License v3.0

HTML 3.31% Python 96.69%

animator-video-reference's Introduction

Hi. Thanks for stopping by.

Web Developer and Designer

  • I'm based in the USA

My GitHub Stats

scottpetrovic's GitHub stats

Top Languages


animator-video-reference's People

Contributors

scottpetrovic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

animator-video-reference's Issues

Animation Locked Duration

This is the Trouble that have with the plug-in:

When I select a file the animation locks to 1 second, doesn't matter if the file is larger or shorter than that.
image

The weird thing is I used the tool before and let me import animations correctly, this issue happened just now and I don't know why. I didn't make changes to Krita or ffmpeg.

I have installed version 4.2.8 of Krita. And my OS is Windows 10.

FFmpeg not found

I have FFmpeg installed (includes FFprobe), and the path is set in "Render Animation" with C:\Program Files (x86)\ffmpeg\bin\ffmpeg.exe in the FFmpeg field. However, the plugin can't find FFmpeg or FFprobe. Is there somewhere else I'm supposed to be setting the path?

-Krita version 4.2.2 on a Windows 10

Ffmpeg not found on Mac OS

Looks promising but can't use it on Mac OS. Although ffmpeg is installed, the plugin does not find it. What do I need to change to make sure the plugin finds the correct path?

Adding ffmpeg to PATH

Hello,

I added ffmpeg to PATH and when I use command prompt to check, it still isn't found
And of course, your plugin cannot find it either

Is there a specific name to give to the path? Do I need to restart the computer?
Is there paths that I should avoid because they won't be found? Is there a specific version of ffmpeg to use?

Your instructions on this specific requirement for your plugin are a bit unclear

ffprobe not found

Hey, this looks like a very cool and useful plugin. However it won' t launch.
I have ffmpeg installed, and ffprobe and ffmpeg are both in my global path. Rendering animations works just fine.
Do you require a specific version of ffprobe by any chance ?
Here is the result of ffprobe -version

ffprobe version 4.1.4-1~mx17+1 Copyright (c) 2007-2019 the FFmpeg developers

ffmpeg folder not my computer

Hi, I downloaded the plugin and installed it. FFmpeg is missing like most of the people but I don't know where to get that

ffmpeg is not found by no means

Hi! I found your plugin and thought it was great, just the tool I felt a lack of for animating on krita. But sadly, it doesn't want to work for me. I saw what you answered to the previous issue but nothing works for me. I have my ffmpeg folder on C:\ffmpeg\bin, I have it linked with the "render animation" option, I added it to my paths on windows 10 and restarted the pc twice... But the same "ffmepg not found" window pops up every time I try to use the plugin. It could be because of my krita version not being compatible with the plugin?? I work on krita 4.2.0
Sorry because I feel like you explained everything so easy and clearly, but I can't get it to work

Key Error: height

I encountered this problem when opening a mp4 file. It doesn't seem to be able to open it correctly. Ffmpeg is apparently working correctly.

image

This is the output I got, can't really work out what's the problem...

TypeError: setValue(self ,int): arguement 1 has unexpected type 'float'

I know very little about coding, so I do not know what this means but it is the error message I am presented with since updating to the 'krita-nightly-x64-5.2.0' build. The script used to work fine for me in the past. ┐(‘~`;)┌

TypeError
Python 3.10.7: C:\Program Files\Krita (x64)\bin\krita.exe
Wed Feb 15 23:46:07 2023

A problem occurred in a Python script.  Here is the sequence of
function calls leading up to the error, in the order they occurred.

 C:\Users\user\AppData\Roaming\krita\pykrita\animationimporter\animationimporter.py in action_triggered(self=<animationimporter.animationimporter.Animationimporter object>)
  346 
  347 
  348 		self.dialog.fpsSpinbox.setValue(24.0)
  349 		self.dialog.fpsSpinbox.setSuffix(" FPS")
  350 
self = <animationimporter.animationimporter.Animationimporter object>
self.dialog = <PyQt5.QtWidgets.QDialog object>
self.dialog.fpsSpinbox = <PyQt5.QtWidgets.QSpinBox object>
self.dialog.fpsSpinbox.setValue = <built-in method setValue of QSpinBox object>
TypeError: setValue(self, int): argument 1 has unexpected type 'float'
    __cause__ = None
    __class__ = <class 'TypeError'>
    __context__ = None
    __delattr__ = <method-wrapper '__delattr__' of TypeError object>
    __dict__ = {}
    __dir__ = <built-in method __dir__ of TypeError object>
    __doc__ = 'Inappropriate argument type.'
    __eq__ = <method-wrapper '__eq__' of TypeError object>
    __format__ = <built-in method __format__ of TypeError object>
    __ge__ = <method-wrapper '__ge__' of TypeError object>
    __getattribute__ = <method-wrapper '__getattribute__' of TypeError object>
    __gt__ = <method-wrapper '__gt__' of TypeError object>
    __hash__ = <method-wrapper '__hash__' of TypeError object>
    __init__ = <method-wrapper '__init__' of TypeError object>
    __init_subclass__ = <built-in method __init_subclass__ of type object>
    __le__ = <method-wrapper '__le__' of TypeError object>
    __lt__ = <method-wrapper '__lt__' of TypeError object>
    __ne__ = <method-wrapper '__ne__' of TypeError object>
    __new__ = <built-in method __new__ of type object>
    __reduce__ = <built-in method __reduce__ of TypeError object>
    __reduce_ex__ = <built-in method __reduce_ex__ of TypeError object>
    __repr__ = <method-wrapper '__repr__' of TypeError object>
    __setattr__ = <method-wrapper '__setattr__' of TypeError object>
    __setstate__ = <built-in method __setstate__ of TypeError object>
    __sizeof__ = <built-in method __sizeof__ of TypeError object>
    __str__ = <method-wrapper '__str__' of TypeError object>
    __subclasshook__ = <built-in method __subclasshook__ of type object>
    __suppress_context__ = False
    __traceback__ = <traceback object>
    args = ("setValue(self, int): argument 1 has unexpected type 'float'",)
    with_traceback = <built-in method with_traceback of TypeError object>

Krita not new enough

"Krita not new enough.
Your version of Krita doesn't include the animation API for this to work. You need Krita 4.2 or newer"

I have Krita 5.1.5, just downloaded it today to replace my previous version. However this message still comes up. Is this an error or is this 'animator-video-reference' program not compatible with the new Krita updates anymore?

Video Never Processes

When I start processing a video, it creates a new image then a new layer then completely freezes.
I don't know if it's just taking very long, but I don't have the patience to wait and see.
The videos I've tried aren't even 1MB and have 88 frames, but the same problem happened on both.
krita_Gqn6S1UqQL

It detects ffmpeg, I had it directly located in the Krita bin folder, but I added it to my environmental variables when I noticed this happening.

FFmpeg not found.

Hi, I'm very new to this and have found the other issues hard to understand, and how to resolve the issue. I think I've downloaded FFmpeg, I can't find a .exe so I'm just confused. If you were to help, please put it in the simplest of explanations. 😆

Method of temp folder usage is potentially unsafe

There are 2 problems with the temporary images folder based on current implementation.

  1. If an images folder already exists in the current directory, that images folder will be deleted and you will lose all your images

Suggestion is to use a more custom naming scheme such as: ".animator-video-reference-temp"

  1. In the event of a crash, the old images are left in the undeleted folder, and running a different video can lead to more crashes (probably due to difference in image size)

Suggestion is to check for the temp image folder on run and removing it.

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

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'])

Works for version 5.0

As far as I can tell, this script works for any Krita version above 4.2, and testing it out in Krita 5 seems to work just fine. However, in order to get it to work in Krita 5 I had to change the code in the checkKritaVersion() function to the following:

def checkKritaVersion(self):		
	# major version should be 4 or above	
	majorVersion = app.version().split(".")[0]
	# minor version should be 2 or above
	minorVersion = app.version().split(".")[1] 	

	if (int(majorVersion) < 4 ) & (int(minorVersion) < 2 ):
		self.kritaVersionOk = 0
		return

	self.kritaVersionOk = 1

Basically changing an OR to an AND for the minor version number.

Might I suggest this fix is included in future releases, unless someone finds some breaking issue in Krita 5 and above?

Can't load videos

Hi,
first of all thanks for your contribution. This is something I really need in Krita to do animation.

So, when I select a video (.mp4), the export-button stays gray and there is also no thumbnail.
Furthermore, I get this error window if I change something:
Screenshot (477)

I have also FFMPEG installed. (I'm able to render my animation.)

Yours sincerely,
Maio

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.