Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 7th September 2017, 02:30   #1  |  Link
Lynx_TWO
Registered User
 
Join Date: Aug 2005
Posts: 20
Video enchancment / If time was not a factor?

Theoretical Discussion here:

If time and computing power was not a factor:

Main Tools - StaxRip and VapourSynth

Starting video - Interlaced 720p footage (or even interlaced DVD) with some film judder

Workflow:

Step 1. Deinterlace

QTGMC | Keep FrameRate | QTGMC Placebo =
Code:
clip = core.std.SetFieldBased(clip, 2) # 1 = BFF, 2 = TFF
    clip = havsfunc.QTGMC(clip, TFF = True, Preset = "Placebo", FPSDivisor=2, ForceTR=3, NNeurons = 4, SourceMatch=3, Lossless=2, Sharpness=0.0, TR2=3, NoiseProcess=1, NoiseRestore=0.0, Denoiser="dfttest", DenoiseMC=True, NoiseTR=2, NoiseDeint = "Generate", Sigma=4.0)
Step 2. Stabilize high frequency film judder

Stab =
Code:
clip = haf.Stab(clip, range=1, dxmax=4, dymax=4, mirror=0)

Step 3. Upscale for denoiseing and further processing

http://www.infognition.com/videoenhancer/, Super-resolution. Output x254 lossless (q0) or similar, 2 passes to increase resolution to 2880p

Step 4. - Denoising

4pass SMDegrain =
Code:
pass1 = havsfunc.SMDegrain(clip, tr = 3, pel = 2, subpixel = 2, Str = 3.0, blksize = 8, overlap = 2, thSAD = 400, contrasharp = True, truemotion = True, RefineMotion = True)
    pass2 = havsfunc.SMDegrain(pass1, tr = 3, pel = 2, subpixel = 2, Str = 3.0, blksize = 8, overlap = 2, thSAD = 350, contrasharp = True, truemotion = True, RefineMotion = True)
    pass3 = havsfunc.SMDegrain(pass2, tr = 3, pel = 2, subpixel = 2, Str = 3.0, blksize = 8, overlap = 2, thSAD = 300, contrasharp = True, truemotion = True, RefineMotion = True)
    clip = havsfunc.SMDegrain(pass3, tr = 3, pel = 2, subpixel = 2, Str = 3.0, blksize = 8, overlap = 2, thSAD = 250, contrasharp = True, truemotion = True, RefineMotion = True)
Step 5. - Increase detail

This, I don't know... Any machine learning based plugins to do this artificially yet?

Step 6. - Automatic color correction/re-balancing

I don't know any plugins that do this reliably based on scene changes...

Step 7. - Add some really fine grain back into the high rez upscale

TrueGrain or similar?

Step 8. - Downsize back to 1080p

Sinc =
Code:
clip = core.fmtc.resample(clip, w=1920, h=1080, kernel="sinc", taps=128)
Step 9. - Compress

Whatever compression settings you usually work with

---------------------------------------------------------------

Any thoughts or suggestions? Again, we are looking for tools that achieve maximum theoretical quality here. In addition, it would be nice to have a plugin or option to be able to restart a computer as needed without using too much processing time, so processing in chunks might be an option...

Thanks in advance!
Lynx_TWO is offline   Reply With Quote
Old 7th September 2017, 02:33   #2  |  Link
Lynx_TWO
Registered User
 
Join Date: Aug 2005
Posts: 20
and apparently I can't spell
Lynx_TWO is offline   Reply With Quote
Old 7th September 2017, 03:05   #3  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,098
Quote:
Originally Posted by Lynx_TWO View Post

Starting video - Interlaced 720p footage (or even interlaced DVD) with some film judder
Huh ? Isn't that an oxymoron? "interlaced" and "720p" ? If it was "720p" you wouldn't deinterlace . What is the original, original source? film, video ? film transfer to video ? And what you have now ?

Quote:

Step 2. Stabilize high frequency film judder

If there is a film judder, this implies "film" at some point in the history. This probably means you have duplicate frames if you were deinterlacing and using fpsdivisor=2. You should probably decimate duplicates in that case before anything else - because all temporal filters will fail (or work less effectively) when you have duplicates. You need 1:1 unique film frames

Quote:
Step 3. Upscale for denoiseing and further processing
Why upscale ?

And if you have good reasons , why upscale then farther process ? It will just be slower . And then you downscale ? I don't see the benefit
poisondeathray is offline   Reply With Quote
Old 7th September 2017, 05:12   #4  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Los Angeles, California
Posts: 2,060
Upscaling enables subpixel filtering, maybe that's what he wants
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated
feisty2 is offline   Reply With Quote
Old 7th September 2017, 05:22   #5  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Los Angeles, California
Posts: 2,060
Quote:
Step 5. - Increase detail

This, I don't know... Any machine learning based plugins to do this artificially yet?
Yup, key words: pixelRNN/pixelCNN, variational autoencoder, generative adversarial network
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated
feisty2 is offline   Reply With Quote
Old 7th September 2017, 08:28   #6  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 3,483
I'd give serious consideration to denoising with QTGMC, or cranking it's denoising up if it's enabled, rather than following it with SMDegrain (if you're running both on the same video). I find QTGMCs noise removal/blurring ratio is pretty good. Probably better than SMDegrain, especially where there's motion. For reasons I can't recall, when I compared QTGMC's default denoising to Denoiser="dfttest", I prefered the default denoising. I can't remember why as it was a long time ago.

FPSDivisor=2 seems like a horrible thing to inflict on interlaced sources, IMHO.

Speaking of QTGMC, I'd recommend comparing it to SMDegrain for denoising progressive sources.
Because QTGMC "stabilises" the picture, I find when using it for denoising it's often better to use a faster speed preset. The logic being, if QTGMC doesn't remove all the noise, it tends to stabilise what's left, resulting in static noise, if there is such a thing. That can produce something of a "looking through a flyscreen" effect for really noisy sources. Faster presets stabilise less, so faster is sometimes better. I rarely get much more excited than this, aside from adjusting the amount of denoising and changing the speed preset.

QTGMC(InputType=1, Preset="medium", EzDenoise=1.5)

I can't say I'd be inclined to add grain. To prevent banding though, some dithering at the end of the script is usually a good idea.

Gradfun3()

Does all that upscaling and filtering and downscaling again result in a tangible quality improvement? I can't say I've ever tried it.

Last edited by hello_hello; 7th September 2017 at 08:31.
hello_hello is offline   Reply With Quote
Old 7th September 2017, 10:21   #7  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,519
Quote:
Originally Posted by Lynx_TWO View Post
Any thoughts or suggestions? Again, we are looking for tools that achieve maximum theoretical quality here.
The maximum quality at the maximum expense of time would be to take each frame, one by one, and pixel-paint every section of it, taking into account the surrounding zones and scenes (for instance, if another scene is taking place in the decors and/or props of another one, that info may be used to recreate damaged zones of the first scene) - but this is for life sentences
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 7th September 2017, 17:41   #8  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Los Angeles, California
Posts: 2,060
Quote:
Originally Posted by Ghitulescu View Post
The maximum quality at the maximum expense of time would be to take each frame, one by one, and pixel-paint every section of it, taking into account the surrounding zones and scenes (for instance, if another scene is taking place in the decors and/or props of another one, that info may be used to recreate damaged zones of the first scene) - but this is for life sentences
That's exactly how pixelRNN works, it generates pixels based on a Bayes model
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated
feisty2 is offline   Reply With Quote
Old 7th September 2017, 21:31   #9  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 806
I'm suspecting that you're creating a restoration script for some old film? SMDegrain definitely needs to go because it's by nature altering the image on moving objects (destroying the image). The best commercial denoiser on the market is neatvideo but it needs the old virtualdub as a bridge and we didn't have a loadvirtualdubplugin filter in vs. The best all around denoiser in avisynth is MCTD but we don't have a port for it either.
lansing is offline   Reply With Quote
Old 8th September 2017, 01:52   #10  |  Link
cwk
Registered User
 
Join Date: Jan 2004
Location: earth, barely
Posts: 87
Quote:
Originally Posted by feisty2 View Post
Yup, key words: pixelRNN/pixelCNN, variational autoencoder, generative adversarial network
Reading about these things has officially made my head explode. A computer-generated image of a cat that appears natural to human observers. It sounds like I'll be watching HD versions of my 80's era hockey games soon.
cwk is offline   Reply With Quote
Old 8th September 2017, 10:47   #11  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Los Angeles, California
Posts: 2,060
Quote:
Originally Posted by cwk View Post
Reading about these things has officially made my head explode. A computer-generated image of a cat that appears natural to human observers. It sounds like I'll be watching HD versions of my 80's era hockey games soon.
If u define "soon" as "I'm getting my own supercomputer", we all know Moore's law is coming to an end and computers r no longer getting faster rapidly
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated
feisty2 is offline   Reply With Quote
Old 10th September 2017, 20:14   #12  |  Link
Logan9778
Registered User
 
Join Date: Mar 2017
Posts: 59
QTGMC @ Placebo / x264 @ Placebo.
Logan9778 is offline   Reply With Quote
Reply

Tags
color correction, deinterlacing, deinterlacing upsampling, processing

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:11.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.