I know that MkvMerge stores the timecodes. It's the problem. Storing the frame numbers is much more precise, and there is no rounding problems.
If I understand correctly your method, it is equivalent to using ceil() instead of round(), since you add 1 ms. But there is an exception: when the time code falls perfectly on a precise frame. Using ceil() or round() or floor() in that case doesn't change the decimals. But you add 1 ms anyway, and the timecode is therefore 1 ms after the frame. Hence my question: why do you use round() + 1ms? IMO, it is preferable to use ceil().
|