VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 46
Thread
  1. Im trying to encode some DVD's of mine and I notice the color coming out of the black outlines. I believe this is called color bleeding.

    It looks like the color is a little too far to the right. here are a couple screenshots of what im talking about. Their clothing and skin colors bleed over the black outlines to the right.







    I saw someone trying to encode something long ago that had a similar issue as you can see in the picture below only it was bleeding to the left instead.





    Someone suggested to use an avisynth filter called chroma shift I believe.


    I dont know much about chroma shift and I havent used it before, could anyone assist me in getting the colors in their proper place so they are not bleeding to the right?

    Id like to fix this with avisynth. I think I just need to shift it to the left a couple pixels but Im not sure how to add it into my script.
    Quote Quote  
  2. If it's just one direction you can use chromashiftsp , you can try to sharpen and align the chroma with something like Mergechroma(awarpsharp2(depth=20))

    Adjust the depth setting to your tastes
    Quote Quote  
  3. Originally Posted by poisondeathray View Post
    If it's just one direction you can use chromashiftsp , you can try to sharpen and align the chroma with something like Mergechroma(awarpsharp2(depth=20))

    Adjust the depth setting to your tastes
    Do I have to sharpen the chroma to align it? I already sharpen the overall image with LSF, can it just be aligned to the left a bit without sharpening again?
    Quote Quote  
  4. Originally Posted by darkdream787 View Post
    Originally Posted by poisondeathray View Post
    If it's just one direction you can use chromashiftsp , you can try to sharpen and align the chroma with something like Mergechroma(awarpsharp2(depth=20))

    Adjust the depth setting to your tastes
    Do I have to sharpen the chroma to align it? I already sharpen the overall image with LSF, can it just be aligned to the left a bit without sharpening again?

    No you don't , but most people will like the results of sharpening the color borders as well. You can use ChromaShiftSP() alone to move the chroma in subpixels (SP=subpixel) without sharpening

    Try it out, you'll see shifting in 1 direction will often make other sections worse. In animation with 4:2:0 chroma, the color edges will often be blurred in all directions . If you shift it one direction, it makes the other edges worse


    If you get overlap on opposite borders with the mergechroma technique, you can temporarily add borders then crop them

    e.g.
    addborders(4,4,4,4)
    mergechroma(awarpsharp(depth=20))
    crop(4,4,-4,-4,true)
    Quote Quote  
  5. Originally Posted by poisondeathray View Post
    Originally Posted by darkdream787 View Post
    Originally Posted by poisondeathray View Post
    If it's just one direction you can use chromashiftsp , you can try to sharpen and align the chroma with something like Mergechroma(awarpsharp2(depth=20))

    Adjust the depth setting to your tastes
    Do I have to sharpen the chroma to align it? I already sharpen the overall image with LSF, can it just be aligned to the left a bit without sharpening again?

    No you don't , but most people will like the results of sharpening the color borders as well. You can use ChromaShiftSP() alone to move the chroma in subpixels (SP=subpixel) without sharpening

    Try it out, you'll see shifting in 1 direction will often make other sections worse. In animation with 4:2:0 chroma, the color edges will often be blurred in all directions . If you shift it one direction, it makes the other edges worse


    If you get overlap on opposite borders with the mergechroma technique, you can temporarily add borders then crop them

    e.g.
    addborders(4,4,4,4)
    mergechroma(awarpsharp(depth=20))
    crop(4,4,-4,-4,true)

    is this something I want to do before or after deinterlacing?
    Quote Quote  
  6. Originally Posted by darkdream787 View Post


    is this something I want to do before or after deinterlacing?
    You usually don't deinterlace anime .... If you mean IVTC, yes you do it after IVTC

    Try out both methods to see which you prefer. I think most people will prefer the mergechroma technique (color borders will be more crisp) .
    Quote Quote  
  7. Yes, the chroma needs to be shifted to the left by 2 pixels or so: ChromaShift(c=-2). Sharpening the chroma as poisondeathray suggested will help too.

    The chroma channels of the original (saturation pumped up to make them more visible):

    Click image for larger version

Name:	before.png
Views:	3442
Size:	321.5 KB
ID:	14104

    and after ChromaShift(c=-2).MergeChroma(aWarpSharp(depth=20)):

    Click image for larger version

