Quantcast Recording Video: Capturing Interlaced + Filters - digitalFAQ.com Forums [Archives]
  #1  
09-10-2004, 09:11 AM
ginoboy ginoboy is offline
Free Member
 
Join Date: Apr 2004
Posts: 922
Thanks: 0
Thanked 0 Times in 0 Posts
Hi,

I began to do captures, and I am wanting to codify interlaced, for that I am using the script:

Code:
captura="capture1_huffyuv.avi"

avisource(captura)
JDL_UnfoldFieldsVertical(true)
JDL_FoldFieldsVertical(true)
letterbox(16,16,16,16)
converttoyuy2()
I also changed the configurations in CCE, I incapacitated "progressive frame flag", in "block scanning order" I put "alternate" and in "video -> offset line" changed for 0.

I am capturing with huffyuv in 704x480 -> YUY2 (my capture card is a bt87. I wanted to know a GOOD script to remove noises among other parameters to improve the image and compression. I will pass for KDVD.

All of the parameters to codify interlaced they are right?

Thanks.
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
09-10-2004, 10:00 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Can you tell us where you find these "JDL_*" fonctions ?
Reply With Quote
  #3  
09-22-2004, 05:14 PM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
@ Phil

http://www.avisynth.org/stickboy/




@ Ginoboy

Unfolding/folding fields does make ONLY sense when filtering interlaced inputs! So if you do NOT put any filters between these Xfoldfields commands, they are useless.
Reply With Quote
  #4  
09-23-2004, 02:07 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
For some tips, see http://www.kvcd.net/forum/viewtopic.php?t=13768 .
Reply With Quote
  #5  
11-07-2004, 11:59 AM
ginoboy ginoboy is offline
Free Member
 
Join Date: Apr 2004
Posts: 922
Thanks: 0
Thanked 0 Times in 0 Posts
Hi, i'm back.. Thank's for reaply's

please, verify for me:

Quote:
AviSource("captura_vhs (2004-11-07 at 13-50-59).avi",false)

KernelBob(order=1,sharp=true,threshold=7)
AssumeFrameBased()

crop(8,0,696,480)

removegrain(mode=

addborders(12,0,12,0)
letterbox(12,12,0,0)

ConverttoYUY2()
AssumeBFF()
SeparateFields()
SelectEvery(4,1,2) # SelectEvery(4,0,3) for bottom field first video
Weave()
he is correct?

it seems to have been..

somebody recommends good filters to me for VHS capture of average quality (average for good)?

thanks!
Reply With Quote
  #6  
11-07-2004, 12:13 PM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
Your script looks OK to me, for some more filtering try this:

Code:
AviSource("captura_vhs (2004-11-07 at 13-50-59).avi",false) 

KernelBob(order=1,sharp=true,threshold=7) 
AssumeFrameBased() 

removegrain(mode=2)
crop(8,0,696,480) 
CNR2()
TemporalSoften(2,5,5,15,2)

addborders(12,0,12,0) 
letterbox(12,12,0,0) 

#ConverttoYUY2()  # your capture is already in YUY2 so this is not needed
AssumeBFF() 
SeparateFields() 
SelectEvery(4,1,2) # SelectEvery(4,0,3) for bottom field first video 
Weave()
You'll need the CNR2 plugin, www.avisynth.org/warpenterprises . Get the v2.61, it's the only one that will work. KernelDeint was also updated today, http://gast3.ssw.uni-linz.ac.at/~kp/...eint_1.5.2.zip

You might also want to check if the chroma is shifted, which it probably is because you have a VHS capture. http://www.doom9.org/capture/chroma_artefacts.html
Reply With Quote
  #7  
11-07-2004, 03:32 PM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
These days I encountered a VERY big Problem with the Remove series!

I treated "Fahrenheit 9/11" as capture for a mpeg2 encoding.

It was broadcasted as a fieldblended conversion directly from a telecined 29.97 state to 25.000 PAL.
I could have used Restore24() but for me actually fieldblended restorings to progressive via restore24() is actually no more an issue as Its ok if these kind of catures do fit on one CD in a extreme good quality. And as we do encode to mpeg2 for TV Purposes, a interlaced keeped encoding is ok for me.

Now the problem:

These Remove... Filters do mess up when interlaced stuff is delivered! Do check a station Logo, ... I tried a lot of changes in the script but it doesnt helped. Did you also encountered such Problems??


BTW: In the script above I wouldn't do the bobber using Kerneldeint() as you only perform an anti noise treatment. For that denoising routines you should ONLY use a "stupid" bob. As that bob() doesnt enhance captured artifacts like noise etc.

So a....

bob()
DenoiseingFiltersHere()
separatefields().selectevery(4,0,3).weave() # 4,1,2 for F'order change
KernelBob(...)
ResizingFiltersHere()
separatefields().selectevery(4,1,2).weave() # or 4,0,3 for F'order change

;-)
Reply With Quote
  #8  
11-07-2004, 03:40 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Inc,

Wouldn't it be better to change:

ResizingFiltersHere()
separatefields().selectevery(4,1,2).weave() # or 4,0,3 for F'order change


To:

separatefields().selectevery(4,1,2).weave() # or 4,0,3 for F'order change
ResizingFiltersHere()

At the end ot the script

-kwag
Reply With Quote
  #9  
11-07-2004, 04:40 PM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
No, because the material is reinterlaced..and resizing an interlaced video is a no-no

I use KernelBob because it keeps more details. A stupid bob bobs everything whereas a smart bob leaves the non-combed parts intact and treats them as if they were progressive. You might want to ask Scharfi about detailed explanations as he's tested these things a lot.

A softer bob would be TMCBob() or KernelBob with sharp=false parameter. I have used only RemoveGrain lately with mode=1 or 2, fed with smartbobbed video but I haven't noticed anything strange. I'll have to check that tomorrow, I've got one capture clip to be processed.

Actually someone said that Bob() is lossless only if b=0, that is Bob(0,x). The defaults are Bob(1/3,1/3). That might be worth remembering
Reply With Quote
  #10  
11-07-2004, 05:09 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Boulder
No, because the material is reinterlaced..and resizing an interlaced video is a no-no
Too tired here
The screen letters are getting mixed up

-kwag
Reply With Quote
  #11  
11-07-2004, 06:54 PM
ginoboy ginoboy is offline
Free Member
 
Join Date: Apr 2004
Posts: 922
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Boulder
]You might also want to check if the chroma is shifted, which it probably is because you have a VHS capture. http://www.doom9.org/capture/chroma_artefacts.html
Ok, thanks... in this picture:



