Saving files w/out recoding - using "fast frame copy" = slightly different frame rate from original file

#1
Noticed after "converting" a number of MPG2 files to MPG2 MKV, w/out changing anything or recoding, using "fast frame copy", that my original frame rate of 29.970030 comes out in the MKV as 29.970628.

This isn't a big difference, but why is it different at all?

MakeMKV, for example, extracts MPEG2 video from my DVD burns with the same frame rate as the original (the correct, 29.970030 number).

I've noticed that some MPEG2 to MKV conversions from VideoRedo appear to come out with the correct frame rate, but anything that is edited in anyway (simple section(s) cut out, for example) will always have the incorrect frame rate.

Every HDV video MPEG2 file that I've tried to convert to an MKV container using VRD has the wrong framerate.

DVD MPEG2, as long as you don't make an edit, seems usually to be same as original file when making an MKV container version.

I have "same as original" checked for frame rate in the encode profile, and also tried "automatic" and also manually picking 29.97. Same file is output no matter what.

What gives?

Thanks
 

Dan203

Senior Developer
Staff member
#2
MKV uses millisecond timestamps so those are likely rounding errors. In broadcast they use 90kHz or even 27mHz timestamps. This allows a much higher resolution per frame and allows the frame rate to be 100% accurate. The MKV format actually supports up to 10gHz resolution, but somewhere early on the community decided on milliseconds for some reason and that became the de facto standard. It's actually a huge PITA for us as the low resolution messes with our syncing routines and we have to use some crazy workarounds to keep from dropping/adding frames when reading an MKV file.
 
#3
Thanks for the possible answer to this.

I notice the same thing when MKtoolNix appends 2 .MOV files - the resulting .MKV has the same exact frame rate error (different from the 2 original files - same numbers I mentioned above).

Same when just converting a single .MOV to .MKV using MKtoolNix or VRD.

Odd that MakeMKV produces .MKVs that don't have this error (same frame rate in .MKV as in original MPEG2).

I'm beginning to see why Adobe Premiere etc... won't accept or output .MKV.

Apparently the standardization is pretty loose, which makes me second guess using it for all my old videos.

I love that you can embed chapter stops and can maintain many original A/V streams (though if the timing is changed I'm concerned about what that will cause down the road when it's time to convert to something else etc...).
 

Dan203

Senior Developer
Staff member
#4
Where are you getting that frame rate number? Is it from MediaInfo? Because the way it calculates the frame rate is not 100% accurate so it could just be a rounding error there too.
 
#5
Where are you getting that frame rate number? Is it from MediaInfo? Because the way it calculates the frame rate is not 100% accurate so it could just be a rounding error there too.
From VLC - MediaInfo also shows different numbers from the original files.

ffMpeg also produces same frame rate changes.

I'm planning on processing / archiving a ton of videos - "pretty close" is not what I want, so I'd love to find some way around this (or why this is happening).

Thanks
 

Dan203

Senior Developer
Staff member
#6
From VLC - MediaInfo also shows different numbers from the original files.

ffMpeg also produces same frame rate changes.

I'm planning on processing / archiving a ton of videos - "pretty close" is not what I want, so I'd love to find some way around this (or why this is happening).

Thanks
It's likely just a rounding error in the calculation used to display the frame rate and it's not actually changing, to any perceivable degree, in the output files.
 
Top