Page 1 of 1

converting to video gets stuck at 99%

Posted: Thu Sep 19, 2019 6:26 am
by rdestorm

Image
How to deal with it?


Re: conver to video,stop at 99%

Posted: Thu Sep 19, 2019 8:25 am
by torzdf

The most likely reason for this is that ffmpeg has read the frame count incorrectly, so it is waiting for a frame that will never come.

Is "data_dst.mp4" a video you can share? If you can, then this is something I can look to try and fix in the source code.


Re: conver to video,stop at 99%

Posted: Tue Oct 29, 2019 1:55 pm
by Gongus

Same problem here, it stops at 99%.
I've partially resolved using the option [-fr 1-(length -1)], but the output are frames, not a video.

P.s.: I don't get the [-ref] option meaning. Can someone explain me?


Re: conver to video,stop at 99%

Posted: Tue Oct 29, 2019 10:48 pm
by torzdf

Ref is if your source is a series of frames and the output is a video. It needs the reference video to get the frame rate/audio etc.

When it hangs on the last step, it's usually because it has failed to read the frame count correctly. This can happen with variable frame rate videos. It's basically waiting for a frame that never comes.

Unfortunately I've never had this happen to me to be able to bugfix. If you can provide a video where this happens, than I can look to implement a fix.

The fact that the output is frames is probably because you are using the default writer. Use the ffmpeg writer if you want to write out to a video.


Re: converting to video gets stuck at 99%

Posted: Wed Oct 30, 2019 2:20 pm
by Gongus

Thanks for the reply, Torzdf.

Sure, this is the link to the video (4 sec.): https://drive.google.com/open?id=1NkwJl ... 7GyqihDfs4


Re: converting to video gets stuck at 99%

Posted: Wed Oct 30, 2019 4:53 pm
by torzdf

Thanks for this. I can confirm that there are 98 frames in this video, but the count is returned by ffmpeg as 99. I will see if I can implement some kind of capture for this kind of issue


Re: converting to video gets stuck at 99%

Posted: Thu Oct 31, 2019 1:46 am
by torzdf

I have pushed a bugfix which should fix this issue. Unfortunately it is a fair bit slower, as there is no way to get a guaranteed accurate frame count other than decoding the entire video frame by frame.

This should have solved the issue though.