SUMMARY When attempting to render an image sequence with File > Render Animation..., if the video format is set to MPEG-4 (but you are still in the Image Sequence mode), the image size restrictions of MPEG-4 apply to the export, causing a failure if your image is larger than what MPEG-4 allows (10 000px either in width or height). Switching the Video format to GIF and going back to image sequence (e.g. jpg) solves the issue. STEPS TO REPRODUCE 1. Create or open an animation and set the canvas size to be superior to 10 000 either in width or height 2. Go to File > Render Animation... 3. Select Video and make sure the export format is MPEG-4 4. Select Image Sequence and pick any format (e.g. jpg) 5. Click OK 6. You should see an error message saying : Could not render animation: Mpeg4 (.mp4) requires width and height to be even numbers. Please resize or crop the image before exporting. which by the way is the wrong error message, since it doesn't have anything to do with odd numbers but rather the size limit. 7. Go once again to File > Render Animation... 8. This time in Video, select GIF as the export format 9. Select Image Sequence back and keep the same image format as before 10. Click OK : this time the export should work SOFTWARE/OS VERSIONS Krita appimage 4.2.7.1 Linux: Debian 9 (XFCE) Qt Version: 5.7.1
Using the 4.2.7.1 appimage on Debian 10, I don't get this error under those conditions for a 12,000 x 11,000 px 3-frame animation. It gives three .png or .jpg frame images as output When I select Image Sequence. If I try to render it as a .mp4 video, I get the following error in the log file: [libx264 @ 0x6d521c0] height not divisible by 2 (10000x9167) That seems like a problem with the internal scaling arithmetic. I got my FFmpeg 64-bit static build from https://johnvansickle.com/ffmpeg/ which is linked to from ffmpeg.org. Where did you get your FFmpeg from?
I'll have to contradict that. I just tested it on a fresh Debian 10 install and the error is still there. I have the ffmpeg that comes pre-installed in Debian (stable 7:4.1.4-1~deb10u1 amd64), however I assume the appimage contains its own dependencies, as that's what they're all about. Furthermore there's no indication on the Krita download page that we should download ffmpeg, whereas there is such an indication for G'MIC (https://krita.org/en/download/krita-desktop/), nor do I see any mention of ffmpeg in the installation documentation: https://docs.krita.org/en/user_manual/getting_started/installation.html?highlight=installation so it seems very unlikely to me that we're supposed to do this additional step. I could be wrong but I'll need some evidence. Did you make sure to select MPEG-4 prior to selecting Image Sequence? Maybe your specific image dimensions somehow bypassed this bug. I got the error on a 21960x3720 as well as on a 11000x200 image.
Evidence: https://docs.krita.org/en/reference_manual/render_animation.html?highlight=ffmpeg#setting-up-krita-for-exporting-animations zerano.com (linked to in the manual) is the Windows and macOS builds. You'll need the link I gave you. I suggest you try this to see if it solves the problem.
tbh I don't see the point. The gif workaround solves the issue and it's not my decision to consider that ffmpeg is too heavy to be bundled and that the download page doesn't need information about it like G'MIC does.
One probably needs to install ffmpeg even if you're using appimages. But you already do it. Nevertheless, can you please tell us what is the version of ffmpeg you're using? When you open the Render Animation dialog, there is a text box for a path to ffmpeg, can you please copy it and paste into a console and add --version and click enter and copy here what you've got? Can you please show a screenshot of your Render Animation dialog just before clicking ok? And a screenshot of "Both" tab just to see what the Video options are. It might be the scaled size that makes the difference... @Ahab - I'm not sure if it's really not a bug because the dialog depends on Krita's internal checks before using ffmpeg... so something must be triggering it...
Yes, this is a krita internal error message and not an FFmpeg internal error. I can confirm this happens for an image size of 11,000 x 200 px under the conditions stated. This may not be purely an image size problem but an image size ratio/relationship problem. Setting to Confirmed
I think confirm that i fixed the issue, can someone please add me this bug? Also i need to add someone as a reviewer here so can anyone take initiative.
@Shivam - Now that you've made a comment, you're added to the CC list. When did you fix this behaviour? I'd be happy to test it with 4.3.0 preapha builds (soon) but I can't review code.
@Ahab here is the code along with the MR for it. https://invent.kde.org/kde/krita/merge_requests/201 Hope to recieve a quick response :). Good day.
@Shivam - I'm sorry but I can't review code. I don't have that skill or knowledge. I can only do some confirmation testing when it's been incorporated into a 4.3.0 prealpha build. I'd be happy to do that when it's been merged and built.
ah ok do you know anyone who can review?
@Shivam Balikondwar when you put your code on invent in a merge request to the official repository, developers know about it and you don't need to ask for the review in any other place :)
Git commit 168d3a141ee110eb6e6ef3a1a0301e1a54b36984 by Boudewijn Rempt, on behalf of Shivam Balikondwar. Committed on 16/01/2020 at 14:56. Pushed by rempt into branch 'master'. Fixed unneeded error message in Render Animation. This patch fixes the error that the user gets when he tries to render the anim in Image Sequence mode by setting the video encoding option as Mp4. M +4 -2 plugins/extensions/animationrenderer/AnimationRenderer.cpp M +2 -2 plugins/extensions/animationrenderer/DlgAnimationRenderer.cpp https://invent.kde.org/kde/krita/commit/168d3a141ee110eb6e6ef3a1a0301e1a54b36984
Git commit 4673d11c1207906fab09e1a7bf6089fbf0fc3f6c by Boudewijn Rempt, on behalf of Shivam Balikondwar. Committed on 28/01/2020 at 09:10. Pushed by rempt into branch 'krita/4.2'. Fixed unneeded error message in Render Animation. This patch fixes the error that the user gets when he tries to render the anim in Image Sequence mode by setting the video encoding option as Mp4. (cherry picked from commit 168d3a141ee110eb6e6ef3a1a0301e1a54b36984) M +4 -2 plugins/extensions/animationrenderer/AnimationRenderer.cpp M +2 -2 plugins/extensions/animationrenderer/DlgAnimationRenderer.cpp https://invent.kde.org/kde/krita/commit/4673d11c1207906fab09e1a7bf6089fbf0fc3f6c