Topic: Losing frames when transcoding

So I'm trying to transcode some vids, upping the framerate from 30 to 60. And it does it fine, but there is a problem where it loses the last frame in the video.
Like one vid is 550 frames long. And after transcoding it comes out at 1097 frames. 3 frames short of the double frame rate.
And when I examine it more closely it did in fact lose a single last frame that it also didn't even interpolate.

Any idea what could be causing it and how to fix it? as it is making the total video time not match. If it was just a single vid i was converting then it would be a simple matter to just copy the missing frame into the transcoded vid and then doubling it.. but i got a batch of over 100 clips, and would be a pain to do that manually for all of them..

Re: Losing frames when transcoding

The thing is SVP doesn't even know the total number of frames when transcoding cause mpv doesn't provide this value to the Vapoursynth filter.
So even if mpv is actually losing the last frame - there's nothing we can do about it.

BUT there could be another reason - look through the transcoding log, do you see any warnings like "Invalid video timestamp" or "non-strictly-monotonic PTS" ?
If the source reports zero frame duration for some frame then the output frames durations will also be zero, leading to these warnings, and I'm not sure what will happen next with those frames in the encoder.

Re: Losing frames when transcoding

I did a little workaround that solved it for me. Using a avisynth script and a program that generated the scripts in batches. I had it duplicate the last frame of all the videos. And doing so made it process all the frames. Tho that did end up producing one frame too many. But that was easily solved by then running another batch script to trim away that extra frame. Bit tedious but I now ended up with the correct exact total time for the video.