digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: Chroma Shift (http://www.digitalfaq.com/archives/avisynth/13795-avisynth-chroma-shift.html)

dvdreasy 09-10-2005 09:06 AM

Chroma Shift
 
Hi,

I'm using VirtualDub to capture AVI from my 8mm camcorder.
Then process the clip with AVISYNTH + CCE.

script.avs:
Code:

LoadPlugin("C:\Program Files\DVD2AVIDG\MPEG2DEC3.DLL")
AVISource("D:\teste.avi",audio=false)
ConvertToYUY2(interlaced=true)
addaudio()

the final result have a litle chroma shift specialy in strong colors (RED, YELLOW,etc)

I allready tried :
Code:

LoadPlugin("C:\Program Files\DVD2AVIDG\MPEG2DEC3.DLL")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\ChromaShift.dll")
AVISource("D:\teste.avi",audio=false)
ConvertToYUY2(interlaced=true)
ChromaShift(C=-6)
addaudio()

But, I still notice chroma shift efects!

Is there any other way I can solve this ?

Thanks.

incredible 09-10-2005 10:17 AM

Screenshot please! ;)

( www.imageshack.us )

dvdreasy 09-10-2005 10:52 AM

Here is the Screenshot

http://www.digitalfaq.com/archives/error.gif

kwag 09-10-2005 11:32 AM

Have you tried separating the fields before filtering, just to see the result :?:

-kwag

incredible 09-10-2005 11:40 AM

Does that phenomenom already occur when just loaded using Avisource() and no other filters applied?

To me it seems the error already comes from the camcorder/pc transfer?!

Thats not only chromashift but the chroma is totally blurred.

kwag 09-10-2005 11:51 AM

I suspect this is an interlaced issue. Look carefully at the jagged lines on the stair rails :!:

-kwag

dvdreasy 09-10-2005 12:03 PM

Quote:

Originally Posted by incredible
Does that phenomenom already occur when just loaded using Avisource() and no other filters applied?

Yes, it does.

Quote:

Originally Posted by incredible
To me it seems the error already comes from the camcorder/pc transfer?!
Thats not only chromashift but the chroma is totally blurred.

The camcorder is a SAMSUNG VP-A30 (Analog).
The TV CARD is a Conexant's BTPCI WDM Video Capture (Generic Driver)

Virtual DUB settings :
------------------------
Video Source - Video Composite
Video Format - 720 x 576 YUY2
Video Compression - HuffYuv V2.1.1
Video Filter - none

The blurred effect is notice in the captured AVI file.

Any advice on captured method or, with this "poor" TV card, this is the best that I can have ?

Thanks !

incredible 09-10-2005 05:50 PM

Try capturing 704x576! As the standard BT drivers usually dont capture "true" 720. You can see that IF at a 720 capture there dontt exist 8pix Black borders each on the right and leftside of the capture. If they do exist, then 720 is ok.
I do ask cause if you dont capture in drivers native active width, then the driver scales, means ... it could be responsable for such a result, .... just test it.

dvdreasy 09-11-2005 12:35 PM

Tried at 704x576, but the result is exactly the same :cry:

After a litle search, I found this BT8x8 Tweaker http://www.doom9.org/index.html?/cap...t_tweaker.html

I played around with the settings, but . . . I donīt see big diferences (if any)

Any more advices ?

Thanks

Boulder 09-11-2005 12:45 PM

Try reducing saturation, the colors look oversaturated to my eyes. The colors are actually bleeding left and right, there's not much you can do about it. Unfortunately composite signal is the worst you can get :(

EDIT: I just remembered this:

Code:

Function FixChromaBleeding (clip input) {

  # prepare to work on the V channel and reduce to speed up and filter noise
  area = input.tweak(sat=4.0).VtoY.ReduceBy2

  # select and normalize both extremes of the scale
  red = area.Levels(255,1.0,255,255,0)
  blue = area.Levels(0,1.0,0,0,255)

  # merge both masks
  mask = MergeLuma(red, blue, 0.5).Levels(250,1.0,250,255,0)

  # expand to cover beyond the bleeding areas and shift to compensate the resizing
  mask = mask.ConvertToRGB32.GeneralConvolution(0,"0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0").ConvertToYV12

  # back to full size and binarize (also a trick to expand)
  mask = mask.BilinearResize(Width(input),Height(input)).Levels(10,1.0,10,0,255)

  # prepare a version of the image that has its chroma shifted and less saturated
  input_c = input.ChromaShift(C=-4).tweak(sat=0.8)

  # combine both images using the mask
  return input.overlay(input_c,mask=mask,mode="blend",opacity=1)
}

It's from this thread: http://forum.doom9.org/showthread.php?t=77074

dvdreasy 09-12-2005 08:32 PM

Boulder, You were right :!:

I reduce the saturation and now the image look much better :wink:

Also, I'm now using this script (as discussed in http://www.kvcd.net/forum/viewtopic.php?t=15826) and HC encoder

Code:

AVISource("D:\teste2.avi")
LeakKernelBob(order=1,sharp=true,threshold=7)
ConvertToYV12()
#LanczosResize(720,576,8,0,704,576) 
Undot()
RemoveGrain()
Cnr2()
Deen()
Letterbox(16,16,16,16)
AssumeBFF()
SeparateFields()
SelectEvery(4,1,2)
Weave()

... and the picture looks like this :

http://www.digitalfaq.com/archives/error.gif

Thanks to ALL !

Cheers,

Pedro


All times are GMT -5. The time now is 05:46 PM  —  vBulletin Đ Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.