Name:	after.png
Views:	3152
Size:	302.6 KB
ID:	14105
    Last edited by jagabo; 2nd Oct 2012 at 12:24.
    Quote Quote  
  8. Originally Posted by poisondeathray View Post
    Originally Posted by darkdream787 View Post


    is this something I want to do before or after deinterlacing?
    You usually don't deinterlace anime .... If you mean IVTC, yes you do it after IVTC

    Try out both methods to see which you prefer. I think most people will prefer the mergechroma technique (color borders will be more crisp) .
    I thought IVTC was a form of deinterlace so I called it deinterlace, but yeah IVTC is what I meant.

    thanks!!
    Quote Quote  
  9. Originally Posted by jagabo View Post
    Yes, the chroma needs to be shifted to the left by 2 pixels or so: ChromaShift(c=-2). Sharpening the chroma as poisondeathray suggested will help too.

    The chroma channels of the original (saturation pumped up to make them more visible):

    Image
    [Attachment 14104 - Click to enlarge]


    and after ChromaShift(c=-2).MergeChroma(aWarpSharp(depth=20)):

    Image
    [Attachment 14105 - Click to enlarge]

    How did you get those colors like that in the image? That could be useful for me.
    Quote Quote  
  10. Heres the result I got thanks to
    ChromaShift(c=-2)
    MergeChroma(aWarpSharp(depth=20))

    TOP = Before
    BOTTOM = After



    Quote Quote  
  11. you might consider using awarpsharp2 instead of awarpsharp - Look at the left and right frame edges in jagabo's 2nd picture, to the girl's right, there is a "wraparound" splotch from the other side of the frame where her left hair was? Likewise there is a blue patch on the opposite side of the frame where it shouldn't be. Whenever there are objects on the border edges, you might get artifacts otherwise

    I mentioned the addborders, crop method - that was if you use awarpsharp . Awarpsharp2 doesn't need addborders ,crop method
    Quote Quote  
  12. Is there any real difference between

    MergeChroma(aWarpSharp(depth=20))

    and

    MergeChroma(aWarpSharp2(depth=20))


    is awarpsharp2 any better to use?

    (Sorry poisondeathray, I didnt see your post before I posted this)
    Last edited by darkdream787; 2nd Oct 2012 at 15:02. Reason: Update
    Quote Quote  
  13. Originally Posted by darkdream787 View Post
    How did you get those colors like that in the image? That could be useful for me.
    I used ColorYUV to reduce the luma channel to a flat middle grey and doubled the saturation of the chroma channels:
    Code:
    ColorYUV(cont_y=-256, cont_u=256, cont_v=256)
    It's also useful to view the chroma channels as grey scale using UtoY() or VtoY().

    Code:
    StackHorizontal(ColorYUV(cont_u=-256, cont_v=-256),StackVertical(UtoY(),VtoY()))
    Click image for larger version

