Quantcast Avisynth: Chroma Shift - digitalFAQ.com Forums [Archives]
  #1  
09-10-2005, 09:06 AM
dvdreasy dvdreasy is offline
Free Member
 
Join Date: May 2004
Location: Portugal
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
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.
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-2005, 10:17 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
Screenshot please!

( www.imageshack.us )
Reply With Quote
  #3  
09-10-2005, 10:52 AM
dvdreasy dvdreasy is offline
Free Member
 
Join Date: May 2004
Location: Portugal
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Here is the Screenshot

Reply With Quote
  #4  
09-10-2005, 11:32 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
Have you tried separating the fields before filtering, just to see the result

-kwag
Reply With Quote
  #5  
09-10-2005, 11:40 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
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.
Reply With Quote
  #6  
09-10-2005, 11:51 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
I suspect this is an interlaced issue. Look carefully at the jagged lines on the stair rails

-kwag
Reply With Quote
  #7  
09-10-2005, 12:03 PM
dvdreasy dvdreasy is offline
Free Member
 
Join Date: May 2004
Location: Portugal
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
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 !
Reply With Quote
  #8  
09-10-2005, 05:50 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
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.
Reply With Quote
  #9  
09-11-2005, 12:35 PM
dvdreasy dvdreasy is offline
Free Member
 
Join Date: May 2004
Location: Portugal
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Tried at 704x576, but the result is exactly the same

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
Reply With Quote
  #10  
09-11-2005, 12:45 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
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
Reply With Quote
  #11  
09-12-2005, 08:32 PM
dvdreasy dvdreasy is offline
Free Member
 
Join Date: May 2004
Location: Portugal
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Boulder, You were right

I reduce the saturation and now the image look much better

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 :



Thanks to ALL !

Cheers,

Pedro
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
FFMPEG: Clicking Chroma in ffvfw poerschr Video Encoding and Conversion 1 02-19-2004 05:28 PM
Avisynth open failure: Crop: you cannot use crop to enlarge or 'shift' a clip nicksteel Avisynth Scripting 0 11-22-2003 06:10 PM
Avisynth: Script changes the chroma blur? CheronAph Avisynth Scripting 4 09-22-2003 02:25 PM
Avisynth: Is the blur luma/chroma in the MA script needed with high CQs? audi2honda Avisynth Scripting 1 08-27-2003 03:40 AM
Avisynth: Merge Chroma/Luma encoding time? telemike Avisynth Scripting 12 06-04-2003 08:07 AM

Thread Tools



 
All times are GMT -5. The time now is 06:16 AM  —  vBulletin Đ Jelsoft Enterprises Ltd