IVTC in TMPG

This is it! The ultimate solution to these non-orderly encoded movies that have rff sequences that change all the time - these kind of streams are called Forced NTSC sometimes. However it's not an easy solution.. matter of fact it can't get much harder.

Since FlaskMpeg does not allow us to stream multiple times and since I never managed to even get the IVTC auto-settings working with this program combination let's welcome another new decoder: DVD2AVI. DVD2AVI is an amazing little program which is not quite so powerful as FlaskMpeg but the author is working hard on making it better, adding audio decoding and other neat things. DVD2AVI will allow us to kind-of frameserve to TMPG. I say kind-of because using DVD2AVI's VFP plugin we don't have to run the program, we simply create a DVD2AVI project that will allow us to access the VOB files much as if they were an AVI file. Great, eh?

You'll maybe have to copy both DVD2AVI and the VFP plugin to the TMPG folder before you start. 

So start up DVD2AVI and select File - Open.

Here select your list of VOBs. Since at it's current state DVD2AVI is not capable of IFO parsing it may be a good idea to prepare your VOBs somewhat. Cut away the studio logo if you can and everything that does not belong to the movie using vstrip and splitting by VOB ID. You can find detailed instructions on how to do this in the AVI/AC3 guide. Doing so will make sure that you won't confuse the auto-IVTC of TMPG with logos that are differently encoded and you won't have to cut the video afterwards.

Then set the audio options:

The latest release supports AC3 decoding and Linear PCM demultiplexing. Make sure that you have the right option checked.. if you want the AC3 channel make sure that no Track in the DD Decoding submenu is checked. If you want DVD2AVI to decode the audio simply select the right track. If you're wondering which track is which: Start a software DVD player, then right click in the window (or however it's done in your player.. I'm using PowerDVD and WinDVD), go to the audio submenu and you'll get a list of audio tracks.. they're listed in the exact same order as you can select them in DVD2AVI.


Then save your current project:

Depending on your settings this is going to demux the AC3 channels from the VOBs and they will be put in the same directory as the d2v file and will be labeled something like this: new T01 -66+0ms.ac3. TXX is the number of the AC3 track and -66+0ms means that the audio has to start 66ms earlier than the video. Anything above 80ms requires that you actually care about that since that is about the time it takes you to notice that the audio is slightly amiss. 

If you're using the DD decoding you don't have to worry about asynch.. DVD2AVI will make the adjustments for you when saving the WAV file. 

>>Read more about
ADJUSTING AUDIO

After that start up TMPG and load the d2v (or avi if you used VFAPI Reader) file or .avs as video source file. If the audio displacement is only slightly you can load the right AC3 track (you can usually play these either directly in Media Player or otherwise in your software DVD player) as audio source file. Then load the ivtc.mcf configuration file and afterwards verify your settings:

There's no way to tell what field order your movie will have. The best you can do is to encode a couple 100 frames and then watch it.. You'll notice when something is seriously wrong. At the beginning when you select Inverse telecine it will be marked Not configured. So we'll have to configure it and here's where the trouble starts: IVTC is really slow, although it does not take quite as long as encoding it takes up much of your time. And to make things even worse the IVTC does not always succeed. Sometimes you'll have to fix it yourself and that's really hard.

Double click on Inverse telecine, then press the Auto button.

Select Automatic as telecine type and no Deinterlacing. After all we're going thru all this trouble because we don't want to Deinterlace.

After a long while you'll end up with something like this:

The fields marked in red are the ones that will be kept after IVTC, the others will be discarded. It is imperative that you'll move around in the move using the slider on the bottom and then play small sequences by pressing the button in the rightmost down most corner to see whether it's never interlaced. If it is you're in trouble. You can either still settle for the easy way by right clicking and select Set the deinterlacing method for the remaining frames. TMPG's deinterlacer is quite good and will let you see the results on-screen. But since we won't settle for nothing but a perfect result let's go on with it.

You can see.. same picture as above but one field more selected and it's interlaced :( So you'll have to find out where exactly the interlacing starts and at that point you'll have to modify the frame sequence. You can select fields by simply clicking on them, and clicking on them again will deselect them again. You'll see the result of your operations directly in the large image. When you think you've found a nice sequence press Check to make sure that your sequence is valid. You'll only have to find a valid sequence once, then right click.

Once you've found a valid and working pattern you may be saved... but finding it is probable the hardest part, especially since these movies tend to change the pattern quite often. Unfortunately the Auto-set remaining frames function will give you nothing but the original result. However if you set the option marked on the right then TMPG will apply the pattern you've just spend hours looking for to the rest of the movie. You'll then have to once again check whether the rest of the movie is okay. If not you may try Auto-set remaining frames and if that doesn't help you'll have to look for a valid pattern once more.

Are you still with me? Please don't hate me.. I didn't make these screwed up discs. But this is simply the only way unless someone comes up with a way to make an "intelligent" auto IVTC that works with all kind of screwed up screams. Interested? Let me know and I'll hook you up with bunch of programmers who are working on various decoders.

When everything is finally OK let me congratulate you. You've just mastered what I consider to be the ultimate test for a ripper. Now everything else should be a piece of cake for you.

You may have realized it before.. the aspect ratio of all these pictures is not correct. This is due to the fact that DVD2AVI does not perform a letterboxing as FlaskMpeg does - and this is probably why this works out, I don't think we could do the IVTC right if we'd change the frames before applying IVTC but I could be wrong here - hence it's imperative that you set the right source resolution settings: 16:9 for Source Aspect Ratio and Fit to Frame (preserve aspect ratio) as Image positioning method. There may be other settings that work out but these certainly do work. Unfortunately there's no way to crop properly, otherwise we could also use this procedure to encode to DivX. Crop will be based on the original frame and the settings just mentioned (the letterboxing) will be applied after cropping, hence it's useless for AVI encoding. 

After that go to the main Configuration tab and check if the framerate is really 23.976, and 3:2 pulldown is checked and Interlaced unchecked. You may also want to change the bitrate settings. If you've come here you shouldn't be told how to calculate that, should you?

Of course it's also possible to get subtitles burned in the video. You simply have to save the current Project in TMPG, convert the .tpr file in VFAPI Reader into an AVI, load that AVI into VirtualDub, apply the subtitle filter, and frameserve back into TMPG. 

Now a short line for the DivX people: Instead of actually encoding you'll simply save the project you've just set up by pressing Control - S. Then you can either convert that project in VFAPI Reader Converter to a reference AVI file for later use in VirtualDub (you'll have to the resizing... not the rest of the IVTC operations) or use the tpr file as source for TMPG. 

>> Read more about
VFAPI
SUBTITLES

>> Encode the movie using
VIRTUALDUB (AVI)
TMPG (MPG)

Then encode the movie. Open a good bottle of champagne when the encoding is done. You've done it. The probably most complicated ripping procedure there ever is just completed.

>> Read more about
CUTTING S/VCDS
BURNING S/VCDS

Credits

Not really credits but thanks. Thanks to Oleg who first mentioned this program. Also many thanks to Inwards, whose myths about deinterlacing had me write this article. And last but not least to the author of this great program who explained a great deal about this procedure to me.

 

Сайт создан в системе uCoz