Page 1 of 2
Wrong Frame Rate In MKV Container When Checking FPS
Posted: Thu Jun 30, 2011 9:17 am
by dream88
Hi
There is a problem with the reported frame rate of the container when i made an MKV of a dvd, the frame rate of the finished MKV is wrong, it is shown as 29.970fps when the actual correct frame rate is 23.976fps.
When i demux the video stream and query the demuxed video stream i get a report that shows 23.976fps which is correct.
If i played the 29.970fps MKV in a media player it will play correctly at 23.976fps but the problem occurs when using the 29.970fps MKV file because when queried it will report the wrong 29.970fps to any application.
So when i convert\encode the mkv with a 3rd party application i get a video that plays too fast because of MakeMKV error with the fps, i have to manually set the fps in the 3rd party application.
Re: Wrong Frame Rate In MKV Container When Checking FPS
Posted: Thu Jul 07, 2011 2:22 pm
by dpstjp
Which DVD is this? What are you demuxing with?
It could be a pulldown flag in the video. MakeMKV does not strip pulldown flags out.
This is a problem for HD DVDs as well.
Re: Wrong Frame Rate In MKV Container When Checking FPS
Posted: Thu Jul 07, 2011 4:12 pm
by BlackDragon24
As far as I know, most NTSC DVD's are encoded at 29.970 fps. To get 23.976 requires applying a 3:2 pulldown on NTSC film (3 progressive frames followed by two interlaced frames) which takes the two interlaced frames, converts them to a progressive frame, and thus you get pulldown from 29.970 to 23.976 fps. The other way it could be encoded is with decimation, which simply adds duplicate frames (4 progressive frames followed by a duplicate frame.
Which DVD is it that you are trying to make an mkv for?
Re: Wrong Frame Rate In MKV Container When Checking FPS
Posted: Fri Jul 08, 2011 10:14 pm
by Romansh
BlackDragon24 wrote:As far as I know, most NTSC DVD's are encoded at 29.970 fps. To get 23.976 requires applying a 3:2 pulldown on NTSC film (3 progressive frames followed by two interlaced frames) which takes the two interlaced frames, converts them to a progressive frame, and thus you get pulldown from 29.970 to 23.976 fps. The other way it could be encoded is with decimation, which simply adds duplicate frames (4 progressive frames followed by a duplicate frame.
Which DVD is it that you are trying to make an mkv for?
3:2 pulldown (sometimes also referred to as telecine in this context) is the act of converting 23.976 fps progressive video to 29.97 fps, not the opposite. Most Hollywood films are encoded at 23.976 fps with pulldown flags; DVD players will follow the pulldown flags to convert it to 29.97 fps (unless "Progressive Scan" is enabled).
Re: Wrong Frame Rate In MKV Container When Checking FPS
Posted: Wed Jul 13, 2011 5:11 pm
by rogerdpack
BlackDragon24 wrote:As far as I know, most NTSC DVD's are encoded at 29.970 fps.
I think "most" NTSC DVD's are progressive (i.e. true 23.97 fps), and rely on the DVD player to convert them.
You can tell by running them in mplayer
http://www.mplayerhq.hu/DOCS/HTML/en/me ... ecine.html
If it says
demux_mpg: 24000/1001fps progressive NTSC content detected, switching framerate.
Then the DVD contains 23.97 fps frames, and lets the DVD convert them to 59.97 telecine for output to the TV. AFAIK.
Re: Wrong Frame Rate In MKV Container When Checking FPS
Posted: Wed Jul 13, 2011 5:13 pm
by rogerdpack
dream88 wrote:
So when i convert\encode the mkv with a 3rd party application i get a video that plays too fast because of MakeMKV error with the fps, i have to manually set the fps in the 3rd party application.
VLC probably plays it fine, which would seem to imply that the 3rd party application isn't handling it quite right.
The real kicker is that some DVD's go from 29.97 telecine to 23.97 progressive *within the same title* so...I can't think of a way for makemkv to handle this except to stick with 29.97 fps and insert frames by timestamp, so it's relying on your player to know what to do there.
Re: Wrong Frame Rate In MKV Container When Checking FPS
Posted: Wed Jul 13, 2011 8:02 pm
by BlackDragon24
My point was that every single NTSC DVD I have ever ripped into mkv format with makemkv has given me a file with a video stream containing 29.970fps when looked at with mediainfo. When I re-encode them with another program that allows me to view the video frame by frame, I can literally see the duplicate and/or telecine frames and must run them thru an avisynth plugin to deinterlace them to get true 23.976 fps progressive output. Most DVD's I work with are TV shows and lots of them are older.
Some content ("The Wire" most recently comes to mind) has duplicate frames and telecine frames so it can be quite challenging to get true progressive video output.
Re: Wrong Frame Rate In MKV Container When Checking FPS
Posted: Wed Jul 13, 2011 9:16 pm
by rogerdpack
BlackDragon24 wrote: When I re-encode them with another program that allows me to view the video frame by frame, I can literally see the duplicate and/or telecine frames and must run them thru an avisynth plugin to deinterlace them to get true 23.976 fps progressive output. Most DVD's I work with are TV shows and lots of them are older.
Are you trying to convert your DVD's to 23.976 fps? If they are telecine then you'll be dropping frames to do that then? How do you hope to accomplish this?
-roger-
Re: Wrong Frame Rate In MKV Container When Checking FPS
Posted: Thu Jul 14, 2011 12:17 am
by BlackDragon24
rogerdpack wrote:BlackDragon24 wrote: When I re-encode them with another program that allows me to view the video frame by frame, I can literally see the duplicate and/or telecine frames and must run them thru an avisynth plugin to deinterlace them to get true 23.976 fps progressive output. Most DVD's I work with are TV shows and lots of them are older.
Are you trying to convert your DVD's to 23.976 fps? If they are telecine then you'll be dropping frames to do that then? How do you hope to accomplish this?
-roger-
If it is NTSC film, then it is 3 progressive frames followed by 2 interlaced frames. So you can use software that will take the 2 interlaced frames and convert them to a progressive frame....which effectively eliminates one of the 5 frames so now you have 4 frames instead of 5. Which if you do the math:
4/5 = 23.976/29.970.
If they are decimated (4 progressive frames, 1 duplicate frame) then the software will just yank out the duplicate frames giving you the same result as above. 4/5 = 23.976/29.970.
Re: Wrong Frame Rate In MKV Container When Checking FPS
Posted: Thu Jul 14, 2011 3:36 pm
by rogerdpack
so makemkv bills itself as a "straight" copy so...it will include all the telecined frames by default. I guess you'll need to use another program to combine them I guess (mplayer pullup comes to mind).
Re: Wrong Frame Rate In MKV Container When Checking FPS
Posted: Thu Jul 14, 2011 9:33 pm
by BlackDragon24
rogerdpack wrote:so makemkv bills itself as a "straight" copy so...it will include all the telecined frames by default. I guess you'll need to use another program to combine them I guess (mplayer pullup comes to mind).
You only really need to worry about it if your are re-encoding. Most software and hardware based players take care of the extra frames for you.
Cheers
Re: Wrong Frame Rate In MKV Container When Checking FPS
Posted: Thu Oct 13, 2011 6:17 pm
by wmilas
I just joined the forum to talk about this very issue.
MakeMKV is definitely doing something wrong.... well not wrong, its just omitting the fps field inside of the header of the video stream. Certain applications such as VLC will calculate the correct FPS on the fly. If you play a DVD that MakeMKV has processed VLC reports under codec info that it is 30000/1001 fps but actually PLAYS it at 24000/1001 when it realizes that the frame count and total length don't add up to the supposed fps rate.
Other players are not that smart and happily play it at 30000/1001.
I ran into this issue last night and spent some time trying to figure out whats going on. I've been using MakeMKV for a while now instead of slysoft/BDClown because its just a nicer package. I've been processing mostly Blurays. This issue doesn't manifest itself with a Bluray. It pops up when dealing with mpeg2 content in a dvd.
What happened is I processed via MakeMKV then ran it through MeGUI. The output file was too short. After some quick math and looking at the mkv headers it dawned on me what was happening. Whats annoying is that you have to manually calculate what the correct FPS is and set it yourself which MakeMKV could easily do for you.
I'll post the logs of whats going on later tonight or tomorrow and propose a fix
Re: Wrong Frame Rate In MKV Container When Checking FPS
Posted: Thu Oct 13, 2011 8:16 pm
by mike admin
wmilas wrote:I'll post the logs of whats going on later tonight or tomorrow and propose a fix
Please do, thanks!
Re: Wrong Frame Rate In MKV Container When Checking FPS
Posted: Wed Oct 19, 2011 3:01 pm
by wmilas
Site was down... I'll post them tonight.
Re: Wrong Frame Rate In MKV Container When Checking FPS
Posted: Sat Nov 26, 2022 1:14 pm
by maretedkatiegrace
i have some BBC TV shows, 25fps and AC3 audio. I've had nothing but issues trying to play them in the US. This did not work - rip as is, play on AppleTV 4K on a US Sony TV and audio stutters every few seconds. Tried letting Topaz Video AI use chronos to change the FPS to 60, then verified that the original length and the new 60fps length are the exact same length (yes). Then used MKVTollNix to combine the original 48khz audio and new 60fps video back together, and play on a Sony TV that can take 60hz, same thing audio stutter. I tried changing the FPS to 30, then remux, same thing, playback stutters audio every few seconds. Then I tried changing the FPS to 23.97 using Topaz Video AI then remux and it seems to be smooth audio. Any ideas why I can't get my apple tv and Sony TV to play back a clean 60fps clip that started as 25fps and was changed to 60fps using Topaz, that plays back perfectly on a PC by the way? I'm confused because the specs says both the 30fps and 60fps should play perfectly on the TV, but the audio stutters. What am I missing? Is there anyone here that has started with 25fps TV shows and ended up with perfect 60fps that plays with zero audio issues?