VideoHelp Forum
+ Reply to Thread
Results 1 to 15 of 15
Thread
  1. Trying to find a means of removing or at least minimizing ghosting (faint outline of objects offset slightly to the right of the objects) on some original DVDs.

    Have been searching for various plugins/scripts for removing or minimizing ghosting for use with AVISynth and/or for use with other similar software.

    There are a few plugins/scripts found so far, but it appears as though they require a pointer to specific individual files for processing, and may not (or can not) do "batch" processing (processing all videos on a DVD for example) via DVD-RB for example(?) They may also leave unwanted "side effects" such as brightened or darkened areas etc(?)

    So what I'm after is a plugin/script that will allow batch processing of multiple videos from a DVD, and will not leave any unwanted artifacts on videos, and (preferably) can also automatically detect the ghost image offset without having to specify offsets manually.

    A detailed and clear explanation of what settings should be used in these plugins/scripts would be very helpful, as it is often not clear what settings should be used.

    EDIT: Added screenshot from an already reduced video (from DVD-9 to DVD-5). The ghosting is present in the original video, the shrinking of the video did not introduce ghosting.

    Ghosting on right side of people and objects is more noticeable on the gentleman in the middle of the screenshot. Less noticeable for the gentleman on the right and for the left side of the frame.
    Image Attached Thumbnails Click image for larger version

