This forum has been archived. All content is frozen. Please use KDE Discuss instead.

render animation loses last frames in mp4

Tags: None
(comma "," separated)
Ailos81
Registered Member
Posts
5
Karma
0
Hello,

I am new at krita, i am just learning.
My problem is , when I export an animation throw ffmpeg, if it is a GIF, everything is fine. If it is an MP4, it loses the last 5 frames. I can't figure out why. Let's say I have 36 frames, i can only see until the 30th.

I can't figure out why.

thanks a lot.
ahabgreybeard
Registered Member
Posts
1269
Karma
11
OS
Does this happen every time for several different animation files of different frame lengths? Are you certain that the First frame and Last frame settings were correct in the Render Animation window? Does this happen when using more than one different .mp4 video player? Have you tried using the VLC player?
Which OS and what version of krita are you using?
Can you provide a download link to a .kra file that is showing this problem?

Are you using the latest stable static build of ffmpeg as recommended here?: https://docs.krita.org/en/reference_man ... ation.html
Ailos81
Registered Member
Posts
5
Karma
0
Hello, thanks a lot for your anwser

Yes, it happens always, in fact I created a new animation which only have several numbers, from 0 to 32. no matters how long it is, it always loses 5 last frames.
I am using this version of ffmpeg
Code: Select all
C:\Users\xxx\Downloads\SOFTWARE\ffmpeg\ffmpeg-20190330-5282cba-win64-static\bi
n>ffmpeg.exe -version
ffmpeg version N-93485-g5282cbae61 Copyright (c) 2000-2019 the FFmpeg developers

built with gcc 8.2.1 (GCC) 20190212


Trying another version of ffmpeg is the only thing I can do now (32 bits version).

I am using krita 4.1.7 and windows 8.1 and VLC 3.0.6, and that was the only player I've tried. Because windows Media breaks.
and this is the file https://we.tl/t-kT2xO9a2eI

Thanks a lot
ahabgreybeard
Registered Member
Posts
1269
Karma
11
OS
If I use Windows 10 and krita 4.1.7 with ffmpeg-4.1, your bouncing ball renders out to .mp4 with no problems for me as viewed with VLC player 2.2.2

Yes, it would be a good idea to try the ffmpeg version from here: https://ffmpeg.zeranoe.com/builds/ and select the 4.1.1 Windows Static build.

Good Luck :)
Ailos81
Registered Member
Posts
5
Karma
0
thanks a lot
I tried with ffmpeg 4.1.1 but does not solve it . In vlc I can't see the last drawing. I export from 0 to 45th frame (the last) 24fps , but the last drawing is missed in the video secuence
^-^ thanks anyway
ahabgreybeard
Registered Member
Posts
1269
Karma
11
OS
Ok, that is strange and it should not happen. As a 'dirty' workaround, can you extend your animation by a number of duplicate frames and then set the last rendered frame to be after frame 45 to compensate for the number of frames lost at the end?
Ailos81
Registered Member
Posts
5
Karma
0
Yes,

at the moment it is my only chance/option, but I was trying to avoid this.

I will try to install in another computer, because this is veery very weird.

thans a lot
ghevan
Registered Member
Posts
178
Karma
1
OS
I just tried it.

Made a new animation with 32 frames, in each frame I draw a number from 1 to 32. Project plaback is set to 24fps. I export as mp4 with 24fps. In playback I get all numbers up to 32 as expected.

Im not sure what is happening on your end, I just render this test animation just to try it. If VLC shows more frames than the other player then your other player is skipping the last part. And if you render 32 frames and start counting from 0, the las frame displayed is 31, which may seem one frame is missing, but its not.

Hope this helps you resolve the issue


Ailos81
Registered Member
Posts
5
Karma
0
thanks for your comment.

I only have tried VLC, and, yes, is VLC the player that does not play the last frame. I think you obtained the same result as I did. I was searching for an option to decompose an mp4 into images, but vlc cannot.

At least , i think to ampliate the exposure of the last frame is the best solution.
ghevan
Registered Member
Posts
178
Karma
1
OS
Ailos81 wrote:
...I think you obtained the same result as I did...


Not really, as I posted before, my "animation" contents are =. {1,2,3, …, 30,31,32} , I only render the first 32 frames (from 0 to 31), and on VLC I can see all frame contents, number 1 to number 32. There is no duplicated frame at the end to compensate nor skip frames in the middle.

You can decompose a video file into frames using ffmpeg like this:
ffmpeg -r 1 -i my_animation_video.mp4 frame%04d.jpg

I get exactly 32 images from it, each with a different number from 1 to 32.




Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], Yahoo [Bot]