Bug 478537 - Animation exporting in a higher FPS when using audio
Summary: Animation exporting in a higher FPS when using audio
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Animation (show other bugs)
Version: 5.2.2
Platform: Microsoft Windows Microsoft Windows
: NOR major
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-15 09:01 UTC by konstrukto
Modified: 2024-07-25 09:07 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description konstrukto 2023-12-15 09:01:15 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
When exporting a 12 FPS animation with audio, the resulting video file will have the animation slowed to half speed, with the audio playing at normal speed.
The animation is set to 12 fps in krita as well as in the export menu, the audio file used is a .wav file.
A fellow member of the krita artists community has found out that adding audio during the process of animating will set the animation speed to 24 FPS.

STEPS TO REPRODUCE
1. Export a 12 fps animation with audio, using FFmpeg
2. Play the video file
3. 

OBSERVED RESULT

- video plays at half speed, while the audio remains at normal speed.

EXPECTED RESULT

- the baked result compares in speed to the animation in krita.

SOFTWARE/OS VERSIONS
Windows: 10
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION

Discussion on the krita artists forum: https://krita-artists.org/t/possible-bug-related-to-audio-in-animation/80047
Comment 1 Ahab Greybeard 2023-12-15 16:18:22 UTC
From the OP: "...the resulting video file will have the animation slowed to half speed, ..."
The speed is actually increased to twice speed, as noted by the reported fps increase from 12fps to 24fps
(A similar correction applied to the Observed result.)

It only happens after an audio file is added and still plays/renders at twice speed if the audio file is then removed.

This also happens with the 5.2.2 appimage using Linux Mint.
Comment 2 konstrukto 2023-12-15 19:44:15 UTC
Actually, I see a different behaviour than Ahab does

This is what happens, and what prompted me to report it:
I export a scene and then find out that it shows half the animation during the audio duration.
Which results in me having to split out the audio externally, double the speed of the animation and then put the audio in again.
Comment 3 konstrukto 2024-01-25 11:38:40 UTC
I have noticed that when disabling audio on rendering the animation, the result will be on its normal speed
Comment 4 Dmitry Kazakov 2024-02-26 17:41:00 UTC
Hi, konstrukto!

Could you please check the latest nightly build if the problem is still there?

https://invent.kde.org/graphics/krita/-/jobs/1608468/artifacts/browse

I think I have fixed the bug as a part of bug 481388. Though I'm not very sure. The bug I fixed made loading audio to stop taking the framerate into account while **playback**. It shouldn't affect exporting though. Bug from the bugreport and KA thread it is not very clear if the problem is in actual export operation or in playback only.
Comment 5 konstrukto 2024-02-26 20:00:03 UTC
(In reply to Dmitry Kazakov from comment #4)
> Hi, konstrukto!
> 
> Could you please check the latest nightly build if the problem is still
> there?
> 
> https://invent.kde.org/graphics/krita/-/jobs/1608468/artifacts/browse
> 
> I think I have fixed the bug as a part of bug 481388. Though I'm not very
> sure. The bug I fixed made loading audio to stop taking the framerate into
> account while **playback**. It shouldn't affect exporting though. Bug from
> the bugreport and KA thread it is not very clear if the problem is in actual
> export operation or in playback only.

Hi Dmitry,

Unfortunately this didn't fix it...
See the attachment for the result.
Thanks for your efforts so far though!

Attachment: https://drive.google.com/file/d/1kqg2XLkndOHjL2Xs-bnUCCFLZROGimZ8/view?usp=sharing

Regards,

Konstrukto
Comment 6 Bug Janitor Service 2024-02-27 03:46:32 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 7 Dmitry Kazakov 2024-07-23 08:44:05 UTC
Hi, konstrukto!

Could you please recheck this bug in Krita Plus (or Krita 5.2.3)?

https://cdn.kde.org/ci-builds/graphics/krita/krita-5.2/windows/

I think we have fixed this very bug in the following commit right before the release:
https://invent.kde.org/graphics/krita/-/commit/0eef78cb50749d4494e70bae8ecb10d805e5139e
Comment 8 konstrukto 2024-07-24 05:28:04 UTC
(In reply to Dmitry Kazakov from comment #7)
> Hi, konstrukto!
> 
> Could you please recheck this bug in Krita Plus (or Krita 5.2.3)?
> 
> https://cdn.kde.org/ci-builds/graphics/krita/krita-5.2/windows/
> 
> I think we have fixed this very bug in the following commit right before the
> release:
> https://invent.kde.org/graphics/krita/-/commit/
> 0eef78cb50749d4494e70bae8ecb10d805e5139e

Hi Dmitry,

I had read in the patch notes that this was addressed, and I'm happy to say that it indeed is fixed!
Thanks for giving this the attention it needed!

Regards, 

Arjen Konstrukto
Comment 9 Bug Janitor Service 2024-07-25 03:46:23 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 10 Dmitry Kazakov 2024-07-25 09:07:46 UTC
You are welcome! :)