Log in

View Full Version : Question about DVDs frame rate and muxing to MKV


Sakura-chan
22nd July 2011, 20:40
Hi!

I have a several 720x480 DVDs at 23.976 FPS. I want to mux them into MKVs as it's a more convenient container (at least for me).

I do the demux of the tracks with MeGUI or directly muxing the first VOB in mkvtoolnix, everything's fine except I'm clueless about a FPS thing.

When I open the DVD (the IFO or VOBs) it shows a framerate of 29.97 but it actually runs at 23.976. If in mkvmerge I set the FPS to 29.97, obviously the video gets out of sync with the audio/subs. But if I set it to 23.976 it's also out of sync, but barely for a second or two during the whole movie. If I don't set the FPS in mkvmerge and leave it blank, the MKV ends with 59.94, but actually running at 23.976 and the whole movie and audio are perfectly in sync. WTF is going on? I can't understand it. I've muxed several DVDs before, mostly PAL (576x480) from what I remember, which showed 25 FPS, I set at 25 FPS in mkvmerge and run at 25 FPS. Everything was good.

Here are screens, if they can help in some way. In "output" at the end, set framerate/actual running framrate.

Original DVD
http://thumbnails38.imagebam.com/14172/8e1a33141713234.jpg (http://www.imagebam.com/image/8e1a33141713234)

Muxed with 23.976 FPS
http://thumbnails35.imagebam.com/14172/014a72141713159.jpg (http://www.imagebam.com/image/014a72141713159)

Muxed with 29.970 FPS
http://thumbnails46.imagebam.com/14172/1c09a3141713186.jpg (http://www.imagebam.com/image/1c09a3141713186)

Muxed leaving FPS field blank
http://thumbnails56.imagebam.com/14172/a7507c141713214.jpg (http://www.imagebam.com/image/a7507c141713214)

Also note how the total frame count varies in all muxes. When opening the original IFO the total frames show as 148936 (the one in the screen "original DVD" is only from one of the VOBs). That's when another oddity happens. The IFO shows a total runtime of 1:22:49 that, when muxed into the MKV, it ends up at 1:52:12 (this one is the "real" one, in the original DVD cover). More weird is that, when scrolling through the 1:22:49 the entire movie seems to be there, nothing cut.

It's more a thing of curiosity, as the final MKVs with blank FPS field run fine. I use MPC-HC and PotPlayer (former KMPlayer) for playing and MeGUI for demuxing the DVD tracks (but adding directly the first VOB to mkvtoolnix causes the rest to be processed, it ends up the same).

Well, I hope it's somewhat clear, I couldn't come with a better thread title :P

From now on, should I leave the FPS field always blank? As even if the MKV ends up with a weird frame rate, the movie plays fine. I messed with it in the first place because I've seen cases of some files (some h264 in MKV I think) not having the FPS set and then played at a wrong rate. But with muxed DVDs it seems the best is not to bother.


On a side note of all this, all the PAL DVDs I tried run at 25 fps. For 720x480 DVDs I have framerates of 23.976 and others 29.97. NTSC DVDs can run at different framerates unlike PAL?

setarip_old
22nd July 2011, 21:45
Hi!

Why not make your life simple and just use MakeMKV (one step, no separate ripping, no demuxing, remuxing, etc.)?

Sakura-chan
23rd July 2011, 00:07
Because I need to add subtitle track[s] and name the audio and sub tracks, MakeMKV is a one-click app. BUT I've just tried it and it makes an MKV at 29.97 FPS (real playing is at 23.976) with a ~200.000 frame count. At least the FPS part is the same as the original DVD, 29.97 displayed and 23.976 at playing. Then remuxing that MKV in mkvmerge with the sub[s] tracks doesn't alter the FPS thingy for the video track. Guess I'll have to do this "double muxing" to be, at least in theory, on par with the original DVD (unless someone has a better idea). The 59.94 FPS mkvmerge set on its own in the first place makes me nervous <_<

setarip_old
23rd July 2011, 01:15
Because I need to add subtitle track[s] and name the audio and sub tracks...It would have been a good thing if you had mentioned these requirements in your initial post ;>}

Inspector.Gadget
23rd July 2011, 02:01
No standards-compliant DVD exists at 24000/1001 frames per second. NTSC DVDs made from film are pulled-down to 60000/1001 fields per second. Unless you're verifying that a given DVD title is 100% soft pulldown and you remove it with e.g. DGPulldown or you are re-encoding with an IVTC operation, muxing at 24000/1001 frames per second is not going to do what you want it to do.

Don't explicitly set a framerate when muxing DVD content to MKV with MKVMerge. Either perform the appropriate operation ahead of time or let mkvmerge mux the original MPEG-2 stream as intended.

Chetwood
23rd July 2011, 06:55
Your FPS problem notwithstanding, MakeMKV adds subtitles automatically and after doing a 1-step-mux with it you can easily change header information of the streams with MKVToolnix's header editor.

Sakura-chan
24th July 2011, 07:24
It would have been a good thing if you had mentioned these requirements in your initial post ;>}
Lol, yeah, didn't think of it :P

No standards-compliant DVD exists at 24000/1001 frames per second. NTSC DVDs made from film are pulled-down to 60000/1001 fields per second. Unless you're verifying that a given DVD title is 100% soft pulldown and you remove it with e.g. DGPulldown or you are re-encoding with an IVTC operation, muxing at 24000/1001 frames per second is not going to do what you want it to do.

Don't explicitly set a framerate when muxing DVD content to MKV with MKVMerge. Either perform the appropriate operation ahead of time or let mkvmerge mux the original MPEG-2 stream as intended.
So, I shouldn't care the 59.94 frames mkvmerge, or 29.97 for MakeMKV, set as default in the MKV? As long as I don't change it manually, it should always be fine. I just want to mux the video, no reencoding or altering it in any way.

I still don't get what makes the player play the MPEG2 track at 23.976 when the MKV is set to 29.97 or 59.94. If I manually set it to 29.97 I break it.

The original film is 24000/1001 fps. It gets pulled-down to 30000/1001 frames (60000/1001 fields) so it complies with NTSC. But when playing it appears to be running at 24000/1001 fps, instead of the 30000/1001.


But now, seeing the frame rate in MPC-HC, it ranges from 18 in parts up to 26 in others. Maybe, after all, the frame rate counters in players aren't reliable? <_<

Edit: After 5 mins of continuous playing, frame rate sits at ~23.60.

Your FPS problem notwithstanding, MakeMKV adds subtitles automatically and after doing a 1-step-mux with it you can easily change header information of the streams with MKVToolnix's header editor.
I don't see how can it can add subs automatically if I don't give it the SRT or ASS file as input (there's nowhere to put them in the program). Maybe I missed something? :o

Inspector.Gadget
24th July 2011, 20:42
As long as I don't change it manually, it should always be fine. I just want to mux the video, no reencoding or altering it in any way.

Correct.

But when playing it appears to be running at 24000/1001 fps, instead of the 30000/1001.

Your MPEG-2 decoder is performing an appropriate inverse telecine operation on playback. Everything is working as intended.

Sakura-chan
24th July 2011, 23:52
Ahhh, I see now. It's the MPEG2 decoder, and not what the FPS field on the MKV says. If I change the FPS field manually I mess up the inverse telecine operation of the decoder, forcing it to run on another framerate. Leaving it blank, allows it to work as it should. So, it doesn't really matter if the MKV by default is set at 29.97 by MakeMKV or 59.94 by mkvmerge, the MPEG2 decoder "knows" what to do :P

Thanks, awesome forum here ♥