Name:	Ghosting_on_right_side.png
Views:	1131
Size:	556.5 KB
ID:	38354  

    Last edited by brispuss; 30th Aug 2016 at 00:05. Reason: Added screenshot
    Quote Quote  
  2. I have a sample video clip taken from another DVD. This clip has not been processed, it has been taken directly from the DVD.

    The clip shows some grain and/or noise, as well some "ghosting" on right side of people and objects.

    Sample video clip
    Quote Quote  
  3. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    Well, there's Exorcist for VirtualDub. It does require manual setup, but you can adjust all your files and use VirtualDub's queue feature to process them as a batch. There are a couple of filters for Avisynth as well, but you'll have to write a shell script for batch processing. I'm not aware of any software that will automatically implement these for every video they find on a DVD (and butter your bread!) but maybe someone else knows of one.
    Quote Quote  
  4. Thanks for the comments.

    Tried "Exorcist", which has a very useful Preview option to check settings before committing to process videos, but I couldn't find suitable settings to use, unfortunately.

    Yes, there seem to be several "ghosting" removal filters for AviSynth. Had trouble with Ghostbuster filter plugin (can't get it to work). LGhost filter runs, but at this time I haven't found suitable settings (although still looking into it) for removing or minimizing ghosting.

    On searching around the 'net, it may be that the "ghosting" is a result of a poor quality of transfer of film images to video. Some suggested procedures for removing the ghosting were to use the following script in AviSynth -

    Code:
    Yadif(mode=1, order=1)
    SRestore()

    Or,

    Code:
    QTGMC()
    SRestore()

    Tried both scripts in AviSynth, but there was little if any removal of the ghosting. What is not clear though, is the appropriate parameter settings to be used in QTGMC. There are, apparently, quite a few parameters available in QTGMC, and the syntax and order of parameters to be used is not clear despite reading the html guide that came with the QTGMC command/script(?)
    Quote Quote  
  5. That's not ghosting it's oversharpening halos. You can use dehalo_alpha() in AviSynth. Unfortunately, you'll lose some detail too. You can try using an edge mask to limit the losses to only the worst halos. Something along the lines of:

    Code:
    Mpeg2Source("VTS_03_1.demuxed_sample.d2v", CPU2="ooooxx", Info=3) 
    src=last
    dehalo_alpha(rx=3.0, ry=3.0, BrightStr=1.2, DarkStr=1.2)
    emask = mt_edge().Greyscale().ConvertToRGB().Crop(0,1,-1,-0).AddBorders(1,0,0,1).ConvertToYV12().Blur(0.5)
    Overlay(src, last, mask=emask)
    That still leaves the dark secondary halo though.
    Quote Quote  
  6. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    Multiple sharpening halos? How does that work? It looks like signal reflection due to impedance mismatch in the analog cabling during transfer.

    Originally Posted by brispuss View Post
    Tried "Exorcist", which has a very useful Preview option to check settings before committing to process videos, but I couldn't find suitable settings to use, unfortunately.
    Here's a quick attempt in VirtualDub. I put a Levels filter ahead of Exorcist to rebalance the picture.

    Click image for larger version

Name:	deghost.png
Views:	6497
Size:	819.7 KB
ID:	38472
    Last edited by JVRaines; 3rd Sep 2016 at 10:44.
    Quote Quote  
  7. Originally Posted by JVRaines View Post
    Multiple sharpening halos? How does that work?
    The bright halo causes a secondary overshoot, creating a dark halo.
    Quote Quote  
  8. Originally Posted by jagabo View Post
    Originally Posted by JVRaines View Post
    Multiple sharpening halos? How does that work?
    The bright halo causes a secondary overshoot, creating a dark halo.
    http://www.videophile.info/Guide_EE/Page_01.htm

    Scroll down to the Lawrence Of Arabia picture near the bottom, and the text below that:

    You can clearly see the dark contour and the bright halo all around the silhouette. And the C/T multi-ripple effect mentioned above can clearly be seen here, too. Look at the top right of the silhouette, after the usual bright halo, there is another darker one, then a brighter one again and even faintly another dark one... This sometimes looks as if things have a slight ghost image right to them. Ugly.
    Quote Quote  
  9. Originally Posted by jagabo View Post
    That's not ghosting it's oversharpening halos. You can use dehalo_alpha() in AviSynth. Unfortunately, you'll lose some detail too. You can try using an edge mask to limit the losses to only the worst halos. Something along the lines of:

    Code:
    Mpeg2Source("VTS_03_1.demuxed_sample.d2v", CPU2="ooooxx", Info=3) 
    src=last
    dehalo_alpha(rx=3.0, ry=3.0, BrightStr=1.2, DarkStr=1.2)
    emask = mt_edge().Greyscale().ConvertToRGB().Crop(0,1,-1,-0).AddBorders(1,0,0,1).ConvertToYV12().Blur(0.5)
    Overlay(src, last, mask=emask)
    That still leaves the dark secondary halo though.
    Thanks for the script! It seems to remove some of the artifacts.

    A couple of questions.

    I thought that halos were supposed to surround the entire object/person, something like an aura? The artifact in the sample video doesn't seem to surround the person. It appears to be a faint lightened image of the person which is offset to the right horizontally, a ghost image?

    How is the remaining artifact(s) in the semi-processed video to be removed, if possible?
    Quote Quote  
  10. Originally Posted by brispuss View Post
    I thought that halos were supposed to surround the entire object/person, something like an aura?
    Not necessarily. It depends on the sharpening filter. Though, JVRain's Exorcist image looks pretty good. This comes pretty close to what he did:

    Code:
    ColorYUV(gain_y=-128) # half bright to prevent overflow in Overlay()
    shifted = last.Crop(0,0,-2,-0).AddBorders(2,0,0,0).ColorYUV(gain_y=-160) # the video shifted right by two pixels, and darker
    Overlay(last, shifted, mode="add") # add them together
    ColorYUV(gain_y=115, cont_u=-128, cont_v=-128) # readjust brightness and saturation
    Using SmoothTweak() rather than ColorYUV() at the end may look a little better. And this leaves a bright halo above horizontal edges, like Exorcist did.

    Originally Posted by brispuss View Post
    How is the remaining artifact(s) in the semi-processed video to be removed, if possible?
    You'll have to play around with the various parameters of dehalo_alpha(). You'll also have to play around with the mt_edge() settings so the mask includes those areas.
    Last edited by jagabo; 4th Sep 2016 at 20:29.
    Quote Quote  
  11. Originally Posted by JVRaines View Post
    Multiple sharpening halos? How does that work? It looks like signal reflection due to impedance mismatch in the analog cabling during transfer.

    Originally Posted by brispuss View Post
    Tried "Exorcist", which has a very useful Preview option to check settings before committing to process videos, but I couldn't find suitable settings to use, unfortunately.
    Here's a quick attempt in VirtualDub. I put a Levels filter ahead of Exorcist to rebalance the picture.

    Image
    [Attachment 38472 - Click to enlarge]
    Thanks. But which level filter was used, and what were the settings used for this filter?

    What is this "rebalancing" of picture, and when should this rebalancing be used?
    Quote Quote  
  12. Originally Posted by jagabo View Post
    . . Though, JVRain's Exorcist image looks pretty good. This comes pretty close to what he did:

    Code:
    ColorYUV(gain_y=-128) # half bright to prevent overflow in Overlay()
    shifted = last.Crop(0,0,-2,-0).AddBorders(2,0,0,0).ColorYUV(gain_y=-160) # the video shifted right by two pixels, and darker
    Overlay(last, shifted, mode="add") # add them together
    ColorYUV(gain_y=115, cont_u=-128, cont_v=-128) # readjust brightness and saturation
    Using SmoothTweak() rather than ColorYUV() at the end may look a little better. And this leaves a bright halo above horizontal edges, like Exorcist did.
    So where should this ^ piece of code be added to the original code posted previously -

    Code:
    Mpeg2Source("VTS_03_1.demuxed_sample.d2v", CPU2="ooooxx", Info=3) 
    src=last
    dehalo_alpha(rx=3.0, ry=3.0, BrightStr=1.2, DarkStr=1.2)
    emask = mt_edge().Greyscale().ConvertToRGB().Crop(0,1,-1,-0).AddBorders(1,0,0,1).ConvertToYV12().Blur(0.5)
    Overlay(src, last, mask=emask)
    Does it replace some other parts of the previous code?

    Originally Posted by jagabo View Post
    Originally Posted by brispuss View Post
    How is the remaining artifact(s) in the semi-processed video to be removed, if possible?
    You'll have to play around with the various parameters of dehalo_alpha(). You'll also have to play around with the mt_edge() settings so the mask includes those areas.
    Which specific parameters should be adjusted in dehalo_alpha and mt_edge? I have no idea at all which parameters should be used and what their settings should be.
    Quote Quote  
  13. Originally Posted by brispuss View Post
    So where should this ^ piece of code be added to the original code posted previously
    It replaces everything except Mpeg2Source.

    Originally Posted by brispuss View Post
    Which specific parameters should be adjusted in dehalo_alpha and mt_edge?
    Pretty much all of them. Just read the documentation and play with them until you figure out what they do.
    Quote Quote  
  14. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    Originally Posted by brispuss View Post
    Thanks. But which level filter was used, and what were the settings used for this filter? What is this "rebalancing" of picture, and when should this rebalancing be used?
    I used the Levels filter that comes with VirtualDub. The Exorcist filter has a side effect of changing brightness and contrast, so after tweaking it to get rid of the ghost, I went to the Levels filter (which I placed before it in the chain) and played with the input levels to get the image looking like the original again. I think I turned off "operate in luma only" option.
    Quote Quote  
  15. Another decent one if you want to try for virtualdub was called Ghost remover by emiliano ferrari which I possibly did get from this page below

    http://www.infognition.com/VirtualDubFilters/denoising.html
    Quote Quote  



Similar Threads

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