SUMMARY Right now it's far too easy for users to try and import a whole anime episode. This is far too much for most computers ram, and thus Krita will crash. As the given users will often be rather new to computers, this is downright cruel. STEPS TO REPRODUCE 1. Try to import a video file. 2. Determine, through the current UI, what the maximum amount of frames is that your computer can handle. 3. Try to figure out how to import exactly 24 frames from a video file. POSSIBLE SOLUTIONS: Naive users not understanding RAM is a continuing problem with the animation parts of Krita. This situation is slightly different from all the others, because while we usually can't say much about the memory consumption of a file due to how Krita optimizes layer storage, the imported frames are very likely all the same size. So, for example, if someone aims to import 24 frames of a 1080x1440 video that is RGBA 8bit, then that's 24*1080*1440*8*4*2 = 2388787200 bits, 298,598,400 bytes, or 0.298 mb. If there's less than that amount of free memory, we should just forbid the user from completing import, and also suggest to them that they might be better off using a video editor instead of Krita's animation tools. I am rather inclined to say that we should disable video import till this is done. This might also be applicable to the frames import, though, there the actual size of a clip might be more obvious to naive users.
How hard can it be to just add a warning? I don't think we need to disable a feature just for that.
The only proper warning I can think of is to tell people to not use the feature at all unless they have several years of experience in animation industry.
I think I solved this with https://invent.kde.org/graphics/krita/commit/535ab8b8647f9fc1184f90abf83c56d84917ef85
Git commit 838c2cf9d510436461854970f60ea2dead126598 by Halla Rempt. Committed on 12/05/2021 at 13:29. Pushed by rempt into branch 'master'. Warn the user when trying to import more than 100 frames M +12 -0 libs/ui/animation/KisDlgImportVideoAnimation.cpp https://invent.kde.org/graphics/krita/commit/838c2cf9d510436461854970f60ea2dead126598
Git commit e945b4dd8c5ffad5d0f377c830675da126d9ae41 by Wolthera van Hövell tot Westerflier. Committed on 12/05/2021 at 17:51. Pushed by woltherav into branch 'master'. Make the video import warning a lot more accurate. Now, the widget will be able to tell you the maximum amount of frames you can import if the selection is too large. This still needs a lot of love, but at the least it's more useful? This also adds a license and does some code-style fixes. M +114 -56 libs/ui/animation/KisDlgImportVideoAnimation.cpp M +15 -7 libs/ui/animation/KisDlgImportVideoAnimation.h https://invent.kde.org/graphics/krita/commit/e945b4dd8c5ffad5d0f377c830675da126d9ae41