Bug 403873 - When rendering gif in fps > 50, the export dialog should show a warning
Summary: When rendering gif in fps > 50, the export dialog should show a warning
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Animation (show other bugs)
Version: 4.1.7
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2019-02-02 20:31 UTC by Tiar
Modified: 2019-09-05 08:15 UTC (History)
1 user (show)

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


Attachments
Gimp's added descriptions of how big is the frame delay for every frame in a gif animation rendered in 60 fps. (18.21 KB, image/png)
2019-02-02 20:31 UTC, Tiar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tiar 2019-02-02 20:31:34 UTC
Created attachment 117792 [details]
Gimp's added descriptions of how big is the frame delay for every frame in a gif animation rendered in 60 fps.

SUMMARY
Gif file format can not specify fps, only frame durations; and specifies them in hundredths of seconds (x*10ms, where x is a natural number). 50 fps = 20 ms, but 60 fps is rendered as a combination of 10 and 20 ms (20, 10, 20, 20, 10, 20, 20, and so on, at least Gimp says so).

The problem is that not every file viewer can view gifs in 10ms, actually it's more common to set all 10 ms and 0 ms delays to something a much higher like 100ms (10fps). (Sometimes the minimal delay is even bigger, like 50ms for the older versions of Interner Explorer).

It would be useful if the export dialog showed the warning that the 60 fps gif animation can be not played correctly in older browsers or image viewers. (Also it's not a true 60 fps anyway). 50 fps is usually played correctly in newer browsers, so it could be a good alternative.


STEPS TO REPRODUCE
1. Create some frames.
2. Render animation as 60fps gif.

OBSERVED RESULT
No warnings.

EXPECTED RESULT
A bit of warning visible.

SOFTWARE/OS VERSIONS
Windows: 10

ADDITIONAL INFORMATION
References: 
bug report: https://bugs.kde.org/show_bug.cgi?id=395265
other person who had problems and fixed it by having lower fps: https://www.reddit.com/r/krita/comments/9l4c1y/kritas_animation_is_frustrating_and_i_need_help/
definition of gif: https://en.wikipedia.org/wiki/Graphics_Interchange_Format#Animated_GIF
https://blogs.msdn.microsoft.com/ieinternals/2010/06/07/trivia-animated-gif-timing/
Comment 1 wolthera 2019-04-08 15:17:46 UTC
Yeah, gif cannot support 60fps.
Comment 2 Halla Rempt 2019-04-30 11:30:01 UTC
Git commit 645953a1548b157f9de17d393ece67087432287f by Boudewijn Rempt.
Committed on 30/04/2019 at 11:29.
Pushed by rempt into branch 'master'.

Warn the user when rendering an animation to gif with framerate > 50

This also disables the video options button if the current format
is gif, since there are no extra options for rendering to gif, and
removes the extra options for gif in the videosaver, so we don't
get unusable arguments like baseline profile for gif.

M  +17   -2    plugins/extensions/animationrenderer/DlgAnimationRenderer.cpp
M  +2    -0    plugins/extensions/animationrenderer/DlgAnimationRenderer.h
M  +0    -1    plugins/extensions/animationrenderer/video_saver.cpp
M  +10   -0    plugins/extensions/animationrenderer/wdg_animationrenderer.ui

https://invent.kde.org/kde/krita/commit/645953a1548b157f9de17d393ece67087432287f