Name:	channels.png
Views:	344
Size:	290.5 KB
ID:	14106
    Last edited by jagabo; 2nd Oct 2012 at 15:09.
    Quote Quote  
  14. You can use awarpsharp2 for everything . awarpsharp can cause artifacts, even when not used with mergechroma . It's the reason why awarpsharp2 was written

    The only reason I keep the original function around is some older functions and plugins still use it as a pre-requisite
    Quote Quote  
  15. I have one last question at the moment.

    What would I use to shift chroma up and down incase it would ever need to to go up or down a couple pixels.

    Chromashift(c=-2) goes left 2 and Chromashift(c=2) goes right 2

    Whats up and down? a different letter than "c" I take it?
    Quote Quote  
  16. Another way to do it, and without needing a plugin, is like this:

    A=Last
    B=A.Greyscale()
    Overlay(B,A,X=10,Y=10,Mode="Chroma")


    A positive value to 'X' shifts the chroma to the right (by 10 pixels in this example). A positive value to 'Y' moves the color down (by 10 pixels in this example). To shift in the opposite direction (left and/or up) use negative values for the numbers. Play with the 'X' and 'Y' numbers. Usually they're 2 to 4, and usually negative.
    Quote Quote  
  17. For the original chromashift, L=+ is down , L=- is up
    Quote Quote  
  18. I need a small bit of advice here.


    If you were to chroma shift this DVD source I have fixed up, how many pixels going left, right, up, and down would you go?








    I tried shifting it 2 to the left and it seems to fix most of it, but then it bleeds to far to the left a bit and makes it look like I should go down 2 as well. When I tell it to go down 2 as well, it just looks completely off. So I cant figure out what I should go with.
    Quote Quote  
  19. Heres the shots when shifted 2 pixels to the left.


    The blue sky started covering the right black outline of Tiens head around the ear area after the shift.


    The blue sky started covering the black outline and bleeding into Trunks hair after the shift.


    The sky started bleeding over the black outline on the entire right side of Krillins body and maked his eyebrow look blue.
    Quote Quote  
  20. You probably need different filters for different scenes. They are not shifted the same, between your screenshots either in magnitude or direction (sometimes it' s just low resolution or chroma blurring so it's shifted in all directions)

    If you want more precision for 1 direction, use ChromaShiftSP (SP = subpixel), you can use decimal values e.g. X=-0.25

    You probably need a combination of mergechroma(awarpsharp2(some settings)) , with some type of shift but adjusted for each scene
    Quote Quote  
  21. Originally Posted by poisondeathray View Post
    You probably need different filters for different scenes. They are not shifted the same, between your screenshots either in magnitude or direction (sometimes it' s just low resolution or chroma blurring so it's shifted in all directions)

    If you want more precision for 1 direction, use ChromaShiftSP (SP = subpixel), you can use decimal values e.g. X=-0.25

    You probably need a combination of mergechroma(awarpsharp2(some settings)) , with some type of shift but adjusted for each scene
    I have no function for ChromaShiftSP.
    You wouldnt happen to have the plugin or avsi for it would you?
    Quote Quote  
  22. Keep in mind that YV12 video has chroma channels that are half the resolution of the luma channel. So a 640x480 YV12 video has 320x240 color. The colors will always be blurrier than the luma and you will never get them to align exactly.

    You can enlarge the frame size, shift, then shrink the frame to get smaller shifts with ChromaShift(). For example, to shift colors left by one pixel:

    Code:
    shifted = BicubicResize(width*2, height).ChromaShift(c=-2).BicubicResize(width, height)
    MergeChroma(last,shifted)
    Of course, that will blur the chroma channels a bit so you may want to sharpen them after shifting.
    Last edited by jagabo; 5th Oct 2012 at 07:52.
    Quote Quote  
  23. Originally Posted by poisondeathray View Post
    You probably need different filters for different scenes. They are not shifted the same, between your screenshots either in magnitude or direction (sometimes it' s just low resolution or chroma blurring so it's shifted in all directions)

    If you want more precision for 1 direction, use ChromaShiftSP (SP = subpixel), you can use decimal values e.g. X=-0.25

    You probably need a combination of mergechroma(awarpsharp2(some settings)) , with some type of shift but adjusted for each scene
    You can make chromashiftSP use different numbers for different scenes in the same episode? Is this saying I can tell it to do it to certain frames and then set a different number for another set of frames?
    Quote Quote  
  24. You can use trim() to apply different filters or settings to different frame ranges, then join them with aligned splice ; or use remapframes(), or applyrange()
    Quote Quote  
  25. Is there any specific reason why when I use ChromashiftSP and MergeChroma the audio and video are a bit out of sync?

    I encoded this both with and without ChromaShiftSP and MergeChroma(aWarpSharp2()) added in the script.

    For some reason when I encode it without those 2 things the audio and video are perfectly in sync and when the mouths are done moving the audio is done talking.

    When I encode it with those 2 things in the script the video plays a bit faster than the audio and the audio keeps talking after the mouths have stopped for about half a second to one whole second.

    Is there any specific reason that these 2 things are causing this?

    the only difference in the script is I added these 2 things in at the bottom.

    ChromaShiftSP(x=0.20)
    MergeChroma(aWarpSharp2(depth=14))
    Quote Quote  
  26. No it shouldn't cause sync issue if you used a frame accurate source filter

    Look at the framecount , it will be the same

    Or open the 2 versions in tabs in avspmod, the frames will be matching
    Quote Quote  
  27. I've never used ChromaShiftSP() but I've never seen A/V sync problems with Chromashift(), MergeChroma(), or aWarpSharp2().
    Quote Quote  
  28. Originally Posted by poisondeathray View Post
    No it shouldn't cause sync issue if you used a frame accurate source filter

    Look at the framecount , it will be the same

    Or open the 2 versions in tabs in avspmod, the frames will be matching
    Mediainfo shows the same exact info except their titles since their titled different but when I play them they play differently. The framerates and length are all the same but it looks like the video during actual playback is half a second to one second faster than the audio when their used. Almost as if the video started playing half a second to one second quicker than the audio.
    Like I said the mouths stop moving before the audio stops talking and it doesnt do that when I remove the 2 from the script. I tried reencoding them both twice just to see if it was an error but its the same result in the end.

    I added chapters to both in the same exact timeframes and when I check them both one is starting at the beginning of a word while the other is half through the same word when the chapter is loaded. Yes the chapters are at the exact same times in the MKV file.

    I just find it weird because im using the same audio and video source for them both.
    Quote Quote  
  29. That is weird and shouldnt happen. None of those filters you listed affect framecount or fps. They dont' affect audio either

    Check the framecount. e.g. use info() , and preview a few frames. If the frames are the same, then it should be in sync . They are essentially the same video then (just with chroma shifted a bit on each frame)

    If it's a constant sync issue (e.g. 0.2 sec all the way through), there is a delay that you might have not have taken in to account when muxing . Muxing has nothing to do with the avs script , unless you are doing something else ? (are you re-encoding the audio ?) . Constant sync issue is easy to fix

    Why don't you post the full script and exact procedure you are doing
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!