ADMET

Complete News World in United States

Deep Space Nine Project Update: Why MakeMKV-Derived Files Don’t Work

This website might earn affiliate commissions from the hyperlinks on this web page. Terms of use.

(Picture: mlange_b/Flickr, CC BY-SA 2.zero)
The most typical query I’ve been requested about my DS9 upscaling work is whether or not there’s a method to make it work with information created through MakeMKV. MakeMKV is (and has been) a preferred software for ripping DVDs for a really very long time. I began with MakeMKV information and persevered in trying to work with them with out success for about six months. One of the crucial essential items of recommendation I realized on this mission got here from the Doom9 discussion board, the place I used to be suggested to drop this strategy and change to DVD Decrypter. As soon as I did, I made extra progress in six weeks than I had in six months.

Notice: There’s a distinction between having an MKV file with media content material in it and particularly utilizing MakeMKV to create a file. We’re discussing the latter state of affairs; the DS9 Mission Replace’s default output is in MKV. Additionally, as a reminder, the DS9 Upscale Mission is a fan effort, unofficial, and never affiliated with Paramount or ViacomCBS.

I returned to the query this weekend after a number of readers raised it to me in electronic mail. As an alternative of trying one other spherical of fruitless filter passes, I made a decision to take a MakeMKV file aside and look at the underlying frames. What I discovered will shock you explains a number of issues as to why MakeMKV supply turns to hash regardless of the way you deal with it.

A lot is usually made from the truth that MakeMKV creates an actual duplicate of the frames inside a DVD VOB file. On the one hand, that is true. Along with extracting all the frames from a MakeMKV-created file, I additionally extracted the frames from a VOB file immediately. The frame-by-frame output between a VOB file and a MakeMKV file is similar.

That is truly a part of the issue.

To be clear: A part of the rationale why you may’t use a MakeMKV file on this course of with out hosing your movement is that MakeMKV creates variable body charge information and AviSynth isn’t designed to edit variable-length information. Thus, AviSynth forces MakeMKV-derived output right into a non-standard 24.6 fps charge in an try to harmonize the 2. This destroys any probability of synchronizing audio. However the issue goes slightly deeper than that.

DVDs: What You See Isn’t What You’ve Bought

There are points to this case that I’m nonetheless piecing collectively, so I apologize if I’m slightly imprecise in locations. The primary level I wish to make is that there’s a distinction between what you see in a DVD stream whenever you play the file again — even in the event you go body by body — and the precise body sequences saved on disk.

All the content material written to an NTSC DVD meant for playback in a DVD participant is “conceptually interlaced”, to borrow a time period from HomeTheaterHiFi. To cite:

It’s essential to grasp on the outset that DVDs are designed for interlaced shows. There’s a persistent delusion that DVDs are inherently progressive, and all a DVD participant must do to show a progressive sign is to seize the progressive frames off the disc and present them. This isn’t precisely true…

DVDs are based mostly on MPEG-2 encoding, which permits for both progressive or interlaced sequences. Nevertheless, only a few discs use progressive sequences, as a result of the gamers are particularly designed for interlaced output. Curiously, whereas the sequences (i.e., the movies and movies) are seldom saved progressive, there’s nothing fallacious with utilizing particular person progressive frames in an interlaced sequence…

The encoder can combine and match interlaced fields and progressive frames so long as every second of MPEG-2 knowledge incorporates 60 fields, no extra, no much less (or 50 fields per second for PAL discs)… In brief, the content material on a DVD is interlaced conceptually. (Emphasis added)

Displaying excellent 23.976 fps video out of 29.97 fps video requires an inverse telecine. Telecine is the method of changing 24 fps movie to be displayed on 29.97 fps video. One typical sample of telecine within the NTSC universe is Three:2 pulldown, wherein interlaced frames are created in a selected sequence to transform ~24 progressive frames into 60 fields a second for broadcasting frames. It’s potential to unwind one of these content material again into completely progressive frames if the DVD is mastered correctly, which is the place the concept that DVD footage is progressive comes from. DVD footage can show as absolutely progressive, however the usual assumes 59.94 fields per second, which we translate to 29.97 frames, which might be displayed at 23.976 fps progressive because of using flags telling the participant which fields to point out throughout playback.