it observes the red shirt, these pink risks would be "chroma's shifted" ?

I tested some filters cited in link, but I did not perceive difference....

what it would be this?

@ Inc

about: http://www.vmesquita.com/forum/index.php?topic=66.15

for NTSC, pixelview bt878 (driver's btwincap WDM) and huffyuv codec, the correct resolution to capture would be 704x480?

thank's all....
Reply With Quote
  #12  
11-08-2004, 02:14 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
Quote:
Originally Posted by Boulder
I use KernelBob because it keeps more details. A stupid bob bobs everything whereas a smart bob leaves the non-combed parts intact and treats them as if they were progressive. You might want to ask Scharfi about detailed explanations as he's tested these things a lot.
Yep I know and I also understood it like you do.
But Scharfi at Gleitz.de explained me/us that in case of a denoising a stupid bobber like bob() does it better as ...

bob().separatefields().selectevery(4,0,3).weave()

is a NOP And denoising in an untouched condition would be the best.
Resizing is another issue where a smart bobber is shurely a better choice, thats why I "quoted" that 2 bibbing-example from gleitz.de.

Quote:
Actually someone said that Bob() is lossless only if b=0, that is Bob(0,x). The defaults are Bob(1/3,1/3). That might be worth remembering
Yep! I would like to "understand" these kernels of 1/3,1/3 and 0,0.6 and so on .... as you can apply a lot of effects by choosing a specific one like a more bluring procedure.
Like that gauss() function from MugFunky, as he downscales with that the iage to a quarter of it size and rescales it using a special kernel in bicubicresize so the blurring gots a very good quality one.

Thats also why there some ones have been asked for a medianBlur() function as Avisynth actually gots no high actig gaussian blur function, only that blur(1.5 or unfilter(-100,-100) or asharp with negative values used.



@ Ginboy

Where did you got these cropping/bordering parameters???
Code:
crop(8,0,696,480) 
...
...
addborders(12,0,12,0) 
letterbox(12,12,0,0) 
...
...
Seems a bit odd .....
At least you should process borders at MOD16.
Reply With Quote
  #13  
11-08-2004, 05:42 PM
ginoboy ginoboy is offline
Free Member
 
Join Date: Apr 2004
Posts: 922
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Inc,

I captured in 704x480...

Code:
crop(8,0,696,480)
I cut 8 pixels of the left to remove the black borders.

then he was 696x480...

Code:
addborders(12,0,12,0)
I added 12 pixels of border in left and 12 in the right to be with 720x480 and equal borders. 696+12+12=720.

and...

Code:
letterbox(12,12,0,0)
I "painted of black" that part that is with imperfections in low e also in top to be equal.

Final resolution = 720x480, no resize and a good overscan.

thank you very much!
Reply With Quote
  #14  
11-08-2004, 08:28 PM
fragmaster170 fragmaster170 is offline
Free Member
 
Join Date: Dec 2003
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
these may help, whatever you can do in Vdub can probably be done with avisynth.
http://www.doom9.org/index.html?/cap...artefacts.html
http://www.doom9.org/index.html?/cap...sing_vdub.html
Reply With Quote
  #15  
11-09-2004, 01:01 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
@ Ginoboy

Leave the 704x480 finally at 704x480 as its a d1 cropped compatible DVD format, NO need to force a 720 encoding afterwards of captured sources - no sense!

So

Avisource("Your704x480capture.avi")
Letterbox(16,16,16,16)

Does it all you need, means overlaying MOD16 based 16px all around for getting rid of border garbage and beside this applying the 16px around overscan area.
Reply With Quote
  #16  
11-09-2004, 01:09 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by incredible
@ Ginoboy

Leave the 704x480 finally at 704x480 as its a d1 cropped compatible DVD format, NO need to force a 720 encoding afterwards of captured sources - no sense!
And on top of that, add an overscan block, to gain even more compression

-kwag
Reply With Quote
  #17  
11-09-2004, 03:36 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
In deed Karl

Quote:
Originally Posted by Incredible
Letterbox(16,16,16,16)


Well only one "block" doesnt make that much sense (maybe a bit) as meg encoding at main level is done in 4:2:0 and there the chroma is half the resolution of luma (in both directions) and so you have to choose a 2blocks Overscan, so 16px each side as 16 devided by half chroma is 8 and thats the gain

EDIT!: Ahhh, you mean a resized overscan! Yep shurely in case of captures incl. black horiz. borders like 1.85:1 ones you will gain from even more compression - right!
Reply With Quote
  #18  
11-09-2004, 05:15 AM
the viking the viking is offline
Free Member
 
Join Date: Sep 2004
Location: Norway
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts
Hi,interesting things to read here,
Boulder wrote:
Code:
and resizing an interlaced video is a no-no
So thats why we resize in a deinterlaced mode.Resizing a interlaced video
will mess up the interlaced structure I read somewhere in this forum.
Then I guess we can say the same about cropping,only do that in deinterlaced mode If yes I may have understood something

So I made a test encoding yesterday with a stupid-bob before
de-noiseing and a smart-bob before resizing:
Code:
LoadPlugin("C:\programfiler\AviSynth 2.5\plugins\kerneldeint.dll") 
LoadPlugin("C:\Programfiler\AviSynth 2.5\plugins\RemoveGrain.dll") 
LoadPlugin("C:\Programfiler\AviSynth 2.5\plugins\STMedianFilter.dll") 
LoadPlugin("C:\programfiler\AviSynth 2.5\plugins\Cnr2.dll")
DirectShowSource("D:\Capture 768x576\Video 0.avi",fps=25) 
bob(0,0) 
AssumeFrameBased() 
RemoveGrain(mode=2) 
Crop(6,4,-6,-12) 
Cnr2()
STMedianFilter(3, 3, 1, 1 ) 
separatefields().selectevery(4,0,3).weave() # 4,1,2 for F'order change 
KernelBob(order=1,sharp=true,threshold=7) 
LanczosResize(688,560) #one block(resized)overscan 
AddBorders(16,8,16,8 ) 
AssumeBFF() 
ConvertToRGB24() # For TMPGEnc or VFAPI 
SeparateFields() 
SelectEvery(4,1,2) # SelectEvery(4,0,3) for bottom field first video 
Weave() 
Trim(6,1670)
and the results looks ok to me.One thing im not sure about is the
bob values:bob(0,0) Is this the way to do it lossless

Another question,I bought some hollywood-movies on VHS,
is it the same with this as with DVD,that 99% is framebased(progressive) film
I captured one of them("Trinity Is Still My Name" ),and could not see any combing effects at all.

thanks
-----------------------
viking
Reply With Quote
  #19  
11-09-2004, 05:20 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by the viking
Hi,interesting things to read here,
Boulder wrote:
Code:
and resizing an interlaced video is a no-no
So thats why we resize in a deinterlaced mode.Resizing a interlaced video
will mess up the interlaced structure I read somewhere in this forum.
Then I guess we can say the same about cropping,only do that in deinterlaced mode If yes I may have understood something
You can crop interlaced video, there's just a couple of things to remember. See the Avisynth docs' Crop section for them.

Quote:
One thing im not sure about is the
bob values:bob(0,0) Is this the way to do it lossless
It's lossless if the first value is zero, i.e. Bob(0,x) will be lossless. The parameters are the same(?) as in BicubicResize.

Quote:
Another question,I bought some hollywood-movies on VHS,
is it the same with this as with DVD,that 99% is framebased(progressive) film
I captured one of them("Trinity Is Still My Name" ),and could not see any combing effects at all.
That's correct. There's no difference between VHS and DVD on this matter. If the transfer has been done correctly, a Hollywood movie is in 99% of the cases progressive.
Reply With Quote
  #20  
11-09-2004, 05:56 AM
the viking the viking is offline
Free Member
 
Join Date: Sep 2004
Location: Norway
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts
Boulder wrote:
Code:
You can crop interlaced video, there's just a couple of things to remember. See the Avisynth docs' Crop section for them.
So I found this:

Code:
In order to preserve the data structure of the different colorspaces, the following mods should be used. You will not get an error message if they are not obeyed, but it may create strange artifacts. For a complete discussion on this, see DataStorageInAviSynth

In RGB:

width no restriction 

height no restriction if video is progressive 

height mod-2 if video is interlaced 

In YUY2:

width mod-2 

height no restriction if video is progressive 

height mod-2 if video is interlaced 

In YV12:

width mod-2 

height mod-2 if video is progressive 

height mod-4 if video is interlaced
So when I have a YUY2,interlaced video,I set "round to 2" both for
width and height in FitCD and the result will be correct.

But if I bob() the same video like the in the script of my last reply,
AviSynth threats it framebased(progressive),then I will need mod 2
for width and I have no restriction for height,right

thanks
-----------------
viking
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Recording Video: A little Guide for better capturing incredible Video Capturing / Recording 11 08-23-2006 08:23 PM
Recording Video: DScaler and capturing andybno1 Video Capturing / Recording 4 04-28-2003 11:09 AM
Recording Video: Advice on capturing conquest10 Video Capturing / Recording 4 04-13-2003 06:26 PM
Recording Video: Green in capturing andybno1 Video Capturing / Recording 10 04-06-2003 12:06 PM
which vcr to buy for recording/capturing video? rendalunit Video Capturing / Recording 3 09-10-2002 02:51 PM

Thread Tools



 
All times are GMT -5. The time now is 09:49 AM  —  vBulletin © Jelsoft Enterprises Ltd