digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   Restore, Filter, Improve Quality (https://www.digitalfaq.com/forum/video-restore/)
-   -   Removing ghosting from commercial DVD? (https://www.digitalfaq.com/forum/video-restore/7537-removing-ghosting-commercial.html)

meeshu 09-04-2016 10:40 PM

Removing ghosting from commercial DVD?
 
Trying to remove, or at least minimize, what appears to be ghosting from some scenes from a DVD.

There is a horizontal shift of a ghost image(?) to the right from people, objects and from the left frame.

Not having any luck resolving this issue (elsewhere) so far. So how can this ghosting be removed please?

Sample video clip here.

Thank you.

lordsmurf 12-01-2016 12:43 AM

We'd like to help, but cannot download your sample clip. MediaFire is not allowed here:

http://www.digitalFAQ.com/forum/news...mbership.html:
Quote:

File Sharing Policy:
Please note that Site Staff will not download files from "file sharing" services that require payments, waiting on countdown clocks, queues, or any other time-wasting nonsense. Attach files to the forum, to your own FTP or public web space, or use a respected "no wait" file sharing account like Dropbox. Premium Members may request special temporary FTP access (PM admin) to submit files.
Try again.

Most ghosting can be corrected with offset in TMPGEnc Plus or VirtualDub, and some temporal NR in Avisynth. How much, and which ones, depends on the sample clip.

meeshu 12-01-2016 10:05 PM

1 Attachment(s)
Sorry about not uploading to a better site.

I've attached the sample clip to this post.

Thank you.

sanlyn 12-02-2016 10:49 AM

3 Attachment(s)
Thank you for posting.

Quote:

Originally Posted by meeshu (Post 45545)
Trying to remove, or at least minimize, what appears to be ghosting from some scenes from a DVD.

"Mitigate" is a good term. The problem isn't really ghosting. A true ghost image is a double-image effect, but people often refer to layers of DCT edge ringing as ghosting. https://en.wikipedia.org/wiki/Ringing_artifacts. In your sample there are three right hand layers of DCT ringing -- a mild bright oversharpening edge effect, a second darker edge 6 pixels to the right, and a third bright edge ring about 10 pixels to the left. Ringing can't be entirely fixed but it can be subdued.

The problem in this shot is complicated by the left-hand figure in the distance at the start of the clip with a rear shadow slightly behind him, which you'll see on the rear wall as he walks forward. After he approaches the camera the ringing is more distinct. I used DeHalo_Alpha for the bright edge halo (http://avisynth.nl/index.php/DeHalo_alpha). For the darker halo I used GhostBuster (http://forum.doom9.org/attachment.ph...1&d=1330678606), which is similar to the Exorcist filter in VirtualDub. I also used a recommended edge smoother, FixVHSOversharp (http://web.archive.org/web/200910261...ersharp2_5.zip) as recommended by the author. GhostBuster and FixVHSOversharp work only in YUY2.

GhostBuster has a flaw in that it darkens or brightens the image. In this case the image was darkened, so I used ColorYUV() and Levels() to restore the original luminance range. Values for the latter two functions were arrived by experimentation, comparing before-and-after histograms, and after some previous experience with GhostBuster and exorcist. I also took the liberty to resharpen the image, tighten some color bleed on a few edges, center the image borders, remove some spots, and mildly resharpen.

A portion of the original Frame 233 of the sample is in the images below. The top image is before, the bottom image is after running the script.

Original:
http://www.digitalfaq.com/forum/atta...1&d=1480697064
After:
http://www.digitalfaq.com/forum/atta...1&d=1480697096

Code:

MPEG2Source("VTS_03_1.demuxed_cut.d2v")
ConvertToYUY2(interlaced=false)
GhostBuster(offset=6,strength=-10)
FixVHSOversharp(20,16,12)
FixVHSOversharp(20,8,4)
ColorYUV(gain_y=28,off_y=-2)
Levels(18,1.05,255,16,255,dither=true,coring=false)
ConvertToYV12(interlaced=false)
DeHalo_Alpha(rx=2.0)
RemoveSpotsMC()
MergeChroma(aWarpSharp2(depth=20))
LSFmod()
Crop(16,0,-8,0).AddBorders(12,0,12,0)

The results of the script are attached as VTS_03_1_trial.m2v. You can try it with GhostBuster, other anti-ghost filters, VirtualDub's Exorcist, the layered anti-ghost filter in TMPGenc Plus 2.5, or other anti-ghost plugins. But With multiple ghosts, and their position changing over time, the effect can be mitigated but not entirely fixed. DCT ringing is a pain, especially after it's been encoded.

sanlyn 12-02-2016 04:12 PM

Sorry, time to edit one of my dumb typo/s. In the previous post I wrote:

Quote:

Originally Posted by sanlyn (Post 46563)
In your sample there are three right hand layers of DCT ringing -- a mild bright oversharpening edge effect, a second darker edge 6 pixels to the right, and a third bright edge ring about 10 pixels to the left.

That should read:

"In your sample there are three right hand layers of DCT ringing -- a mild bright oversharpening edge effect, a second darker edge 6 pixels to the right, and a third barely bright edge ring about 2 pixels farther to the right of the other two."

meeshu 12-02-2016 07:17 PM

Many thanks for the detailed and constructive response!

The processed video is definitely clearer/cleaner than the original video.

As I'm relatively new to video processing, the script is presumably for Avisynth which is run via VirtualDub(?)

I'll study the links and script further, and try experimenting with VirtualDub and Avisynth using the settings within the script as a starting point.

Thanks again!

sanlyn 12-02-2016 07:47 PM

Thanks, and welcome to Avisynth. Seriously, I didn't realize you were that new to it. Never fear, I steered away from it for years until necessity and my own impatience with other applications made me settle down to the learning curve -- in which case it became far less fearsome than I thought. There are hundreds of usage examples here in the forum threads. Unfortunately many of the filters I used are not available through any other means short of big-figure price tags for pro gear that require an M.I.T. degree just to read their user manuals.

I typed the Avisynth script in Notepad, saved it as an ".avs" file, opened it in VirtualDub, and saved the results as a lossless work file with the Lagarith lossless codec for importing into an encoder. It was encoded for PAL DVD spec using the old TMPGenc Plus 2.5. The sample video appears to be progressive PAL encoded as interlaced for the standard DVD spec, originally 24fps film speeded up for PAL 25fps, which is common PAL practice. For NTSC it would be set up in Avisynth for 23.976 film speed, resized to 720x480, encoded with 2:3 pulldown (telecine) for 29.97 fps playback, and encoded as interlaced. I figured you just wanted standard PAL.

I note some quality loss in the reworked sample, but this is inevitable with lossy re-encodes. It's for that reason that we usually recommend working only with lossless intermediate files and/or capturing analog sources to lossless compression, and other lossless means during repair and restoration, in order to avoid lossy re-encoding as much as possible.


All times are GMT -5. The time now is 03:53 PM

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