Hi!
I have a video from Amazon (WED-DL). He has problems, is it possible to remove pixelation, do color correction?
Maybe add grain, contrast? What do you think? Tell me please.
Sample - sample_vh_amzn.mkv (77.1 Mb).
[Attachment 60582 - Click to enlarge]
[Attachment 60583 - Click to enlarge]
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 12 of 12
Thread
-
-
is it possible to remove pixelation, do color correction?
Maybe add grain, contrast? What do you think? Tell me please.
Looks like someone upscaled some sd conten to hd using a linear or bilinear resizer, so by downscaling to SD resolution and upscaling back to hd you get something like:
I used RealESRGAN for upscaling, but you get rid of the artifacts with most decent resizers.
For color grading one can do tons of stuff,...
(used some free available LUTs)
personally I wouldn't add grain,...
Cu Selur
Ps.: Above can be done using Vapoursynth or Avisynth and should also be possible with most NLE tools.users currently on my ignore list: deadrats, Stears555 -
A wider variety of shots would have been better. But try something like this:
Code:LWLibavVideoSource("sample_vh_amzn.mkv") # brightness, contrast, gamma, saturation ColorYUV(gain_y=150, off_y=-22, gamma_y=50, cont_u=250, cont_v=250) ColorYUV(off_y=14) # downscale to original size and clean BilinearResize(704, 480) Santiag(1,1) HQDN3D(ls=1.0, cs=1.0, lt=2.0, ct=2.0) Sharpen(0.5) # upscale back to 1080p nnedi3_rpow2(4, cshift="Spline36Resize", fwidth=1920, fheight=1080) aWarpSharp(depth=5) CAS(0.7)
-
to Selur,
Alas, this quality is officially available on the Japanese Amazon with a Prime subscription.
Thanks for the answer, can I ask for an example script for Avisynth?
to jagabo,
Thanks, I added another sample. Is the brightness a little too high or does it seem to me so?
sample_vh_amzn_v2.mkv -
Yes, the adjustments were definitely too bright for those outdoor shots. Something like this is better for those:
Code:ColorYUV(gain_y=75, cont_u=250, cont_v=250)
-
to jagabo,
Okay, thanks again.
---
Do I understand correctly that the Japanese took the DVD and made an upscale 1080 of dubious quality? -
-
The video was made from an analog SD recording, poorly captured, then poorly deinterlaced and poorly upscaled.
-
The DVD source you sent was far better than the amazon upscaled version. Here's what I came up with:
Code:###################################################### function GreyRamp() { BlankClip(color=$000000, width=1, height=256, pixel_type="RGB32") StackHorizontal(last, last.RGBAdjust(rb=1, gb=1, bb=1)) StackHorizontal(last, last.RGBAdjust(rb=2, gb=2, bb=2)) StackHorizontal(last, last.RGBAdjust(rb=4, gb=4, bb=4)) StackHorizontal(last, last.RGBAdjust(rb=8, gb=8, bb=8)) StackHorizontal(last, last.RGBAdjust(rb=16, gb=16, bb=16)) StackHorizontal(last, last.RGBAdjust(rb=32, gb=32, bb=32)) StackHorizontal(last, last.RGBAdjust(rb=64, gb=64, bb=64)) StackHorizontal(last, last.RGBAdjust(rb=128, gb=128, bb=128)) } ###################################################### LWLibavVideoSource("sample_vh_DVD.mkv", cache=false, prefer_hw=2) TFM() TDecimate() Crop(4,0,-4,-8) src = last ColorMatrix(mode="rec.601->rec.709") # even out brightness across the frame alpha = Greyramp().PointResize(width, height).ConvertToYV12(matrix="pc.601") Overlay(ColorYUV(gain_y=20), last, mask=alpha) # adjust brightness, saturation ColorYUV(gain_y=75, cont_u=250, cont_v=250) # automatic gain, tempered a bit Overlay(last, ColorYUV(autogain=true), opacity=0.50) # dehalo only the strongest edges emask = mt_edge(mode="hprewitt", thy1=150, thy2=150).mt_expand().Blur(1.0) Overlay(last, dehalo_alpha(rx=2.0, ry=2.0, brightstr=1.0), mask=emask) CAS(0.5) SMDegrain() nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1280, fheight=720) aWarpSharp(depth=3) Sharpen(0.2) nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1920, fheight=1080) aWarpSharp(depth=5) CAS(0.7) prefetch(8)
[Attachment 60617 - Click to enlarge]Last edited by jagabo; 6th Sep 2021 at 16:30.
-
Thanks for the answer, can I ask for an example script for Avisynth?
Here's the script without color changes:
Code:# Imports import vapoursynth as vs # getting Vapoursynth core core = vs.core # Loading Plugins core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/fmtconv.dll") core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll") # source: 'C:\Users\Selur\Desktop\sample_vh_amzn.mkv' # current color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, yuv luminance scale: limited, scanorder: progressive # Loading C:\Users\Selur\Desktop\sample_vh_amzn.mkv using LWLibavSource clip = core.lsmas.LWLibavSource(source="C:/Users/Selur/Desktop/sample_vh_amzn.mkv", format="YUV420P8", cache=0, prefer_hw=0) # making sure input color matrix is set as 709 clip = core.resize.Bicubic(clip, matrix_in_s="709",range_s="limited") # making sure frame rate is set to 23.976 clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # Setting color range to TV (limited) range. clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1) # cropping the video to 1920x1076 clip = core.std.CropRel(clip=clip, left=0, right=0, top=2, bottom=2) # adjusting resolution before resizing clip = core.fmtc.resample(clip=clip, w=768, h=430, kernel="lanczos", interlaced=False, interlacedd=False) from vsrealesrgan import RealESRGAN # adjusting color space from YUV420P16 to RGBS for VsRealESRGAN clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_in_s="709", range_s="limited") # resizing using RealESRGAN clip = RealESRGAN(clip=clip, device_type="cuda", device_index=0) # adjusting resizing to hit target resolution clip = core.fmtc.resample(clip=clip, w=1920, h=1076, kernel="lanczos", interlaced=False, interlacedd=False) # adjusting output color from: RGB48 to YUV420P10 for x265Model clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, matrix_s="709", range_s="limited") # set output frame rate to 23.976fps clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # Output clip.set_output()
Code:# Imports import vapoursynth as vs # getting Vapoursynth core core = vs.core # Loading Plugins core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/fmtconv.dll") core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/ColorFilter/TimeCube/vscube.dll") core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll") # source: 'C:\Users\Selur\Desktop\sample_vh_amzn.mkv' # current color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, yuv luminance scale: limited, scanorder: progressive # Loading C:\Users\Selur\Desktop\sample_vh_amzn.mkv using LWLibavSource clip = core.lsmas.LWLibavSource(source="C:/Users/Selur/Desktop/sample_vh_amzn.mkv", format="YUV420P8", cache=0, prefer_hw=0) # making sure input color matrix is set as 709 clip = core.resize.Bicubic(clip, matrix_in_s="709",range_s="limited") # making sure frame rate is set to 23.976 clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # Setting color range to TV (limited) range. clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1) # adjusting color space from YUV420P8 to RGB24 for vsTimeCube clip = core.resize.Bicubic(clip=clip, format=vs.RGB24, matrix_in_s="709", range_s="limited") # color adjustment using TimeCube clip = core.timecube.Cube(clip=clip, cube="I:/Hybrid/64bit/vsfilters/ColorFilter/TimeCube/color/Presetpro - Binary Code.cube") # cropping the video to 1920x1076 clip = core.std.CropRel(clip=clip, left=0, right=0, top=2, bottom=2) # adjusting resolution before resizing clip = core.fmtc.resample(clip=clip, w=768, h=430, kernel="lanczos", interlaced=False, interlacedd=False) from vsrealesrgan import RealESRGAN # adjusting color space from RGB48 to RGBS for VsRealESRGAN clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, range_s="limited") # resizing using RealESRGAN clip = RealESRGAN(clip=clip, device_type="cuda", device_index=0) # adjusting resizing to hit target resolution clip = core.fmtc.resample(clip=clip, w=1920, h=1076, kernel="lanczos", interlaced=False, interlacedd=False) # adjusting output color from: RGB48 to YUV420P10 for x265Model clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, matrix_s="709", range_s="limited") # set output frame rate to 23.976fps clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # Output clip.set_output()
Code:# Imports import vapoursynth as vs # getting Vapoursynth core core = vs.core # Loading Plugins core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/fmtconv.dll") core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/ColorFilter/TimeCube/vscube.dll") core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll") # source: 'C:\Users\Selur\Desktop\sample_vh_amzn_v2.mkv' # current color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, yuv luminance scale: limited, scanorder: progressive # Loading C:\Users\Selur\Desktop\sample_vh_amzn_v2.mkv using LWLibavSource clip = core.lsmas.LWLibavSource(source="C:/Users/Selur/Desktop/sample_vh_amzn_v2.mkv", format="YUV420P8", cache=0, prefer_hw=0) # making sure input color matrix is set as 709 clip = core.resize.Bicubic(clip, matrix_in_s="709",range_s="limited") # making sure frame rate is set to 23.976 clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # Setting color range to TV (limited) range. clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1) # adjusting color space from YUV420P8 to RGB24 for vsTimeCube clip = core.resize.Bicubic(clip=clip, format=vs.RGB24, matrix_in_s="709", range_s="limited") # color adjustment using TimeCube clip = core.timecube.Cube(clip=clip, cube="I:/Hybrid/64bit/vsfilters/ColorFilter/TimeCube/color/Presetpro - Binary Code.cube") # cropping the video to 1920x1070 clip = core.std.CropRel(clip=clip, left=0, right=0, top=4, bottom=6) # adjusting resolution before resizing clip = core.fmtc.resample(clip=clip, w=768, h=428, kernel="lanczos", interlaced=False, interlacedd=False) from vsrealesrgan import RealESRGAN # adjusting color space from RGB48 to RGBS for VsRealESRGAN clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, range_s="limited") # resizing using RealESRGAN clip = RealESRGAN(clip=clip, device_type="cuda", device_index=0) # adjusting resizing to hit target resolution clip = core.fmtc.resample(clip=clip, w=1920, h=1070, kernel="lanczos", interlaced=False, interlacedd=False) # adjusting output color from: RGB48 to YUV420P10 for x265Model clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, matrix_s="709", range_s="limited") # set output frame rate to 23.976fps clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # Output clip.set_output()
Cu Selurusers currently on my ignore list: deadrats, Stears555
Similar Threads
-
Color correction
By Shingen36 in forum RestorationReplies: 1Last Post: 20th May 2020, 10:19 -
Color correction
By Shingen36 in forum EditingReplies: 0Last Post: 20th May 2020, 05:16 -
Question about auto color correction.
By kalemvar1 in forum Video ConversionReplies: 4Last Post: 9th Sep 2019, 10:12 -
To use color correction or not?
By That Tommy in forum EditingReplies: 3Last Post: 30th Aug 2018, 16:35 -
Help with color correction
By navi82 in forum RestorationReplies: 6Last Post: 3rd Apr 2017, 05:42