View Full Version : Mediainfo Frame Rate vs Original Frame Rate?
jriker1
28th April 2015, 23:21
I have an MKV file that has the below stats:
Frame rate mode : CFR
Frame rate mode : Constant
Frame rate : 23.976
Frame rate : 23.976 fps
Original frame rate : 24.375
Original frame rate : 24.375 fps
Never saw this before. When I re-encode it as 23.976 audio is way off. Why are there two values and what am I supposed to re-encode with? 24.375fps is a bit odd.
Thanks.
JR
Groucho2004
28th April 2015, 23:31
10 seconds of googling brought me to this link (https://github.com/mbunkus/mkvtoolnix/wiki/Wrong-frame-rate-displayed).
jriker1
29th April 2015, 00:01
10 seconds of googling brought me to this link (https://github.com/mbunkus/mkvtoolnix/wiki/Wrong-frame-rate-displayed).
Thanks. So not sure this answers my question unless the answer is the frame rate is 23.976 and my audio is off for some other reason as the original frame rate isn't relevant because it's calculated?
Edit: For reference the audio seems the same as the original, but the video ends up going from a length of 01:33:07.087 to 01:34:40.091. So over a minute longer apparently. Basically this is just running the MKV thru VirtualDub using AVISynth using:
ffmpegsource2("Video.mkv", vtrack = -1).AssumeFPS(24000,1001)
Without the AssumeFPS frame rate shows in VDub 24.376.
JR
Groucho2004
29th April 2015, 00:19
It's certainly possible to encode at that frame rate. You'll have to ask the person who created the stream.
You can also de-multiplex the elementary stream and check it with a stream analyser.
Anyway, if the audio matches with 24.375 then it's most likely the correct rate.
Edit: Cut a few MB of that mkv and post it.
ndjamena
29th April 2015, 02:10
There's nothing in an MKV to indicate Frame Rate, so the frame rate MediaInfo presents for one is calculated by adding up the time codes of the first frames, dividing them by number of frames, then checking if it's within (3%?) of a standard frame rate, if it is then it uses the standard.
Original FPS is the frame rate written into the stream header... having a frame rate of 23.970 in a stream header is quite common, but it's generally muxed as 23.976 anyway and will go out if the 23.970 is taken literally... but 24.375 is waaayy off. MediaInfo shouldn't be miscalculating THAT badly.
Depending on where you got the MKV, it's entirely possible it has a frame rate of 24.375fps, but if this was ripped from a Blu Ray or there is reason to believe it is actually 23.976, then it may be a problem with ffmpegsource2.
If it's a torrent, then all bets are off and you probably shouldn't be asking about it.
foxyshadis
29th April 2015, 05:29
It's probably VFR, with several 30i or 30p sections mixed in. In that case, forcing any framerate will desync the audio, though ripping to the "original" rate will at least work out by the end. Rip the timecodes and mux them back in when done.
hello_hello
29th April 2015, 07:32
AssumeFPS usually isn't the best way to go about it because it changes the frame rate without changing the number of frames.
Better to get the decoder to convert the frame rate by adding or dropping frames as required. For ffmpegsource2 I think it's something like this:
ffmpegsource2("Video.mkv", vtrack = -1, fpsnum=24000, fpsden=1001)
If there's effectively "missing" frames, or frames with twice the duration of the rest, that'll duplicate them and output a constant frame rate.
If the video is variable frame rate and it's higher than 23.976fps in places, converting the frame rate that way can potentially make motion less smooth, but chances are you just need to get the decoder to fill in the missing frames. Without the frame rate conversion it outputs the original number of frames and the average frame rate.
Or as foxyshadis suggested, the alternative is to encode it at whatever frame rate ffmsindex decides to use without using any frame rate conversion, so it's encoded as constant frame rate, then extract the video timecodes from the original MKV with something like MKVCleaver, and finally mux the encoded video with MKVMergeGUI while adding the timecodes from the original MKV. As long as the original and encoded versions have the same number of frames, that'll make the frame rates the same.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.