Bug 402616 - Rendered Animation Out of Sync
Summary: Rendered Animation Out of Sync
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Animation (show other bugs)
Version: 4.1.7
Platform: Microsoft Windows Unspecified
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-27 21:03 UTC by Ethan
Modified: 2019-01-06 11:04 UTC (History)
2 users (show)

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


Attachments
this picture shows exported image before encoded into video format (4.96 KB, image/png)
2018-12-27 21:03 UTC, Ethan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ethan 2018-12-27 21:03:57 UTC
Created attachment 117135 [details]
this picture shows exported image before encoded into video format

SUMMARY
I have not only been having problems with the rendering system itself but I have also been having trouble with audio sync.  When rendering the animation the audio in the finished mp4 file is completely out of sync.  I have noticed when exporting that the frames are numbered starting with the number 30.  This could be something with FFmpeg not encoding frames correctly or it could be with Krita.  Whichever one I am not sure.  

STEPS TO REPRODUCE
1. Create custom doc 1280 x 853 px
2. Set animation frames to 0 to 500 before export
3. Go to Edit -> scale image to new size
4. resize to 1080 x 720 px
5. Go to File -> render animation
6. Make animation export as mp4
7. Make animation export start at 0 frames and end at 130 frames
8. Hit three dots by mpeg-4 video -> select baseline
9. Render animation

OBSERVED RESULT
Audio in export is out of sync with the animation.

EXPECTED RESULT
Exported animation audio is in sync.

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

ADDITIONAL INFORMATION

A suggesting to end all of the bugs with export is make your own export built into Krita instead of using an external export involving another program.
Comment 1 Ahab Greybeard 2018-12-28 18:06:40 UTC
I've just followed the exact (and very complicated) steps described in this report for krita 4.1.7 with the Windows installed version and the Linux AppImage version and had no problems with audio synchronisation. I also tried it with a variety of frame lengths from 130 to 500 (at 24fps with a 20 second .mp3 file as the audio source).

I use the latest stable (4.1) static ffmpeg build from ffmpeg.org and that may have some bearing on my sucessful result. I suggest a download from here: https://ffmpeg.zeranoe.com/builds/ for Windows.
Comment 2 Halla Rempt 2019-01-06 11:02:51 UTC
I'm sorry, but it's completely unrealistic to implement exporting to video formats by ourselves. We're always going to be dependent on external code for that.
Comment 3 Halla Rempt 2019-01-06 11:04:15 UTC
Note:t his bug has been fixed in master in 42a4ce4c56ff3e5daf0f01080ec39c1bacc4c7bf