Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 28th December 2002, 17:43   #1  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Impossible clips (both telcined film and true interlaced video mixed)

I have some clips of a TV show that I capped.

Part of the show is telcined film and part is true 29.97fps interlaced video (meaning an IVTC doesn't work). Essentially one of the cameras was film while the rest were video. So the style of footage changes pretty frequently.

According to decomb I should use Telcide() and decimate(mode=1). That makes the stuff shot on film look fine, but the stuff shot on video that is truely interlaced looks a little iffy. I've tried every trick I know and I would rather not do a "blend" on the whole clip.

What other options do I have?

Stereodude
Stereodude is offline   Reply With Quote
Old 28th December 2002, 17:54   #2  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Re: Impossible clips (both telcined film and true interlaced video mixed)

Quote:
Originally posted by Stereodude
According to decomb I should use Telcide() and decimate(mode=1). That makes the stuff shot on film look fine, but the stuff shot on video that is truely interlaced looks a little iffy. I've tried every trick I know and I would rather not do a "blend" on the whole clip.
Mode 1 with the right threshold should not make the interlaced parts "iffy".

I am working on a new solution where the interlaced parts are decimated to 24fps as would be done by ConvertFPS(), while the film parts are IVTC'ed normally. Look for a new release of Decomb to have that soon.
Guest is offline   Reply With Quote
Old 28th December 2002, 19:23   #3  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Re: Re: Impossible clips (both telcined film and true interlaced video mixed)

Quote:
Originally posted by neuron2
Mode 1 with the right threshold should not make the interlaced parts "iffy".

I am working on a new solution where the interlaced parts are decimated to 24fps as would be done by ConvertFPS(), while the film parts are IVTC'ed normally. Look for a new release of Decomb to have that soon.
Well I guess I should clarify. There isn't a whole lot of motion in parts of the clip, so what happens is during the true interlaced part of the clip (virtually no motion) when ideally I would like decimate to leave those frames alone it creates new frames that reduce the sharpness of the clip. The problem is those frames are too similar to the repeated frame you get from telecide.

I think I found away around it though. It's rather time intensive though. I'll post the script. Essential I'm only processing the "FILM" sections of the clip in telecide and decimate now. Crude, but it works.
Code:
LoadPlugin("c:\HDTV Tools\mpeg2dec\MPEG2DEC3.dll")
LoadPlugin("c:\HDTV Tools\decomb\decomblegacy.dll")
v1=mpeg2source("d:\faith\faith_01.d2v",idct=5,cpu=4,
iPP=true,moderate_h=20,moderate_v=40)

v2=trim(v1,0,1292)
v3=telecide(v2)
v4=decimate(v3,mode=1,quality=3)
v5=SeparateFields(v4)
v6=SelectOdd(v5)

v12=trim(v1,1293,8438)
v13=SeparateFields(v12)
v14=SelectOdd(v13)

v22=trim(v1,8439,9876)
v23=telecide(v22)
v24=decimate(v23,mode=1,quality=3)
v25=SeparateFields(v24)
v26=SelectOdd(v25)

v32=trim(v1,9877,10021)
v33=SeparateFields(v32)
v34=SelectOdd(v33)

v42=trim(v1,10022,10167)
v43=telecide(v42)
v44=decimate(v43,mode=1,quality=3)
v45=SeparateFields(v44)
v46=SelectOdd(v45)

v52=trim(v1,10168,11367)
v53=SeparateFields(v52)
v54=SelectOdd(v53)

v62=trim(v1,11368,11684)
v63=telecide(v62)
v64=decimate(v63,mode=1,quality=3)
v65=SeparateFields(v64)
v66=SelectOdd(v65)

v72=trim(v1,11685,12636)
v73=SeparateFields(v72)
v74=SelectOdd(v73)

v82=trim(v1,12637,13023)
v83=telecide(v82)
v84=decimate(v83,mode=1,quality=3)
v85=SeparateFields(v84)
v86=SelectOdd(v85)

v92=trim(v1,13024,13902)
v93=SeparateFields(v92)
v94=SelectOdd(v93)

v102=trim(v1,13903,13968)
v103=telecide(v102)
v104=decimate(v103,mode=1,quality=3)
v105=SeparateFields(v104)
v106=SelectOdd(v105)

v112=trim(v1,13969,14189)
v113=SeparateFields(v112)
v114=SelectOdd(v113)

v122=trim(v1,14190,14700)
v123=telecide(v122)
v124=decimate(v123,mode=1,quality=3)
v125=SeparateFields(v124)
v126=SelectOdd(v125)

final=crop(v6 + v14 + v26 + v34 + v46 + v54 + v66 +v74 + v86 + v94 +
v106 + v114 + v126, 4, 0, -6, -6)
return (final)
This would have been really simple if NBC didn't swap field order several times during the show. Then I could have just dropped all the odd (or even depending on their order) fields.

Stereodude

Last edited by Guest; 28th December 2002 at 19:52.
Stereodude is offline   Reply With Quote
Old 28th December 2002, 20:01   #4  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
There's no need to do it with scripting. Decomb's manual control is easier. For example, to pass through untouched a section of interlaced video, you can use this override file:

200,750 c
200,750 -

That would totally pass through frames 200 through 750. To leave the original field matches but apply deinterlacing:

200,750 c
200,750 +

But anyway, you are always throwing away a field. What is the point of applying Telecide? Throwing away a field is guaranteed to decomb anything.

Last edited by Guest; 28th December 2002 at 20:09.
Guest is offline   Reply With Quote
Old 28th December 2002, 20:05   #5  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Here's an example of what I'm talking about. The difference in the two frames was a metric of .20% There are frames that are really identical in the telcined portion of the video that have a higher metric, so I can't fix the issue with the threshold.

These are all the same 3 frame numbers (2003, 2004, 2005)

[Sorry, you'll have to click the links. I didn't know image tags didn't work when I wrote the post.]


"Raw" footage


Footage after telecide and decimate


End footage (from RAW) after discard 2nd field, and resize (blown up 200%)


End footage (from telecide and decimate) after resize (blown up 200%)

You should be able to see the blending in the one that has been run through telecide and decimate. Look specifically at her eyes and the area around the drummer's drum stick. In some scenes the blending causes is far more pronouced (I'll try to find an example and it causes motion to look jerky at times. It also looks a little odd when you get slightly blurier frames every so often.

Stereodude
Stereodude is offline   Reply With Quote
Old 28th December 2002, 20:08   #6  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
OK, I see now. Thank you for the data. I am working in this area right now and your report is valuable to me.

But still, aren't you throwing away the even fields? If so, why bother with Telecide?
Guest is offline   Reply With Quote
Old 28th December 2002, 20:11   #7  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Quote:
Originally posted by neuron2
But anyway, you are always throwing away a field. What is the point of applying Telecide? Throwing away a field is guaranteed to decomb anything.
NBC changed the field order all over the place (inside the telcine'd sections). As a result if you always pick odd sometimes you get repeated frames, sometimes you get 29.97 unique frames a second. So I had to do the telecide to get rid of the repeated frames that occured some of the time when the field order was inverted.

When I originally processed this I did not discard half the fields. I only did a resize. I am discarding half the fields now because I do not want to do a blend de-interlace on the interlaced portion of the video and I can't come up with any other way to make sure all the sections return the same size video (I greatly dislike AVIsynth's resizing in YUY2 mode, and the fact that it's about 4x as slow as VirtualDub in RGB mode)

Stereodude

Last edited by Guest; 28th December 2002 at 20:17.
Stereodude is offline   Reply With Quote
Old 28th December 2002, 20:15   #8  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Thanks, great info, much appreciated.

I am working in just this area now and hope to have a better solution soon.
Guest is offline   Reply With Quote
Old 28th December 2002, 20:22   #9  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Neuron2,

You're welcome.

I take your earlier comment to mean that I could handle this video differently as well? I could do a decimate mode=0 and then use ConvertFPS() to change the interlaced portion to 23.976fps?

I think that might cause problems where I switch "methods" in the script though. What do you think?

Stereodude
Stereodude is offline   Reply With Quote
Old 28th December 2002, 20:31   #10  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally posted by Stereodude
I take your earlier comment to mean that I could handle this video differently as well? I could do a decimate mode=0 and then use ConvertFPS() to change the interlaced portion to 23.976fps?
No, because Decimate already changes everything to 23.976.

When using a method that leaves it at 29.97, we want to do the blends as with mode=1 but restrict it to film portions (those in an active pulldown pattern).

When using a method that leaves it at 23.976, we want to treat the film portions as normally (IVTC), and apply a blend decimation to the non-film portions (as done by ConvertFPS when going 30->24).

I am making a version of Decomb that supports both of these.
Guest is offline   Reply With Quote
Old 28th December 2002, 22:49   #11  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Quote:
Originally posted by neuron2
There's no need to do it with scripting. Decomb's manual control is easier. For example, to pass through untouched a section of interlaced video, you can use this override file:

200,750 c
200,750 -
Thanks for this tip. I did the 2nd section of the show this way and it was a lot easier.

Stereodude
Stereodude is offline   Reply With Quote
Old 28th December 2002, 22:52   #12  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Quote:
Originally posted by neuron2
No, because Decimate already changes everything to 23.976.

When using a method that leaves it at 29.97, we want to do the blends as with mode=1 but restrict it to film portions (those in an active pulldown pattern).

When using a method that leaves it at 23.976, we want to treat the film portions as normally (IVTC), and apply a blend decimation to the non-film portions (as done by ConvertFPS when going 30->24).

I am making a version of Decomb that supports both of these.
I mean in my scripted version. Only for the portions that I'm not applying the decimate to, but now I see that this method involves blending, so I guess I'll pass.

Stereodude
Stereodude is offline   Reply With Quote
Old 29th December 2002, 09:43   #13  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Quote:
Originally posted by Stereodude
Thanks for this tip. I did the 2nd section of the show this way and it was a lot easier.

Stereodude
Actually after look closer this isn't any real help. Unfortunately the same manual control script doesn't work for decimate. There is no way to force decimate to steer clear of said frames. Decimate's overide control only allows you to target certain frames for removal which is not what I'm looking to do. It seems I have to do it in long scripting form.

Stereodude

Last edited by Stereodude; 29th December 2002 at 15:54.
Stereodude is offline   Reply With Quote
Old 29th December 2002, 17:35   #14  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
I have just put a version of Decomb here that might help you:

http://forum.doom9.org/showthread.ph...943#post231943

It will allow you to avoid getting the blends on your video segments. Please advise if this helps your situation.

Just set guide=1 and be sure that Decimate immediately follows Telecide in the script.
Guest is offline   Reply With Quote
Old 29th December 2002, 19:22   #15  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Quote:
Originally posted by neuron2
I have just put a version of Decomb here that might help you:

http://forum.doom9.org/showthread.ph...943#post231943

It will allow you to avoid getting the blends on your video segments. Please advise if this helps your situation.

Just set guide=1 and be sure that Decimate immediately follows Telecide in the script.
Don,

I'm still using AVIsynth 2.07, so I'm not able to get the plugin to work. I can't seem to find a compile of v2.5 (at least a free one). If you can point me in the right direction I'll be happy to try this new version of decomb out.

Stereodude

Edit: Ok, I found a link in the sticky http://cultact-server.novi.dk/kpo/av...nth_alpha.html , but the site it points to is down. Is there someplace else to get it?

Last edited by Stereodude; 29th December 2002 at 19:27.
Stereodude is offline   Reply With Quote
Old 29th December 2002, 19:31   #16  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
I'm attaching the 12-17 build.
Guest is offline   Reply With Quote
Old 29th December 2002, 20:46   #17  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Don,

Is this what you meant?
Code:
LoadPlugin("c:\HDTV Tools\mpeg2dec\MPEG2DEC3_2.5.dll")
LoadPlugin("c:\HDTV Tools\decomb\Decomb_406b2.dll")
mpeg2source("d:\faith\faith_04.d2v",idct=5,cpu=4,iPP=true,moderate_h=20,moderate_v=40)
Telecide(guide=1,ovr="faith_04.ovr")
Decimate(mode=1,quality=3,show=true)
I think there is a problem.

Here is beginning of the .ovr file. It is in the same directory as the avs file also.
Code:
811,845 c
811,845 -
972,7707 c
972,7707 -
8399,8538 c 
8399,8538 -
8781,8882 c
8781,8882 -
8930,8963 c
Here's frame 1015

Unless I'm mistaken it shouldn't be doing anything to frame 1015 because telecide is told to leave it alone and decimate should be getting a flag from telecide to ignore it. Correct?

Stereodude
Stereodude is offline   Reply With Quote
Old 30th December 2002, 06:13   #18  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Your link is broken so I have no idea what your current problem is.

What I gave you is controlled by Telecide's decision about whether a frame is part of a 3:2 sequence (film) or is not (video). Regions believed to be video will not get the blending of Decimate(mode=1), regardless of its threshold. This should greatly improve the situation regarding your original complaint, which was that video sections were being blended by Decimate(mode=1). You won't need an overrides file; it will be done automatically.

If you are reporting a different problem now, please explain it clearly in text, or directly attach your jpegs. Thank you.

Last edited by Guest; 30th December 2002 at 06:56.
Guest is offline   Reply With Quote
Old 30th December 2002, 06:22   #19  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
OK, I tried to guess what the JPEG would show.

Let's suppose it shows a blended frame from a range you told Telecide() to ignore. It can only be that Telecide thought it was a film frame.

How about this...? Can you make available the clip that shows the problem, I can work directly on it. I am keen to get it as handling of hybrid material desperately needs better solutions. Please advise.
Guest is offline   Reply With Quote
Old 30th December 2002, 07:38   #20  |  Link
scmccarthy
Registered User
 
Join Date: Oct 2002
Posts: 462
@neuron2

Sh0dan already posted a newer version of AviSynth 2.5a in this thread:
http://forum.doom9.org/showthread.php?s=&threadid=41584
Stephen
scmccarthy is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:07.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.