View Full Version : Need some help working with hybrid NTSC
Blue_MiSfit
6th November 2006, 10:38
Hey everyone.
So I'm not so up on working with hybrid MPEG-2. The film is called "The Corporation" and it's a great documentary about the rise of the corporation in America. It's got mixed 60i from DV cameras, and 24p stuff from film. The MeGUI analysis reports:
Progressive sections: 51
Interlaced sections: 168
Partially static sections:259
Film sections: 41
Declared hybrid, majority interlaced
Tff - margin of 201:7
So it's a big mess. MeGUI recommends using TIVTC TDeint(EDI).
DGDecode_mpeg2source("F:\Movies Work\The Corporation\VTS_01_1.d2v",info=3)
ColorMatrix(hints=true)
edeintted = AssumeTFF().SeparateFields().SelectEven().EEDI2(field=-1)
tdeintted = TDeint(edeint=edeintted,order=1)
tfm(clip2=tdeintted).tdecimate(hybrid=3)
This is very slow, but it seems to get a lot of it right. The film sections look good, with the worst artifact being an occasional ghost, but the interlaced sections (talking heads style interviews) still comb most of the time.
I'm no expert with interlacing and am really just doing what MeGUI suggests. Do you guys have any suggestions on how to keep the film parts looking good, and fix the combing on the interlaced bits?
I would be willing to do interlaced encoding with XviD, and bob on playback, but would that fix things?
~MiSfit
foxyshadis
6th November 2006, 11:52
What's your output format? Avisynth 2.5.7 comes with what I believe (hope, since I don't have a backup) is my latest revision to the VFR page; if you install the docs from it, you should be able to follow it. It's in advanced topics, btw.
For the ultimate in removing stray combing, as well, check out didee's and tritical's new vinverse.
The mp4 section hadn't been updated for bond's mp4 vfr tool, sorry.
Blue_MiSfit
6th November 2006, 12:29
I'm willing to output to anything really, though I would prefer XviD or x264 in MKV with the AC3.
I have 2.5.7 installed, but the documentation makes no reference to VFR. Is there some other documentation that isn't included with a 2.5.7 package?
[edit]
http://avisynth.org.ru/docs/english/advancedtopics/hybrid_video.htm is I think what you are talking about?
So from what I see, I need to run
TFM(mode=1,output="tfm.txt")
TDecimate(mode=4,output="stats.txt")
first to analyze and output stats etc... What's the quickest way to do this? Seems like dropping it into virtual dub, turning off audio sync and video output, and just playing is the fastest way that I can see.
Then I need to
TFM(mode=1)
TDecimate(mode=5,hybrid=2,dupthresh=1.0,input="stats.txt",tfmin="tfm.txt",mkvout="timecodes.txt")
to finally create a VFR stream using the stats collected with the first pass. This can then be fed to x264, and finally muxed in with the timecode file?
What will happen to the interlaced portions of my video? Will they stay interlaced? Sorry I'm still a little unclear...
~MiSfit
Blue_MiSfit
6th November 2006, 14:59
So I finished the first bit, and have the stats files. I am running a quick CQ3 XviD encode in MeGUI to see what happens.
Daodan
6th November 2006, 20:36
Yes, everything should go along fine. This is the simplest method for VFR from what I know and it gives very good results.
What will happen to the interlaced portions of my video? Will they stay interlaced?
They will not be interlaced. They will just be played at 29.97 fps and the film parts at 23.976. The frames (left after the analyzing of the stream that can see dupes and delete them) are there in a certain order and the timecodes tells how long each will be displayed...so for the video part they will just be played faster.
foxyshadis
7th November 2006, 00:25
They'll be deinterlaced according to TFM's PP, which might not be good enough for you. You can use an external (same-rate, not bobbed) deinterlacer with the clip2 parameter, such as tdeint, tomsmocomp, or even mvbob/mcbob (with selecteven).
I need to ask Tritical for a doublerate variation one of these days... But I don't have much hybrid material anymore, so it doesn't really come up.
Blue_MiSfit
7th November 2006, 00:29
Okay, so I did all this, and muxed an MKV with the timecode file.
The film portions look great, but again the 60i stuff looks crappy, with lots of combing and jagged edges.
I think I need to use a different deinterlacer for the 60i sections. I am assuming the tfm line could be replaced with something else?
Will I have to re-run the first pass? Or can I just change the tfm line to something else and re-encode?
Sorry, I'm such a newb at this stuff :)
~MiSfit
foxyshadis
7th November 2006, 00:58
You normally don't need to rerun the first pass. The film/video decisions won't really change, aside from a cycle here and there that doesn't quite match up. For deinterlacing, clip2 (and see my last post).
Blue_MiSfit
7th November 2006, 01:59
I'm sorry foxyshadis... I don't quite get what you mean when you say clip2. I see no reference to clip2 in my 'secondpass' script.
Im trying!! :p
Thanks for all the help!
~MiSfit
foxyshadis
7th November 2006, 06:48
deinted=Tdeint(mode=0) # or any other deinterlacer
TFM(mode=1,input="tfm.txt",clip2=deinted)
TDecimate(....)
If you don't delete the crc from the tfm.txt, you will need to rerun the first pass though.
manono
7th November 2006, 08:26
When I have hybrid stuff that has to be made progressive, I install AviSynth 2.5.5 and:
B=LeakKernelBob(Order=1)#if TFF
SmartDecimate(24,60,B,Tel=0.25)
TDeint(Full=False)
You can use one of those slow-as-molasses-in-January Smart Bobbers if you prefer. You'll have to be the judge as to whether or not the formerly 30fps interlaced video plays smoothly enough for you. It kind of depends on what's going on in the source. For talking heads and interviews, it's great. For video moving at a certain speed, sometimes not so great. No blends/ghosts, though. Shouldn't be any left over interlacing, either.
Mug Funky
8th November 2006, 06:10
the corporation was made on a budget, and lots of the film parts are stock from archive.org...
if you must have progressive, i'd be inclined to either follow foxy's advice, or favour the video parts by deinting to 30p, either by blending or regular single-field deinterlacing. leakkerneldeint should be enough.
with this title, it's not the visuals that matter - it's what they say.
btw, enjoy the 7+ hours of extras...
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.