View Single Post
Old 10th February 2020, 06:48   #9  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
The timecodes from the 2 x encode indicate a constant frame rate of 47.952 was used. They're not relevant because you're going to replace them.

I'm not quite sure what to make of the frames with negative frame rates in the v1 timecodes from the source. You might need to check the v2 timecodes to see if you can work out what they mean, so I'll ignore them for the moment. Are there a lot of frames with negative frame rates and do you get the same v1 timecodes using both the converters I linked to? I'd possibly start by removing any frames with negative frame rates completely, and after converting the rest, test the new timecodes to see if you're at least in the A/V sync ballpark.

Assume 29.970
56,572,23.976
609,701,23.976
707,1090,23.976

If the video is exactly as you described, I think all you should need to do is multiply every number you see by 2 for the new timecodes. The frames that aren't grouped will display at 59.940 instead of 29.970, and each group of frames will contain twice as many, displaying at 47.952 instead of 23.976. Without the frames with a negative frame rate, the first four lines above would become:

Assume 59.940
112,1144,47.952
1218,1402,47.952
1414,2180,47.952

The negative frame rates might be due to "jitter" in the original timecodes. At 23.976fps the frame duration is 41.70833ms, but the MKV timecodes are usually rounded to the nearest ms, so what you end up with for a 23.976 section is timecodes alternating between 41ms and 42ms in some sort of pattern. Something similar would apply to the 29.97fps sections. At the end of each 23.976 section there might be a few ms the converter can't compensate for, or I simply don't know what it's trying to say, but given those negative frame rates appear to occur in a regular pattern, I think it's likely that's the cause. If they only represent a few ms each time, or a fraction of a ms, then you should be able to simply delete them.

Could you do me a favour and let me know how that works out? I'm curious.

Edit. If the negative frame rates do represent a frame rate, then logically those frames would display for -0.0467ms (1000 / -21453), so if they're the way the converter is handling jitter, I think it'd mean when you delete one, you're making that frame display for 16.684ms instead (59.94fps), which means the A/V sync would change by 16.7307ms.
The frames at 47.952fps display for 20.854ms, so in my head it works out every time you delete a frame with a negative frame rate, you'd have to remove four frames from a group displaying at 47.952fps to make them display at 59.94fps instead (or two frames when they're 23.976fps), correcting the audio sync by 4.17ms for each frame, and by 16.68ms in total, making up for deleting a frame with a negative frame rate.

That seems to be logical, or it could be a load of crap, but it's the sort of thing to keep in mind if the audio sync is wrong when you simply delete those frames. Nothing's ever easy.....

Last edited by hello_hello; 10th February 2020 at 08:20.
hello_hello is offline   Reply With Quote