View Full Version : Fixing crushed blacks with 2 sources?
ABurns
23rd January 2022, 03:14
Hi all. I have 2 sources for the same material - one from an original film print and one from a videotape source. The film print has much more fine detail, but the blacks are crushed and can't be restored becuase there is nothing there. The other doesn't have the crushed blacks, but lacks detail because it's from a transmission tape instead of the print. Is there a way to combine these sources to reduce the crushed blacks but retain the fine detail? Layer alignment would be a problem if this were even possible, but not an insurmountable one. Thoughts?
https://thumbs4.imagebam.com/83/0e/48/ME6UCYT_t.png (https://www.imagebam.com/view/ME6UCYT)
https://thumbs4.imagebam.com/c6/4f/b2/ME6UCZB_t.png (https://www.imagebam.com/view/ME6UCZB)
poisondeathray
23rd January 2022, 03:33
Perhaps with a shadow mask and compositing (overlay, mt_merge or similar)
But you'd need to match the AR, there is some difference . Maybe AutoOverlay can help with that task
ABurns
23rd January 2022, 03:39
Yeah, there's actually quite a bit of difference. Those stills were made after I aligned the layers in Photoshop. I'll look into that. Thanks.
poisondeathray
23rd January 2022, 03:51
You mean auto-align in PS ? What did it look like before ?
Is the mismatch consistent across scenes ? (if so, then correcting for 1 frame could theoretically correct everything)
There are manual methods to align interest points to correct for warping , such as hugin . Also possible in composting programs like nuke, ae such as mesh warping
Also warp , which can read hugin project files. The youtube tutorial in the 1st post briefly goes over hugin
https://forum.doom9.org/showthread.php?t=176031
ABurns
23rd January 2022, 04:00
No, not auto align. I almost never use that, too unpredictable. Manually at 50% opacity. Here is the original unaligned image. It's 2 VHS releases of the same show about a decade apart, from different distributors.
https://thumbs4.imagebam.com/68/36/dc/ME6UNZM_t.png (https://www.imagebam.com/view/ME6UNZM)
lansing
23rd January 2022, 05:04
I don't really see the "more fine details" from your film clip, all I see is over sharpening.
ABurns
23rd January 2022, 05:37
I don't really see the "more fine details" from your film clip, all I see is over sharpening.
Then you're not looking closely enough. It's more obvious in this frame. Look at the hair.
https://thumbs4.imagebam.com/29/bd/89/ME6VBM1_t.png (https://www.imagebam.com/view/ME6VBM1)
https://thumbs4.imagebam.com/fb/a2/dd/ME6VBMP_t.png (https://www.imagebam.com/view/ME6VBMP)
johnmeyer
23rd January 2022, 07:29
You may get some ideas from this old thread:
Hardsub Removal using another source (http://forum.doom9.org/showthread.php?t=173837)
It involved removing hard-coded subtitles by substituting video from an identical source that didn't have subtitles, and overlaying that video on top of the subtitles in order to remove them. So, while it was a different problem, it involved matching and combining portions of two "identical" sources.
As I indicated in my first post in the thread, I actually did this one time and ran into many problems lining up the two sources. It also didn't help that one of the sources contained a few scenes that had been cut from the other source. The point of bringing this up is that you will have to do quite a bit of manual work to keep the two sources aligned and in sync.
There are also threads in this forum about capturing the same exact videotape multiple times and then averaging the multiple captures together to reduce the random noise which is different in each capture from a videotape. I've done this as well and what I found is that even with the sources and the equipment being identical, the picture never ends up at the exact same place each time.
However, in your case, in may still work because you are only going to copy the really dark video from the source that still has some shadow detail, and it will replace only the sections which are completely black. Therefore, as long as the mask doesn't touch adjacent video that is really bright, you probably won't notice offsets of only a few pixels. You could probably eliminate the problem of the new video wandering into bright areas by eroding the mask slightly (i.e., making it slightly smaller).
lansing
23rd January 2022, 11:53
Then you're not looking closely enough. It's more obvious in this frame. Look at the hair.
There is no new details
Dogway
23rd January 2022, 18:11
I also prefer the blurred one, I gave it a go sharpening a bit and it's more pleasant to watch, while also easier to restore.
ex_levels(26.0, 1.1, 201.4, 0.0, 255.0, show=false)
a=last
ex_unsharp(1.3, 1080.0, 0.0)
# ex_luts(last,a,mode="clamp") # optional to remove sharpening ringing
ex_vibrance(sat=1.5)
ABurns
23rd January 2022, 22:35
Well in my case, I already have the two sources perfectly matched frame for frame because of my particular workflow. So scene changes and such will be frame-perfect every time. The only alignment it would need is spatial.
I've played around with some of these suggestions, but my big hangup right now is how to mask it based on luminance. I haven't really found a satisfactory way to do that.
I also prefer the blurred one, I gave it a go sharpening a bit and it's more pleasant to watch, while also easier to restore.
ex_levels(26.0, 1.1, 201.4, 0.0, 255.0, show=false)
a=last
ex_unsharp(1.3, 1080.0, 0.0)
# ex_luts(last,a,mode="clamp") # optional to remove sharpening ringing
ex_vibrance(sat=1.5)
ex_levels keeps throwing an error "this filter can only be used within runtime filters" GradePack.avsi, line 283.
poisondeathray
23rd January 2022, 23:29
my big hangup right now is how to mask it based on luminance. I haven't really found a satisfactory way to do that.
Did you look at the LumaMask function in Dogway's MasksPack.avsi ?
johnmeyer
24th January 2022, 02:58
FWIW, it is trivial (less than 1 minute of work) to create a luma mask in Vegas (my NLE). If you don't have access to that, you might look at whatever NLE you have and see if it can create a mask based on luma values. I always prefer using my NLE for projects like this because it is so easy to "dial in" the settings because you can instantaneously see the results in the preview display.
poisondeathray
24th January 2022, 03:21
Since you're already using photoshop - photoshop can work on video too. You can use luminosity masks in photoshop and combine them with frequency separation masks (if you think one version has higher frequency detail, it's a valid method too) , saturation masks, hue masks - whatever you want. Also davinci resolve is another option . Many tutorials online for both, very powerful masking tools . I see your main problem as alignment. Yes, it's VHS source, not razor sharp - but a few pixels off and you're going to create additional ghosting, chroma bleeding when you composite layer(s) , unless you align it more closely
ABurns
31st January 2022, 01:44
So I've come into possession of a new, better source that makes all of this moot as a practical matter. However, I'm still looking into some of these suggestions as an academic exercise so that I will know going forward. It vexes me, so I will figure it out.
For the life of me, I cannot get Dogway's sharpening script above to work. In fact, I can't get ANY of his filter packs to work. It just throws an error "propNumElements: This filter can only be used within runtime filters... GradePack.avsi, line 283" I've looked at that line, but honestly I have no idea what I'm looking at or looking for. What am I missing here?
kedautinh12
31st January 2022, 02:04
I think you need download latest ver of GradePack
https://github.com/Dogway/Avisynth-Scripts/blob/master/GradePack.avsi
And latest ver of Dependencies
https://github.com/Dogway/Avisynth-Scripts/blob/36e27b554116f1ff0285eebd53d32c3a26fea23b/GradePack.avsi#L251
StainlessS
31st January 2022, 02:04
For the life of me
U usin' latest AVS+ and latest Doggy Doo scripts. ?
[propNumElements is recent AVS+ only]
https://github.com/AviSynth/AviSynthPlus/releases
EDIT:
Ignore that, propNumElements would not give that message if it was not present. [so you do have recent-ish AVS+]
ABurns
31st January 2022, 03:12
Well, that was it. When I looked at the dependencies it said AVS 3.7.1 and I was on 3.7.0. I wouldn't have thought such a minor upgrade would make such a difference, but there you go. Thanks.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.