Content
- DVD preparation
- vStrip
- DGMPGDec
- Video processing
- What is interlace and what it is eaten with
- How to determine what we have: progressive, interlaced or telecined?
- Getting rid of ordinary interlacing (deinterlace)
- IVTC
- Squeeze and pack
A lot of time has passed since the publication of the previous part, but somehow I still could not sit down to continue. This is due to the fact that the IVTC theme is so blurry for me that it’s even scary to start, but, today, I have a day of idleness, and I decided it was time.
What is telecine and why you need it can be refreshed in memory by reading one of the
previous parts . IVTC is InVerse TeleCine, i.e. getting rid of this opportunity.
Actually, the video with the usual interlacing in my practice was very rare, almost always there was a pulldown. Given the number of types of pulldown (as well as possible errors that can be made during the conversion or some kind of "hacks"), getting rid of it becomes an occupation, I would say, intuitive.
')
Yes, if everything is done qualitatively, it is enough to take a plug-in for AviSynth, twist the settings a little and get a good result, but if something goes wrong, the encoding will turn into hell using several plug-ins at once, and for different pieces of video there will be a different set of them.
However, I will not intimidate you again. Let's see what tools we have.
The general algorithm for all plug-ins for IVTC comes down to the following: first, progressive frames are restored, then post-processing is optional, which can help to make progressive frames that could not be recognized at the first stage, and then Decimate procedure is performed to remove duplicate frames and reduce frame rates to a certain standard value.
DecombHere is a good and simple tutorial on this plugin. I will not retell everything, but in brief I will mention the key points for those who are not at odds with English.
1. First, as is the
case with de-interlacing , it is necessary to establish the order of the fields.
DirectShowSource("00581.mts")
AssumeTFF()
2. Then, you need to set the type of pulldown, about which I
wrote here . What specific tifirki set, see the documentation, because from version to version they can be changed and supplemented.
DirectShowSource("00581.mts")
AssumeTFF()
Telecide(guide=2)
I see that you have a question - "how to determine the type of pulldown." Ha! I
wrote about it
here , but in fact all this garbage. :( A reliable type can only be determined by viewing the video manually frame by frame. And the fact that they write applets by reference can only be used as a hint.
And also, in Telecide, you can pass the parameter show = true and open it in the player or in VirtualDub and it will display statistics to you on top of the video. The original file, of course, does not change.
DirectShowSource("00581.mts")
AssumeTFF()
Telecide(guide=1,post=0,show=true)
It looks
like this .
Immediately, in Telecide, post-processing is configured.
DirectShowSource("00581.mts")
AssumeTFF()
Telecide(guide=1,post=2,vthresh=30)
3. And, finally, it is necessary to get rid of extra frames. Note that if you have a PAL video, then Decimate is not necessary.
DirectShowSource("00581.mts")
AssumeTFF()
Telecide(guide=1,post=2,vthresh=30)
Decimate()
In my experience, Decomb does not work well on hybrid videos. This is a video that contains part of the frames with pulldown, and part of progressive. So often encode anime.
But in this plugin there are all sorts of subtle settings, by turning which you can certainly achieve a good result.
TIVTCBut I like this thing more. By the number of settings, their subtleties can compete with Decomb. I would even call this plugin user friendly, if at all you can say about AviSynth and its plugins. :)
How to use this plugin in certain situations, I will not tell you either, referring to the documentation, but I will note some points.
First of all, great support for hybrid video, there is for this a special setting with several levels.
Secondly, support for external post-processing filters, you can even write and connect your own.
Third, the possibility of processing in two passes! This is a very cool opportunity. In addition to better quality and an increase in processing time, after the second pass, the plugin generates a file with time stamps to collect into matryoshka (mkv). In other words, you can implement a variable frame rate.
Ie, if in some places, for example, in some titles, there are several repeated frames, or, which is not uncommon in the anime, there are several repeated frames even during the action itself, then the plugin will detect and mark it. Sometimes, it is great to save the size of the output file or to give additional room for compression with a higher bitrate.
I will give an example of two avs files.
First pass:
LoadPlugin("Plugins\DGDecode.dll")
LoadPlugin("Plugins\tivtc.dll")
mpeg2source("D2V\e01.d2v")
AssumeTFF()
mpeg2source("D2V\e01.d2v")
tfm(d2v="D2V\e01.d2v", output="e01_matches.txt")
tdecimate(mode=4, output="e01_metrics.txt")
Second pass:
LoadPlugin("Plugins\DGDecode.dll")
LoadPlugin("Plugins\tivtc.dll")
mpeg2source("D2V\e02.d2v")
AssumeTFF()
mpeg2source("D2V\e02.d2v")
tfm(d2v="D2V\e02.d2v", input="e02_matches.txt")
tdecimate(mode=5, hybrid=2, vfrDec=1, input="e02_metrics.txt", tfmIn="e02_matches.txt", mkvOut="e02_tcode.txt")
See, in the second case, mkvOut = "e02_tcode.txt"? This is it. How to use will tell in the part about the collection of matryoshka.
I will not say anything more about TIVTC, because I will not say better than in the documentation. Docks are simple, everything is written very clearly. Maybe someday I'll do the translation. Who knows? :)