Log in

View Full Version : Re-interlace: I wanna see those damn lines!


Mounir
17th October 2010, 10:25
I want to re-interlace a video that's been deinterlaced.I want to see the odd and even lines, i'm sure it's doable.
I need to recreate to look and feel even if it's "artificial" i don't care.

All suggestions are welcome

I'm starting with this:
http://img512.imageshack.us/i/22469773.jpg/


And i wanna get this :
http://img809.imageshack.us/i/30694212.jpg/

The video is 30fps progressive

GodofaGap
17th October 2010, 10:28
Is your progressive video double rate (50 or 60 fps)?

Didée
17th October 2010, 11:10
Pseudo interlacing: (progressive with phase shift)

source
doubleweave().selectodd()


True interlacing: (with motion compensation)

source
super = MSuper(pel=2)
bvec = MAnalyse(super, isb = true)
fvec = MAnalyse(super, isb = false)
MFlowFps(super, bvec, fvec, num=0, den=1) # num=0 doubles input fps
separatefields().selectevery(4,0,3).weave()

Those are the usual options when you've a clean progressive video.

However, from your screenshot it seems the source was deinterlaced by blending fields. This can't be undone, and so your milage will be limited.
In case it's an originally telecined source (3-2 pulldown) that has been deinterlaced, you'd first use FixBlendIVTC or Srestore with ppmode=something.

Mounir
17th October 2010, 11:12
Well i think i found out myself but it involves changing the fps 30> 23.976 and then in procoder i use the pulldown filter.
Original:
http://img241.imageshack.us/i/originald.jpg/

re-interlaced
http://img707.imageshack.us/i/reinterlaced.jpg/

When i watch it with PowerDVD 10 the result seems good, (correctly deinterlaced)

The video is 30fps

Didée
17th October 2010, 11:20
Seems you're neither fully aware of what you have, nor of what you want to do?

Mounir
17th October 2010, 11:35
It's been encoded for the web (deinterlaced and encoded as 29.97fps) and it most likely has been shot with cinema cameras (23.976fps).My goal is to put that on dvd for my viewing pleasure.Is it clearer now?

Didée
17th October 2010, 12:03
Probably you first need to use FixBlendIVTC to restore 30p blended telecine to 24p clean frames. Then you use pulldown (via DGPulldown, or maybe in Procoder if you have it) to put the progressive stream with pulldown flags on DVD.

BTW, this process does not involve "re-interlacing" at any point.

Mounir
17th October 2010, 13:02
Not sure about Fixblend, the images seems clean enough from what i can judge. I'll stick with tdecimate for now

Didée
17th October 2010, 13:13
You did not give enough information to get precise advise. One sole screenshot does not tell the story. Anyway, that one sole screenshot does show blending, hence that is what I based my assumptions on.

Mounir
17th October 2010, 17:33
It seems to have worked as i expected but i've forgotten something in the process: the sound part, now the sound is out of sync. Suggestions are welcome.
Edit:
I think i could use AssumeFPS(last.framerate/1.03,sync_audio=true) but the problem is don't know what's the number i should put instead of 1.03

Didée
17th October 2010, 17:39
Good to hear that it worked as you expected.

However, we don't know what you actually did.

Mounir
17th October 2010, 17:48
Well i used fixBlend + tdecimate and then used the pulldown filter in procoder like i said i would do.

Any suggestion for the sound part ?

Didée
17th October 2010, 17:58
Hmh, that's mysterious. FixBlendIVTC+TDecimate doesn't change play time (it changes fps, but overall playtime stays the same). Adding pulldown doesn't change playtime either ... at least it should not. DGPulldown surely doesn't. (Can't speak for what Procoder is doing, I'm not using payware.)

Did you check if the Avisynth output, before Procoder, is still in sync?

Mounir
17th October 2010, 18:16
I think you're right, i've done something wrong, i'm about to fix that as i type.

If you're interested this is the result i get:
1) (Sample,video only, 16mb, Mpeg2)
http://www.sendspace.com/file/cac01v
2) Original content (Sample, video only, 16mb, encoded in mpeg2 progressive for comparison)
http://www.sendspace.com/file/zzvngc

Didée
17th October 2010, 18:57
Ouch, that does not look good! If that is Procoder's pulldown, then it's bad. Let's hope it's just an unchecked checkbox, or something ...

Anyway, that is hard pulldown. Very compatible, but since this must be encoded interlaced, it's not so good for quality.

FWIW, it takes only two lines to make hard pulldown in Avisynth:
video # should be 23.976 progressive
ChangeFPS(60000,1001)
SeparateFields().SelectEvery(4,0,3).Weave()


The alternative is to encode 23.976 progressive, and use DGPulldown to add RFF flags for soft pulldown. (I.e. let the player make the field repeats during playback.)

Mounir
17th October 2010, 19:09
Yeah i think fixBlend introduced weird artefacts, i've noticed it in past projects. I will verify this right now.
Edit:
Confirmation
FixBlendIVTC
http://img294.imageshack.us/i/73748202.jpg/
No FixBlendIVTC
http://img534.imageshack.us/i/68975348.jpg/

I'm not gonna use this filter anymore...

Floatingshed
17th October 2010, 19:10
I'm confused. You want to re-interlace a de-interlaced source which was originally progressive film with 3:2 pulldown. Then watch it using powerdvd "correctly de-interlaced".
Are you not now back where you started?
Why not just watch the original 23.976 footage? Or will the answer to that get us into rule 6 territory?

Didée
17th October 2010, 19:40
Wohoo - yes. But that's not what I meant. The artifact you show is what can happen when trying to restore a missing clean frame B from two blendings "AB" and "BC". IIRC, both FixBlendIVTC and Srestore have postprocessing modes that try to reduce those artifacts.

But, what I meant with "bad pulldown" is this:

A "progressive" frame from Procoder's 3-2 pulldown output:
http://img139.imageshack.us/img139/2060/badpulldown.png

400% zoomed:
http://img689.imageshack.us/img689/6710/badpulldownzoom.png

That is not the fault of FixBlendIVTC. This is *halved resolution*, which will result when 3-2 pulldown is done *incorrectly*.

Try the suggested pulldown via Avisynth, to see how this is supposed to look correctly.

Mounir
17th October 2010, 20:14
FWIW, it takes only two lines to make hard pulldown in Avisynth:
video # should be 23.976 progressive
ChangeFPS(60000,1001)
SeparateFields().SelectEvery(4,0,3).Weave()

This looks interesting but it don't add much infos on the field dominance(top/bottom) or am i missing something ?
Edit: it does but i'm not sure which
I think i find out, we must use AssumeTFF() or AssumeBFF() before SeparateFields.
I'll try that

Didée
17th October 2010, 20:48
Shouldn't be needed, if the input is flagged correctly, so will the output. If you feel the need, add "AssumeTFF()" somewhere.

Important is to set the correct fieldorder in the encoder application.

Mounir
17th October 2010, 22:37
That's definitely better with your script didée, thanks for the help