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.
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.
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.
Note:t his bug has been fixed in master in 42a4ce4c56ff3e5daf0f01080ec39c1bacc4c7bf