05-10-2014, 02:34 PM
|
|
Site Staff | Video
|
|
Join Date: Dec 2002
Posts: 14,389
Thanked 2,606 Times in 2,217 Posts
|
|
From now on, I'll be handling the video guides here again. I've been inactive on this front for far too long -- even before my medical episode from 2012 that grounded me for 18+ months (too much work, not enough hobby).
Coming first are my Avisynth processing guides, which I'm working on now.
The primary thing being worked on now is what I called the "MultiScript". It contains the most commonly needed filtering tasks for restoring videotapes and restoring VCDs. This coincides with several personal project, so it'll be perfect. I'm going to consolidate years worth of script into a single script to help others.
And unlike most Avisynth users, who are purists, I only use Avisynth when needed. Some tasks are inferior done in Avisynth, and I'll be pointing those out as well. I don't use multiple programs because I like to -- I use multiple program because I HAVE to! Sometimes VirtualDub, Adobe Premiere Pro and even TMPGEnc Plus 2.5 (shocking, I know!) are better choices -- color corrections, especially.
I'm nowhere near done EDIT -- Now much farther along.
If you want to take a quick peak, here's where I'm at so far:
Code:
### Avisynth MultiScript from lordsmurf @ digitalFAQ.com - see site for usage guides
### Load a file
# SetMemoryMax(512) # multithreaded Avisynth only - before source loaded p1
# SetMTMode(3) # multithreaded Avisynth only - before source loaded p2
# AVISource("c:\.avi")
# ffvideosource("c:\.m2v")
# DirectShowSource("c:\.wmv")
# ImageSource("c:\.jpg")
# SetMTMode(2) # multithreaded Avisynth only - after source loaded
### / Load ----------------------------------------------------------------------------------------
ConvertToYUY2 # script below this line requires YUY2
# ConvertToYUY2(interlaced=true) # alternative that specifies interlacing
### Remove chroma errors
# Cnr2("xoo",4,2,64) # remove chroma banding noise, wide UV setting
# ChromaShift(C=2, L=-8) # align chroma over luma
### YUY2 color corrections
# ColorYUV(autowhite=true) # auto white balance
### Remove VHS magnetic dropouts (bad heads, "comets")
# DePulse(h=100, l=0, d=15, debug=false) # white -min
# DePulse(h=100, l=0, d=10, debug=false) # white
# DePulse(h=70, l=0, d=15, debug=false) # white -max
# DePulse(h=0, l=255, d=5, debug=false) # black
### / YUY2 ----------------------------------------------------------------------------------------
ConvertToYV12 # script below this line requires YV12
### YV12 color corrections
# MergeChroma(aWarpSharp(depth=10), aWarpSharp(depth=20)) # better white balance than ColorYUV(autowhite), use with overlay line below
# Overlay(last, ColorYUV(off_y=-8, off_u=9, off_v=-2), 0, 0, GreyScale(last).ColorYUV(cont_y=30)) # use with mergechroma line above
### Framerates
# AssumeFPS(25) # change NTSC to PAL
### VHS stabilizer
# StabMod() # lordsmurf PRE-deinterlace VHS jitter stab() alternative
### Deinterlacers
# ---- method 1 ----
# AssumeTFF() # optional, BFF for DV source
# QTGMC(Preset="Slower", SourceMatch=3, Lossless=2, MatchEnhance=0.75, TR2=1, Sharpness=0.1) # best but only 2fps!
# SelectEven()
# SelectOdd() # alternative
# ---- method 2 ----
# AssumeTFF() # optional, BFF for DV source
# QTGMC(Preset="Slow") # best deinterlacer - balances speed + quality
# SelectEven() #
# SelectOdd() # alternative
# ---- method 3 ----
# yadifmod(order=1, mode=0, edeint=NNEDI2(field=1)) # faster yadif deinterlace
# ---- method 4 ----
# SeparateFields # basic drop-field deinterlace, useful for some restorations
# SelectOdd
# SelectEven # alternative
### Stabilizers
# ---- method 1 ----
# Stab()
# ---- method 2 ----
# StabMod() # lordsmurf POST-deinterlace VHS jitter stab() alternative
# StabMod() # stackable for bad VHS!
# ---- method 3 ----
# mdata = DePanEstimate(dxmax=0) # stab() alternative
# DePanStabilize(data=mdata, cutoff=0.5, damping=0.5, mirror=15, blur=30, method=1) # must use with mdata
### Antialiasing + compensation for deinterlace
# santiag(strh=2,strv=2) # antialiasing
# santiag(strh=4,strv=4) # antialiasing alternate for toons
# AAA(chroma=true) # antialiasing for toons - use with santiag
# AwarpSharp(depth=10)
# Toon(strength=1.0)
### Common NR
# Deblock() # remove macroblocks
# Deen() # remove edge noise
### Semi-common NR
# DeGrainMedian(limitY=15,limitUV=7,mode=0, norow=true)
# TTempSmooth(maxr=4, strength=4, lthresh=5, cthresh=25, lmdiff=10, cmdiff=15)
# TTempSmooth(maxr=6, strength=4, lthresh=20, cthresh=25, lmdiff=10, cmdiff=15) # jagabo harsh NR
# TTempSmooth(maxr=5, strength=4, lthresh=16, cthresh=4) # further remove anime/toon ghosting post-TMPGEnc
### Less common NR
# RemoveGrain(mode=2, modeU=2, modeV=2)
# DFTTest()
# LSFMod(strength=50)
# FFT3DFilter(sigma=4, bt=3, plane=3)
# SRestore(FRate=29.97) # remove frame blending
# chubbyrain2(th=1, radius=15) # remove moire rainbows
# MosquitoNR(strength=16, restore=64, radius=2) # remove MPEG compression noise from toons
### Sharpeners
# Sharpen(0.5)
### YV12 Color correction
# ColorYUV(levels="PC->TV") # undo overly contrasted values
# ColorYUV(off_y=6, gain_y=-12) # lighten gamma
# ColorYUV(cont_u=-60, cont_v=-160) # increase saturation
# Levels(0,1.000,250,2,255,true)
### / YV12 ----------------------------------------------------------------------------------------
### Final resizers for destination format
# spline36resize(640,480) # resize to 4:3 video
# spline36resize(720,480) # resize to 4:3 DVD
# spline36resize(352,480) # resize to 4:3 Half D1 DVD
### Typical VHS overscan crop
# Crop(8,8,-22,-10) # use both lines
# AddBorders(15, 9, 15, 9) # use both lines
### Less common crop/pad with final resize from non-VHS (VCD,etc)
# spline36resize(640,480)
# Crop(4,4,632,472) # remove 4 overscan pixels
### Crop(16,16,-34,-16)
# spline36resize(720,480)
# AddBorders(16, 12, 16, 12) # add 4x3 overscan borders to cropped VCD
# spline36resize(720,480)
ConvertToYUY2 # assumes VirtualDub or MPEG encoder is next in video workflow chain
# SetMTMode(1) # multithreaded Avisynth only - end of script p1
# GetMTMode(false) > 0 ? distributor() : last # multithreaded Avisynth only - end of script p2
### /end MultiScript
____________
I'll be explaining what everything means, in a series of guides. Feel free to play with it now. And if you have questions, I'll answer them if easy.
Note: Everything is commented out. Uncomment what's needed.
I know a lot of people here are waiting for my help with various issues, and I'm getting to them as quickly as I can. Other site staff are busy on other things right now (hosting topics, new site features, in addition to our customers), so it's mostly just me for now. And I'm going to have some fun with the video topics this year!
|
The following users thank lordsmurf for this useful post:
Atom90 (03-12-2015),
bilisi (08-05-2016),
Delta (05-28-2021),
dknoll (11-17-2019),
giamis (11-29-2023),
ofesad (08-28-2019),
pumapuma (10-13-2016),
sanCapture (07-09-2014),
SimpsonsRule (04-29-2015),
Tafflad (04-16-2016),
tomr (08-16-2014),
Turok81 (08-10-2017)
|
Someday, 12:01 PM
|
|
Ads / Sponsors
|
|
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
|
|
|
07-22-2014, 11:28 PM
|
|
Site Staff | Video
|
|
Join Date: Dec 2002
Posts: 14,389
Thanked 2,606 Times in 2,217 Posts
|
|
^ bump. Still working on this.
Suggestions are always welcome. If good, I'll surely incorporate them.
|
08-10-2014, 06:32 PM
|
|
Free Member
|
|
Join Date: Jan 2014
Posts: 7
Thanked 0 Times in 0 Posts
|
|
Good to hear you are still working on this. I have a project to clean-up and encode about 10hrs of raw VHS video to x264 that I have been procrastinating on for months. My main dilemma is what to do about the interlacing. After comparing 12 different de-interlacing methods I came to the same conclusion that QTGMC provides a good balanced better result.
You might add a ConvertToYV12(interlaced=true) alternate line below the ConvertToYV12 line as well. I noticed a chroma/luma shift issue in my de interlaced video while comparing methods. I think QTGMC also supports YUY2 as well (with mt_masktools v25) so that color conversion might not be needed if just de interlacing.
Are you going to provide links to non built in filters? It took a bit to find a copy of the DePulse plugin.
|
08-10-2014, 07:03 PM
|
|
Site Staff | Video
|
|
Join Date: Dec 2002
Posts: 14,389
Thanked 2,606 Times in 2,217 Posts
|
|
It will be a download pack attached to yet-to-be-made post. No hunting required! Just following the instructions.
Right now, I'm adding some, changing some around. I may go back and edit the above post, to reflect my current script.
I'll look into the QTGMC colorspace -- thanks for the tip!
-- merged --
Script updated to most recent version. About 75% done now.
|
12-08-2014, 10:40 AM
|
|
Free Member
|
|
Join Date: Oct 2014
Posts: 68
Thanked 0 Times in 0 Posts
|
|
I was playing with some of the options in your script lordsmurf and was wondering if I could get a copy of your StabMod() function/dll?
Also with your:
Code:
MergeChroma(aWarpSharp(depth=10), aWarpSharp(depth=20)) # better white balance than ColorYUV(autowhite), use with overlay line below
Overlay(last, ColorYUV(off_y=-8, off_u=9, off_v=-2), 0, 0, GreyScale(last).ColorYUV(cont_y=30)) # use with mergechroma line above
tags. Is it normal not to notice much or any difference when enabling these? Enabling ColorYUV(autowhite=true), earlier in the script instead, makes a drastic change. Not sure it's good though.
Thanks.
JR
Last edited by jriker1; 12-08-2014 at 11:32 AM.
|
04-18-2016, 05:24 AM
|
|
Free Member
|
|
Join Date: Feb 2010
Location: Wales
Posts: 32
Thanked 0 Times in 0 Posts
|
|
As per comment in other thread ... please include CCD (Camcorder Color Denoise) in your multi-script.
Be interested if you will have any additions on Noise Reduction ... using MDegrain2 (or 3)
Look forward to the next update.
|
04-18-2016, 10:22 AM
|
|
Site Staff | Video
|
|
Join Date: Dec 2002
Posts: 14,389
Thanked 2,606 Times in 2,217 Posts
|
|
Quote:
Originally Posted by Tafflad
As per comment in other thread ... please include CCD (Camcorder Color Denoise) in your multi-script.
|
CCD (Camcorder Color Denoise) is a VirtualDub filter. Same for CNR (Chroma Noise Reduction).
Only CNR2 is Avisynth. And I don't often care for it, being that it's inferior to the others.
That other thread: http://www.digitalfaq.com/forum/news...on-chroma.html
|
04-19-2016, 01:23 PM
|
|
Free Member
|
|
Join Date: Jan 2016
Posts: 22
Thanked 9 Times in 4 Posts
|
|
Thanks again everyone for your contribution to this amazing script. Is it now mostly complete or finished? Also, I have got almost everything working except the Stabmod(). Or should I be using Stab() instead?
Thanks!
|
04-19-2016, 01:36 PM
|
|
Site Staff | Video
|
|
Join Date: Dec 2002
Posts: 14,389
Thanked 2,606 Times in 2,217 Posts
|
|
Quote:
Originally Posted by jriker1
I was playing with some of the options in your script lordsmurf and was wondering if I could get a copy of your StabMod() function/dll?
|
Quote:
Originally Posted by pumapuma
except the Stabmod()
|
Here you go. Attached.
Quote:
Originally Posted by jriker1
Is it normal not to notice much or any difference when enabling these? Enabling ColorYUV(autowhite=true), earlier in the script instead, makes a drastic change. Not sure it's good though.
|
It's source dependent. While this line often works, sometimes it does not. If the footage is muddy or lacking good color, it's not going to work well, or at all. This line was created while trying to repair colors on cartoons. It's been useful on live-action as well, but it has to also have decent saturation.
Quote:
Originally Posted by pumapuma
Or should I be using Stab() instead?
|
stab() is too erratic for VHS/tape sources. It's why I made the mod. It's more stable for tapes.
|
The following users thank lordsmurf for this useful post:
dknoll (11-17-2019),
sanlyn (04-19-2016)
|
04-19-2016, 03:58 PM
|
|
Free Member
|
|
Join Date: Dec 2015
Location: USA
Posts: 3,631
Thanked 629 Times in 578 Posts
|
|
Although I know the basic commands of the MS-DOS, I have no clue on how to start with Avisynth it will be nice if there is a step by step guide for dummies.
|
04-19-2016, 06:07 PM
|
|
Premium Member
|
|
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,324 Times in 991 Posts
|
|
That'[s good. If you've typed out some of those goofy DOS command, Avisynth will make a little more sense.
Online help in html format is installed with Avisynth. Here's a link to the Getting Started" page, which is the same as the Help page: http://avisynth.nl/index.php/Getting_started. One note about the tutorial, some versions of this page say you can execute a script in Windows Media Player. Forget it. Use Avisynth.
|
04-20-2016, 02:21 AM
|
|
Free Member
|
|
Join Date: Dec 2015
Location: USA
Posts: 3,631
Thanked 629 Times in 578 Posts
|
|
Guess what the first step where it says version() I have no clue what he is talking about, create a test file with what program?
Ok I read that thing again, So create a text file and name test and put version() in it and change the extension from .txt to .avs and open the text file with VirtualDub ??? I got an error message when opening the script test.avs file, Windows media player plyed the file as expected.
Ok reading more I figure out how to use avisynth with a video file AVISource("C:\Users\PCname\Desktop\test.avi")
But I was able to use it with windows media player only, I need to figure out how to use it with VirtualDub.
Last edited by latreche34; 04-20-2016 at 03:03 AM.
|
04-20-2016, 03:28 AM
|
|
Site Staff | Video
|
|
Join Date: Dec 2002
Posts: 14,389
Thanked 2,606 Times in 2,217 Posts
|
|
Making Avisynth easy is my goal. But it takes time. In recent years, mostly because of my medical issues, time is something I lack. But I do work on this as much as I can.
Perhaps I'll stick up a brief mini-guide, which I can expand on later. Hmm...
|
04-20-2016, 07:10 AM
|
|
Free Member
|
|
Join Date: Feb 2010
Location: Wales
Posts: 32
Thanked 0 Times in 0 Posts
|
|
My mistake thought it was for AviSynth
Just on an understanding Q ....... AVIsynth 'drives' Virtual Dub, i.e the avsi file is loaded or dropped onto VD and it executes.
Can AviSynth therefore not tell VD to use the CCD filter ? ........... and pass it parameters to use ?
Or can't things operate that way.
|
04-20-2016, 07:17 AM
|
|
Premium Member
|
|
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,324 Times in 991 Posts
|
|
Quote:
Originally Posted by latreche34
Guess what the first step where it says version() I have no clue what he is talking about, create a test file with what program?
Ok I read that thing again, So create a text file and name test and put version() in it and change the extension from .txt to .avs and open the text file with VirtualDub ??? I got an error message when opening the script test.avs file, Windows media player plyed the file as expected.
Ok reading more I figure out how to use avisynth with a video file AVISource("C:\Users\PCname\Desktop\test.avi")
But I was able to use it with windows media player only, I need to figure out how to use it with VirtualDub.
|
To open an .avs file with VirtualDub, use " File..." -> " Open video file...", and navigate to the .avs file. VirtualDub doesn't know Avisynth exists -- it just thinks Avisynth's output is another video (which it is, actually). Don't use "run script" -- it's for VirtualDub scripts only, which are not .avs files.
To create or edit .avs files most people use Notepad. When you click "Save" or "Save As" in Notepad, go down to the "Files of type..." window and choose "All files", change the file ending to .avs, and save. OF course, after the script is created and already exists as an .avs, just click "Save" and the .avs file ending will still be there.
Another way to open an .avs in VirtualDub is to go into File Manager (or whatever the Windows Explorer folder browser is called these days, or open with My Computer"), select the .avs file, right click, and in the popup menu choose "Open with..." . When you see the list of programs available for opening files, look for VirtualDub in the list. If it isn't there, go to "Choose Program" and browse for Virtualdub.exe in the VirtualDub program folder, then left-click to open in VirtualDub. After you do this once, VirtualDub will appear in that list of available programs.
|
04-20-2016, 11:55 AM
|
|
Free Member
|
|
Join Date: Dec 2015
Location: USA
Posts: 3,631
Thanked 629 Times in 578 Posts
|
|
I'm still getting an error message when trying to open the .avs file with virtualdub, maybe because avisynth is 32bit and virtualdub is 64bit.
|
04-20-2016, 12:45 PM
|
|
Premium Member
|
|
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,324 Times in 991 Posts
|
|
Yep. That's the problem.
Can't mix 32 and 64. Use 32-bit for Avisynth and Virtualdub. There are very few 64-bit plugins on the planet, and no one is in a hurry to re-develop hundreds of well known 32-bit filters. And here are hundreds of 'em, literally. For Avisynth alone, here is one page: http://avisynth.nl/index.php/External_filters. There are many more listings. VirtualDub, too.
|
04-20-2016, 02:56 PM
|
|
Free Member
|
|
Join Date: Dec 2015
Location: USA
Posts: 3,631
Thanked 629 Times in 578 Posts
|
|
Ok all good now after installing VirtDub 32bit, Where do I get QTGMC and what is the script to remove chroma shifting as well as right side red or green vertical bar on the edge for PAL videos?
One more question, When adding filters to avisynth, should I copy the whole folder of the filter to the plugins folder of avisynth or dump the files of the filters in the plugins folder?
Last edited by latreche34; 04-20-2016 at 03:07 PM.
|
04-20-2016, 03:53 PM
|
|
Premium Member
|
|
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,324 Times in 991 Posts
|
|
Every video requires specific filters and settings. So for your last question it would be better to start a new thread and show us a piece of the video.
For Avisynth and Virtualdub filters, create a folder to contain the download. Downloads are usually zip'd or rar, etc., and decompressing them into your plugins folder will fill the folder with unwanted files, many of which are different versions with the same name, many of which are in zip'd subfolders, and many of which are documentation. Unzip filters in their own folders, then copy the correct file or files into your plugins.
On my PC's I have a big folder for Avisynth plugins and another for VirtualDub's. Inside those folders are subfolders for each filter. The subfolders are also handy for saving articles and examples about using the filters.
QTGMC 3-32 and support files are here: http://forum.doom9.org/showthread.php?t=156028. Use 32-bit only. Avoid the newer 3-33.avsi, it's buggy.
|
04-21-2016, 02:01 AM
|
|
Site Staff | Video
|
|
Join Date: Dec 2002
Posts: 14,389
Thanked 2,606 Times in 2,217 Posts
|
|
I didn't want to do this yet, as it's not tested, and my install guide isn't done.
Attached are (most of) my current plugins from "C:\Program Files (x86)\AviSynth\plugins" on my main system. You need to install Avisynth 2.6 official, and then unzip my plugins into that folder. Yes, overwrite anything if asked.
In theory, anything I say to do will guaranteed work, including anything in my MultiScript.
Attachment fixed. -LS
Older stats: 48 downloads
|
Thread Tools |
Search this Thread |
|
|
All times are GMT -5. The time now is 07:06 PM
|