The three:2 course of. Unwinding this permits a 29.97 fps interlaced file to be turned again into 23.976 fps content material.

Right here’s the place we get to the essential distinction between utilizing DVD Decrypter and DGIndex versus trying to edit a MakeMKV-derived supply file. After I dumped the contents of each varieties of sources to disk, I found a big distinction between them. The D2V-derived supply contained the acquainted Three:2 sample we’d anticipate from progressive content material that’s been put by way of telecine: Three progressive frames, adopted by two interlaced frames. Once you create a D2V file, it’s going to specify 29.97 fps playback until your content material is 100 % movie (that means a superbly progressive stream of 23.976 fps knowledge encoded interlaced in 29.97 fps fields).

The MakeMKV-created file contained a really completely different body sequence. As an alternative of three:2, it contained completely progressive frames encoded within the following sample: 1-2-Three-Four-Four (body Four repeats) or 1-2-Three-Four-5-5 (body 5 repeats). Internally, the body charge of the MakeMKV-encoded file stays 29.97 fps. MakeMKV-created footage solely returns to the usual Three:2 format throughout scenes that had been anticipated to play again at 29.97 fps. The frame-to-frame contents of the 2 video streams are completely different within the 23.976 fps progressive sections.

Right here’s how I do know that’s true: By default, the output from a D2V-derived file is 29.97 fps, until you alter it ultimately. A MakeMKV file and a D2V-created file at 29.97 fps observe one another body for body. That doesn’t imply body output between the 2 is at all times similar, nevertheless. Right here’s Body 327 from a 29.97 fps D2V-derived file damaged down into its constituent frames, versus a Body 327 from a MakeMKV-derived supply.

I can’t embed the slider, so I’ll additionally embed a screenshot beneath:

MakeMKV body on the left, DVD Decrypter + DGIndex body on the suitable. Imagine it or not, the body on the proper is the body we wish to course of to unwind the body charge correctly. Please ignore Sisko’s brow tumor, he’s delicate about it.

Within the MakeMKV file, Body 327 is a shot of Sisko. Within the D2V-derived file, Body 327 is an interlaced body containing knowledge from the body earlier than (the 2 admirals sitting) and the body to return (Sisko speaking). Sisko’s mouth place in Body 328 of the MakeMKV supply is completely different than his mouth place in Body 328 of the D2V supply. This continues by way of Body 329, however the output synchronizes once more at Body 330.

TDecimate would possibly be capable of theoretically scan the video stream and take away the duplicate photographs, however AviSynth doesn’t perceive what the body charge of the MakeMKV-derived supply is meant to be within the first place. The fixed 29.97 fps D2V file DGIndex creates, in distinction, presents AviSynth with an information stream in a format it understands and may work with. There are methods to make use of a timecodes file to work with VFR in AviSynth, however the level is moot as quickly as you get to Topaz Video Improve AI, which doesn’t assist VFR enter.

The explanation why MakeMKV information don’t work on this mission is that MakeMKV information don’t characterize the video knowledge contained inside the VOB in a fashion that AviSynth can work with. The progressive 1-2-Three-Four-Four and 1-2-Three-Four-5-5 sample encoded into MakeMKV information performs again easily as a result of the file stream incorporates a plethora of hints telling the participant software program how you can play it and which fields/frames ought to be displayed. Turning that stream into one thing that different functions can course of, nevertheless, is something however simple.

I can’t converse to the precise cause why DGIndex can take a look at a VOB and create a D2V mission file that outputs Three:2 pulldown, whereas the VOB and MakeMKV-created sources don’t. However it’s this distinction in output that causes issues. And on condition that Topaz doesn’t assist VFR ingestion, the purpose is essentially moot. The DVD set and DVD Decrypter are, as of this writing, each required for this course of.

Now Learn: