Rocky and Bullwinkle restoration challenge

Anything related to video and my tools that is not a support request.
User avatar
thechaoscoder
Posts: 49
Joined: Tue Jul 14, 2020 8:34 am

Rocky and Bullwinkle restoration challenge

Post 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.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

Rocky and Bullwinkle restoration challenge

Post 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.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

Rocky and Bullwinkle restoration challenge

Post 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!
User avatar
thechaoscoder
Posts: 49
Joined: Tue Jul 14, 2020 8:34 am

Rocky and Bullwinkle restoration challenge

Post 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?
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

Rocky and Bullwinkle restoration challenge

Post by Rocky »

Data collected during telescopic observations.

BTW, I use FileZilla.
User avatar
Selur
Posts: 134
Joined: Mon Nov 05, 2012 3:49 pm
Location: Germany
Contact:

Rocky and Bullwinkle restoration challenge

Post 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
Attachments
dpir_10sec.zip
10sec DPIR strength 20 sample
(751.79 KiB) Downloaded 319 times
User avatar
Sherman
Posts: 576
Joined: Mon Jan 06, 2020 10:19 pm

Rocky and Bullwinkle restoration challenge

Post by Sherman »

Selur wrote:
Sat Jan 29, 2022 10:57 am
blur the hell out of it
Bullwinkle, you approved this guy?
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

Rocky and Bullwinkle restoration challenge

Post 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!
User avatar
thechaoscoder
Posts: 49
Joined: Tue Jul 14, 2020 8:34 am

Rocky and Bullwinkle restoration challenge

Post by thechaoscoder »

I'll try something on the weekend ;)
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

Rocky and Bullwinkle restoration challenge

Post by Rocky »

I'm sure it's gonna be great. Really looking forward to it.
User avatar
thechaoscoder
Posts: 49
Joined: Tue Jul 14, 2020 8:34 am

Rocky and Bullwinkle restoration challenge

Post 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
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

Rocky and Bullwinkle restoration challenge

Post by Rocky »

Thank you the thechaoscoder! I'll check it out today.
User avatar
Britney
Posts: 145
Joined: Sun Aug 09, 2020 3:24 pm

Rocky and Bullwinkle restoration challenge

Post by Britney »

Whites look much better. I could dance to that.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

Rocky and Bullwinkle restoration challenge

Post 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.
Post Reply