Bug 478185 - [Animation/Audio] Playback doesn't work after scrubbing.
Summary: [Animation/Audio] Playback doesn't work after scrubbing.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Animation (show other bugs)
Version: 5.2.0
Platform: Compiled Sources Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Emmet O'Neill
URL:
Keywords:
: 485582 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-12-06 23:12 UTC by nestor74
Modified: 2024-07-23 08:35 UTC (History)
3 users (show)

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


Attachments
Recording of the issue (3.85 MB, video/mp4)
2023-12-06 23:12 UTC, nestor74
Details
The sound file (1.00 MB, audio/wav)
2023-12-07 17:19 UTC, nestor74
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nestor74 2023-12-06 23:12:26 UTC
Created attachment 163960 [details]
Recording of the issue

SUMMARY

Hello, I started working on an animated scene with audio. I imported the audio, and if I play the animation everything works normally. However, if I scrub through the timeline a few times and then try to play the animation again, the playback doesn't work anymore. It goes back to normal once I remove the audio.  

A Video is attached. 

Thanks in advance for all your hard work, this is an amazing software. 

***
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
***


STEPS TO REPRODUCE
1. Import audio file, either .mp3 or .wav 
2. Scrub through the timeline a few times 
3. Play the animation 

OBSERVED RESULT

Playback doesn't work, unless I remove the audio file. 

EXPECTED RESULT

Playback working normally after scrubbing on the timeline. 


  Build ABI: x86_64-little_endian-llp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: winnt
  Kernel Version: 10.0.19045
  Pretty Productname: Windows 10 Version 2009
  Product Type: windows
  Product Version: 10

Locale

  Languages: en_US, en, en_Latn_US
  C locale: C
  QLocale current: en
  QLocale system: en
  QTextCodec for locale: UTF-8
  Process ACP: 65001 (UTF-8)
  System locale default ACP: 1252  (ANSI - Latin I)

OpenGL Info
 
  Vendor:  "NVIDIA Corporation" 
  Renderer:  "Quadro RTX 6000/PCIe/SSE2" 
  Driver version:  "4.6.0 NVIDIA 452.57" 
  Shading language:  "4.60 NVIDIA" 
  Requested format:  QSurfaceFormat(version 3.3, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
  Current format:  QSurfaceFormat(version 4.6, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 1, colorSpace QSurfaceFormat::sRGBColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
  GL version: 4.6 
  Supports deprecated functions true 
  Is OpenGL ES: false 
  supportsBufferMapping: true 
  supportsBufferInvalidation: true 
  forceDisableTextureBuffers: false 


ADDITIONAL INFORMATION
Comment 1 nestor74 2023-12-07 17:19:10 UTC
UPDATE (12/7/2023): 

I've been troubleshooting with krita-artists.org help, I answered a moderator's questions:

----------------------------

Hello @AhabGreybeard

-Which version number of krita are you using and where did you get it from?

It’s 5.2.0, I got the Windows Portable 64 bit version, from Krita.org

-Does playback still work if you then add the audio file?

Yes, the problem disappears until I start scrubbing on the timeline, then it repeats.
After it stops working, I found out that to get it back to normal, either adding the sound again, closing and opening the file, having another file opened at the same time, and changing back a forth with Ctrl-Tab works.

-Does using a different audio file show the same problem?

No, only with the .wav file I’m using. At this moment I discovered that if I take this sound file, and compress it with the following settings in Adobe Media Encoder:

Codec: GSM 6.10

Sample Rate: 11025 Hz

Channesl: Mono

And then add it to Krita the Issue disappears and the playback works normally.

-Does any different animation file have the problem?

Yes, I tried with another animation I created and the problem persist

-When playback is not working, can you render to .mp4 with no problems?

Yes, It does render well

-When playback is not working, can you paint and use other actions normally?

Yes, I tried other tools and functions and they work normally, even if playback’s not working.

-Please try the nightly Stable build to see if that has the problem:

I tried this Nightly build and the most recent 5.2.2 update that was published today and the problem persist.

------


Thank you so much for your help.
Comment 2 nestor74 2023-12-07 17:19:53 UTC
Created attachment 163984 [details]
The sound file
Comment 3 nestor74 2023-12-07 20:25:43 UTC
UPDATE #2 (12/7/2023)

I tested the audio file using Krita's 5.1.5 version https://download.kde.org/stable/krita/5.1.5/krita-x64-5.1.5.zip 

And everything's works well, it seems it happens with version 5.2.
Comment 4 Emmet O'Neill 2024-01-26 01:15:15 UTC
Thanks for the bug report, demo video and sound file. 

I'm confirming this based on your video. I'll try to sort it out. :)
Comment 5 Dmitry Kazakov 2024-06-20 13:46:02 UTC
Git commit ba9b00213e79c0eeabd3d48a310bd035a69ac078 by Dmitry Kazakov.
Committed on 20/06/2024 at 13:45.
Pushed by dkazakov into branch 'master'.

Fix animation playback freezes when pausing past the end of audio

We should never set "pause" EOF-mode for the internal producer, since
it has rather weird effects on the producer's behavior, e.g. it sets
speed to null and clips to the last frame position.

The patch sets the EOF-mode to be "continue" all the time
Related: bug 487371

M  +16   -26   libs/ui/KisMLTProducerKrita.cpp

https://invent.kde.org/graphics/krita/-/commit/ba9b00213e79c0eeabd3d48a310bd035a69ac078
Comment 6 Dmitry Kazakov 2024-06-21 11:17:50 UTC
Git commit 304f293b15863d90dda6296044be044d387dde79 by Dmitry Kazakov.
Committed on 21/06/2024 at 11:16.
Pushed by dkazakov into branch 'krita/5.2'.

Fix animation playback freezes when pausing past the end of audio

We should never set "pause" EOF-mode for the internal producer, since
it has rather weird effects on the producer's behavior, e.g. it sets
speed to null and clips to the last frame position.

The patch sets the EOF-mode to be "continue" all the time
Related: bug 487371

M  +16   -26   libs/ui/KisMLTProducerKrita.cpp

https://invent.kde.org/graphics/krita/-/commit/304f293b15863d90dda6296044be044d387dde79
Comment 7 Dmitry Kazakov 2024-07-23 08:35:32 UTC
*** Bug 485582 has been marked as a duplicate of this bug. ***