Log in

View Full Version : Deinterlace blended fields


binba
9th July 2016, 07:11
I've been trying to clean up this 29.97i DVD source, and I know Avisynth is just the tool for the job.

https://drive.google.com/open?id=0BySSttb273SQbHBHcmdsR2kwSzQ
(Direct stream copy from MPEG2Source of the DVD. Download button is at the top.)

I spent about 4 hours on this, with no success. Maybe you can point me in the right direction: which plugins to try in which modes?

Field pattern seems to be: BCBCBCDBCBCD (groups of 6 frames)
Where B=Blended field C=Clean field and D=duplicate of preceding field

To be clear, by "blended fields" I don't mean progressive blended frames... but that if you separate fields you'll find every "B" field has 2 frames/fields blended in it.

Seems like I need a combination of deblend and decimate. The original film is likely 25p, although 25i and 23.976 are also possible.


TIVTC seemed to help but doesn't really deal with deblending.
FixBlendIVTC gave me an error about mismatched movie durations.
Srestore seem to do some promising things but only when it threw out half the legitimate frames (for a 12.5fps output); I understand it expects a progressive video and not i / separated fields.
QTGMC didn't work with my 64bit distro (my bad, I know)
Scharfis` little hack from 11 years ago (http://forum.doom9.org/showthread.php?t=97447) helped a lot, but it seems to throw away data? I'm seeing inconsistent spatial sharpness, and more temporal sharpness than expected (the camera shutter speed looks like 1/100s) which makes me wonder if the original was 50i and temporal information gets thrown away in this method.


Thanks

manono
9th July 2016, 09:19
QTGMC didn't work with my 64bit distro (my bad, I know)

Install 32bit AviSynth and 32bit VDub.

yadif(Order=1,Mode=1)###or the better QTGMC
SRestore()
Direct stream copy from MPEG2Source of the DVD.
Which means it's unnecessarily uncompressed, a hugely bloated file size. Next time cut the M2V in DGIndex using the [ and ] buttons and File->Save Project File and Demux Video.

kuchikirukia
9th July 2016, 19:48
assumetff()
qtgmc()

binba
10th July 2016, 01:28
Install 32bit AviSynth and 32bit VDub.

I was half sarcastic when I said "my bad" for using inferior 64-bit code. ;-) But yeah, I know things only half-work in AviSynth 64bit world.


yadif(Order=1,Mode=1)###or the better QTGMC
SRestore()

Which means it's unnecessarily uncompressed, a hugely bloated file size. Next time cut the M2V in DGIndex using the [ and ] buttons and File->Save Project File and Demux Video.

It's a ~100MB file, just a few seconds. I used in & out points in Vdub. How is this any different?

manono
10th July 2016, 01:55
It's a ~100MB file, just a few seconds. I used in & out points in Vdub. How is this any different?
It's maybe 20 (?) times larger than necessary. It's an uncompressed RGB AVI, while straight from the DVD it's a much smaller VOB or M2V (video only) file. From the DVD the M2V might be 5MB (or less). Less work to create, faster to upload, faster to download. You're the one asking for help and you should make it as easy as possible for those willing to help.

If your problem is QTGMC, there are other bobbers available. I mentioned Yadif. And YadifMod is quite good using a script something like this (also requires NNEDI3):

YadifMod(mode=1, edeint=nnedi3(field=-2))
SRestore()

hello_hello
10th July 2016, 03:10
Doesn't the 64 bit version of StaxRip come with QTGMC these days? It may require VapourSynth though. I'm not sure.

binba
10th July 2016, 20:03
It's maybe 20 (?) times larger than necessary. It's an uncompressed RGB AVI

<Bangs head on desk> My bad. I thought that Direct stream copy would essentially rewrap, preserving the codec. Of course if it's from Avisynth all Vdub sees is an uncompressed stream. I'll upload a fixed one tonight, if only to right the wrong.

Thanks for the suggestions, will try them tomorrow when I'm back at this project.