Bug 506976 - Rendering video to GIF doesn't work if filepath doesn't end in .gif extension (Unrecognized option 'palettegen'.)
Summary: Rendering video to GIF doesn't work if filepath doesn't end in .gif extension...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Animation (other bugs)
Version First Reported In: 5.2.9
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-13 02:14 UTC by Noel Santos
Modified: 2025-08-13 00:13 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Noel Santos 2025-07-13 02:14:49 UTC
SUMMARY

When rendering an animation as GIF, the filepath must end in .gif or FFMPEG won't work.

STEPS TO REPRODUCE
1. Create an animation of 2 frames.
2. File -> Render animation...
3. Check "As Video"
4. Choose Render as: GIF
5. Change the filepath to ./gif.foo
6. Click OK
7. Krita will render the frames successfully, but FFMPEG won't turn them into a GIF file.

OBSERVED RESULT

Krita displays a message about an "unknown error" while rendering the video.

EXPECTED RESULT

Choosing to render to a GIF in Krita should work regardless of extension.

SOFTWARE/OS VERSIONS
I'm on Linux Mint.
ffmpeg version 6.1.1-3ubuntu5

ADDITIONAL INFORMATION

gif.foo.log:

/usr/bin/ffmpeg -hide_banner -y -y -r 12 -start_number 0 -start_number_range 1 -i /my-folder/text%04d.png -lavfi [0:v][1:v]paletteuse=dither=sierra2_4a:diff_mode=none -f gif -loop 0 -gifflags +transdiff -palettegen palettegen=stats_mode=full:reserve_transparent=1 /my-folder/gif.foo
=====================================================
Unrecognized option 'palettegen'.
Error splitting the argument list: Option not found
Comment 1 Emmet O'Neill 2025-08-12 23:58:43 UTC
Thank you for the bug report Noel, I can confirm this is an issue and I'll see what I can do to fix it for the next release.
Comment 2 Emmet O'Neill 2025-08-13 00:13:04 UTC
Git commit 36d935645cf2416426dd05b6630e64e00b838c1d by Emmet O'Neill.
Committed on 13/08/2025 at 00:08.
Pushed by emmetoneill into branch 'master'.

Anim/FileIO: Fixed GIF export reliance on ".gif" file suffix.

GIF rendering previously errored when the desired output
file name ended in something other than ".gif".
KisVideoSaver now properly uses the "image/gif" mimeType
instead of the file suffix for finishing the GIF export process.

M  +1    -2    libs/ui/animation/KisVideoSaver.cpp

https://invent.kde.org/graphics/krita/-/commit/36d935645cf2416426dd05b6630e64e00b838c1d