Page 2 of 2

Rocky and Bullwinkle restoration challenge

Posted: Fri Jan 14, 2022 6:50 pm
by thechaoscoder
Uploaded my version. For some reason the ftp connection breaks after 40-60mb. So I uploaded a txt with a dropbox link.

Out of laziness I just used: x264 --preset slower --crf 16 --tune animation.

I used some stabilization, but I wouldn't recommend it. It helps with some scenes, but overall it takes too much encoding time. It went from near real-time encoding speed to about 3fps. Quality wise there is not much difference.

Rocky and Bullwinkle restoration challenge

Posted: Fri Jan 14, 2022 7:06 pm
by Rocky
gonca wrote:
Wed Jan 12, 2022 7:23 pm
New and improved ( I hope) rb_1 on the way
Thank you, got it.

Rocky and Bullwinkle restoration challenge

Posted: Fri Jan 14, 2022 7:10 pm
by Rocky
thechaoscoder wrote:
Fri Jan 14, 2022 6:50 pm
Uploaded my version. For some reason the ftp connection breaks after 40-60mb. So I uploaded a txt with a dropbox link.
Strange, must be on your side because it doesn't happen to me and I have had users upload 30GB a couple times (telescope data, OK?).
Out of laziness I just used: x264 --preset slower --crf 16 --tune animation.
It's the script that is important.
I used some stabilization, but I wouldn't recommend it. It helps with some scenes, but overall it takes too much encoding time. It went from near real-time encoding speed to about 3fps. Quality wise there is not much difference.
Yeah, that's way too slow to be practical. Nevertheless, I didn't make any speed constraints, so I'll submit it as is and if your script wins I'll remove the stabilization.

I'll post this challenge over at Doom9 also, as we have only three entries so far. Sorry, Sherman!

Rocky and Bullwinkle restoration challenge

Posted: Sat Jan 15, 2022 2:17 am
by thechaoscoder
Strange, must be on your side because it doesn't happen to me and I have had users upload 30GB a couple times (telescope data, OK?).
I used fireftp and now tried it with cyberduck again, but it's more or less the same. The progressbar jumps to 100% in like a second and then after some seconds it aborts...

What's telescope data?

Rocky and Bullwinkle restoration challenge

Posted: Sat Jan 15, 2022 6:51 am
by Rocky
Data collected during telescopic observations.

BTW, I use FileZilla.

Rocky and Bullwinkle restoration challenge

Posted: Sat Jan 29, 2022 10:57 am
by Selur
Just as an idea:
One could blur the hell out of it

Code: Select all

# Imports
import os
import sys
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# Import scripts folder
scriptPath = 'I:/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# Loading Plugins
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/MiscFilter/MiscFilters/MiscFilters.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/GrainFilter/RemoveGrain/RemoveGrainVS.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/libmvtools.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/DePan.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/temporalsoften.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/scenechange.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/DeinterlaceFilter/TIVTC/libtivtc.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/d2vSource/d2vsource.dll")
# Import scripts
import lostfunc
# source: 'C:\Users\Selur\Desktop\rb.m2v'
# current color space: YUV420P8, bit depth: 8, resolution: 720x480, fps: 29.97, color matrix: 470bg, yuv luminance scale: limited, scanorder: telecine
# Loading C:\Users\Selur\Desktop\rb.m2v using D2VSource
clip = core.d2v.Source(input="E:/Temp/m2v_8d5fe18f80d41540b18869e0514a4efa_853323747.d2v")
# making sure input color matrix is set as 470bg
clip = core.resize.Bicubic(clip, matrix_in_s="470bg",range_s="limited")
# making sure frame rate is set to 29.970
clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# cutting from frame 24 to 263  - WARNING: This might cause synch issues
clip = core.std.Trim(clip=clip, first=24, last=263)
# Deinterlacing using TIVTC
clip = core.tivtc.TFM(clip=clip)
clip = core.tivtc.TDecimate(clip=clip)# new fps: 23.976
# make sure content is preceived as frame based
clip = core.std.SetFieldBased(clip, 0)
from vsdpir import DPIR
# adjusting color space from YUV420P8 to RGBS for vsDPIRDeblock
clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_in_s="470bg", range_s="limited")
# deblocking using DPIRDeblock
clip = DPIR(clip=clip, strength=20.000, device_index=0, fp16=True)
# adjusting color space from RGBS to YUV444P16 for vsStab
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16, matrix_s="470bg", range_s="limited")
# stabilizing using Stab
clip = lostfunc.Stab(clp=clip,mirror=0)
# set output frame rate to 23.976fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001)
# Output
clip.set_output()
but the flickering is still there,...

Cu Selur

Rocky and Bullwinkle restoration challenge

Posted: Tue Feb 01, 2022 12:45 pm
by Sherman
Selur wrote:
Sat Jan 29, 2022 10:57 am
blur the hell out of it
Bullwinkle, you approved this guy?

Rocky and Bullwinkle restoration challenge

Posted: Tue Feb 01, 2022 12:49 pm
by Rocky
chaoscoder's restoration looks really good but the whites are just about gone. Hope chaoscoder can look into the white balance and then we would have a real winner. Bright and vibrant, just like Bullwinkle!

Rocky and Bullwinkle restoration challenge

Posted: Thu Feb 03, 2022 2:25 am
by thechaoscoder
I'll try something on the weekend ;)

Rocky and Bullwinkle restoration challenge

Posted: Thu Feb 03, 2022 10:36 am
by Rocky
I'm sure it's gonna be great. Really looking forward to it.

Rocky and Bullwinkle restoration challenge

Posted: Wed Feb 09, 2022 4:25 am
by thechaoscoder
One problem is that some scenes look good while others need stronger settings, so finding a balance is not easy, but I think it's better overall. I tried to stay more on the conservative side and not overdo it. You can get a stronger effect if you remove overlay()

AutoAdjust is the only filter which does not uglify blends and fades.

I added this at the bottom of my script.

Code: Select all

core.avs.LoadPlugin(path=r'C:\AutoAdjust.dll')
core.avs.LoadPlugin(path=r'C:\DGDecodeNV.dll')
clip = core.avs.DGDenoise(clip, strength=0.04, blend=0.7) # remove some "dust" for a slightly cleaner look 
adjust = clip.avs.AutoAdjust(
        auto_gain=True, 
        high_quality = True, 
        #gamma_limit=1.15, gain_mode=0, 
        dark_limit = 1.14, bright_limit = 1.13,
        avg_safety  = 0.7,
        auto_balance = True,
        balance_str  = 0.12,
        temporal_radius = 22)
clip = haf.Overlay(clip, adjust, opacity=0.76)

Test enc with same settings as before https://www.dropbox.com/s/n3js6mb1wke1z ... 3.mkv?dl=1

Rocky and Bullwinkle restoration challenge

Posted: Wed Feb 09, 2022 6:36 am
by Rocky
Thank you the thechaoscoder! I'll check it out today.

Rocky and Bullwinkle restoration challenge

Posted: Wed Feb 09, 2022 3:19 pm
by Britney
Whites look much better. I could dance to that.

Rocky and Bullwinkle restoration challenge

Posted: Thu Mar 03, 2022 4:17 pm
by Rocky
thechaoscoder has won the challenge. Congratulations! We have sent an email to agree the method to send the prize.

All the submitters agreed that this submission was the best, so we dispensed with the poll. ;)

Thank you to all who participated.