So I got the recent Terror-Vision Blu-Ray of Dante's Inferno that came with the original red tint version of the film. The quality isn't great, though, and the Italian DVD is way better, but it doesn't have the red tint. Is there a way I could add a custom color filter to the Italian DVD in avisynth to give it the red tint?
This is what the red tint version looks like:
[Attachment 78959 - Click to enlarge]
[Attachment 78960 - Click to enlarge]
[Attachment 78961 - Click to enlarge]
This is my DVDRIP of the regular tinted version:
[Attachment 78962 - Click to enlarge]
[Attachment 78963 - Click to enlarge]
[Attachment 78964 - Click to enlarge]
What script should I use to give the DVD version the red tint? I also don't want the floating black bars to be red, but I'm guessing that might be inevitable to a degree.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 17 of 17
Thread
-
-
Probably easiest way will be read Cb and Cr values of tint (should be constant) from red tint source and later set fixed value for whole Cb and Cr correspondingly to red tint source values - my assumption is - source is black&white (grayscale) so only Y channel carry information, Cb and Cr normally for grayscale video should be equal to Cb=128, Cr=128 - in case of red tint Cb and Cr should have constant value different than 128.
-
-
Bellow example shows YUV statistics, as input i've used one of your pictures.
Code:ffprobe -f lavfi movie=sz15pq.png,signalstats -show_entries frame_tags=lavfi.signalstats.YMAX,lavfi.signalstats.YHIGH,lavfi.signalstats.YAVG,lavfi.signalstats.YLOW,lavfi.signalstats.YMIN,lavfi.signalstats.UMAX,lavfi.signalstats.UHIGH,lavfi.signalstats.UAVG,lavfi.signalstats.ULOW,lavfi.signalstats.UMIN,lavfi.signalstats.VMAX,lavfi.signalstats.VHIGH,lavfi.signalstats.VAVG,lavfi.signalstats.VLOW,lavfi.signalstats.VMIN
Code:TAG:lavfi.signalstats.YMIN=18 TAG:lavfi.signalstats.YLOW=31 TAG:lavfi.signalstats.YAVG=59.626 TAG:lavfi.signalstats.YHIGH=91 TAG:lavfi.signalstats.YMAX=132 TAG:lavfi.signalstats.UMIN=106 TAG:lavfi.signalstats.ULOW=114 TAG:lavfi.signalstats.UAVG=119.413 TAG:lavfi.signalstats.UHIGH=124 TAG:lavfi.signalstats.UMAX=128 TAG:lavfi.signalstats.VMIN=131 TAG:lavfi.signalstats.VLOW=144 TAG:lavfi.signalstats.VAVG=165.206 TAG:lavfi.signalstats.VHIGH=189 TAG:lavfi.signalstats.VMAX=203
-
Your DVD pics are already resized to 766x576. Why?
Anyway, I'd first make a picture in the correct tint at the size you want (720x576, I assume). Using CSamp, I got R=200, G=47,B=63, although those values vary depending on exactly where you take the readings. Then use this script to greyscale your DVD followed by tinting it. Adjust the opacity to suit. Do some brightening and contrasting when done, to suit what you want.
A=Last.Tweak(Sat=0,Coring=False)
Mask=ImageSource("Tint.png")
Overlay(A,B,0,0,Mask,Greymask=False,Opacity=1.0)
Letterbox(0,0,4,4)
Tweak(Bright=-55,Cont=1.5,Coring=False)
If you like, you can add back the black bars using the Letterbox command. Enclosing CSamp, in case you want to use it to try and get the tint color. -
It was many years ago since i've used Avisynth so i can only suggest how i would perform processing:
- split your input source on 3 planes, Y, U, V, ( https://avisynthplus.readthedocs.io/en/latest/avisynthdoc/corefilters/extract.html ?)
- apply separately to U and V plane Limiter so signal values will be clamped to defined range ( https://avisynthplus.readthedocs.io/en/latest/avisynthdoc/corefilters/limiter.html )
- combine modified U and V planes with unaltered Y plane ( https://avisynthplus.readthedocs.io/en/latest/avisynthdoc/corefilters/merge.html ?)
This is probably fastest method. -
I'm making an anamorphic x264 rip with MEGUI, so the SAR will be 16:15. Since I'm using AviSynth+ x64, I had to use CoronaSequence to load the image. This was my script:
A=Last.Tweak(Sat=0,Coring=False)
Mask=CoronaSequence("C:\Users\zacha\Pictures\Tint. png")
Overlay(A,B,0,0,Mask,Greymask=False,Opacity=1.0)
Letterbox(0,0,4,4)
Tweak(Bright=-55,Cont=1.5,Coring=False)
And I got this error:
[Attachment 78976 - Click to enlarge] -
As well you should. Where did clip B (2nd item in overlay) come from? It's not referenced.
Scott -
I don't know if I'm under-thinking it, but you can adjust color using RGB values with the HDRMatrix plugin from here: http://videoartifact.com/hdr/
I converted a color video to black and white and fiddled with it until it looked similar to one of your screenshots.
You mightn't need to use Tweak to adjust the contrast and brightness etc, or you might only need to adjust them a little. I mainly added it to make the picture look like your DVD. If you increase red while decreasing blue and green, you might find a happy balance that doesn't change the over-all brightness. If you only increase red while leaving blue and green at 1.0 instead of reducing them, it'll probably end up too bright and saturated.
GreyScale()
Matrix(rg=1.2, gg=0.45, bg=0.5, bitdepth=8)
Tweak(Bright=20, Sat=0.7, Cont=0.5, Coring=false)
[Attachment 78977 - Click to enlarge]Last edited by hello_hello; 9th May 2024 at 19:12.
Avisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview) -
-
I added a thought to my post regarding decreasing blue and green so there's no need to use Tweak to adjust the brightness much, but whatever works.
I'm not sure what you mean. Can't you apply the same adjustment to to the whole DVD, or are you referring to something else?Avisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview) -
I apologize. I left out a line, the one that defines B:
A=Last.Tweak(Sat=0,Coring=False)
Mask=ImageSource("Tint.png")
B=Mask
Overlay(A,B,0,0,Mask,Greymask=False,Opacity=1.0)
Letterbox(0,0,4,4)
Tweak(Bright=-55,Cont=1.5,Coring=False)
And it looks like you have it already, thanks to hello_hello's help, and that's what counts. -
-
GreyScale() doesn't convert to Y though. It just sets the values for the U and V planes to 128 (grey). Unless I'm misunderstanding what you mean.
I don't know what math the HDRMatrix plugin does to convert it's RGB arguments to YUV values, or if it changes the values for Y in the process, but I did play around a little doing it this way...
Source
[Attachment 79014 - Click to enlarge]
GreyScale()
[Attachment 79015 - Click to enlarge]
Best as I could work out, this converts GreyScale to RedScale.
GreyScale()
ColorYUV(off_u=-38, off_v=112)
[Attachment 79016 - Click to enlarge]
It obviously needs a fair reduction in saturation, and you can fiddle with the U and V values to change the hue, but I assume the Y plain would remain unaltered unless you told Tweak to adjust the brightness or contrast.
GreyScale()
ColorYUV(off_u=-38, off_v=112)
Tweak(Sat=0.4, Coring=False)
[Attachment 79017 - Click to enlarge]Last edited by hello_hello; 11th May 2024 at 04:49.
Avisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview) -
-
Maybe something like this:
Code:grey = GreyScale() red = grey.ColorYUV(off_u=-38, off_v=112) ymask=grey.ColorYUV(gain_y=-50, off_y=-10).mt_lut("x 128 - abs 2 *", chroma="-128") Overlay(red, grey, mode="blend", mask=ymask)
[Attachment 79032 - Click to enlarge]
Or for pure red scale:
Code:GreyScale() RGBAdjust(r=1.5, g=0, b=0))
[Attachment 79033 - Click to enlarge]Last edited by jagabo; 11th May 2024 at 18:40.
Similar Threads
-
Proc-Amp settings (Hue, Color, Brightness and Contrast) during capture
By VideoYak in forum CapturingReplies: 0Last Post: 5th Sep 2023, 07:11 -
Green hue after convert to x265
By TGB in forum Video ConversionReplies: 12Last Post: 26th Jul 2023, 19:16 -
Hue Adjustment Doesn't Work With Betacam Component Output
By GaneshRavi1125 in forum CapturingReplies: 1Last Post: 28th Aug 2022, 19:01 -
How can i improve image quality of very old bw silent film clips (cheaply!)
By MaxManLA in forum RestorationReplies: 10Last Post: 23rd Jan 2022, 11:12 -
Green flicker (hue) every alternative frame
By ColourMyPast in forum RestorationReplies: 4Last Post: 4th Feb 2021, 20:41