Log in

View Full Version : Crash Course on AviSynth...


RjBeals
30th November 2006, 07:04
I've been reading & reading about avisynth - it amazes me how much info (and filters) are out there. Simply put, I have many old vhs tapes that I want to capture & convert to dvd - keeping as much quality as possible.

I think I can follow the guides to capture lossless using the Huffyuv codec. Files are huge. I can use the filters built into VirtualDub and can see the difference. But I see so many other threads providing avisynth filters. I'm not great at scripting, nor do I have the time to learn the methods behind the madness as I wish I could.

Is there a basic (generic) tutorial on how to use the best filters for cleaning up old home videos? Main goal is to get high quality / low file size divx files to save on DVD's. Maybe edit some special moments together for DVD's, but mainly want divx.

Great forum - enough knowledge here to create a 4yr college bachelor degree!

cacepi
30th November 2006, 07:20
Is there a basic (generic) tutorial on how to use the best filters for cleaning up old home videos? Main goal is to get high quality / low file size divx files to save on DVD's. Maybe edit some special moments together for DVD's, but mainly want divx.
I'm sure other people will mention it, but Avisynth's included documentation really is the best tutorial you can find about its usage. It's well written, includes highly detailed - but lucid - explanations of how to script, and includes docs on the most commonly used filters, all organized by function and/or category. You can't get much better than it and the Doom9 guides (http://www.doom9.org/index.html).

Good luck!

RjBeals
30th November 2006, 19:19
cacepi - thanks for the reply. The documentation did help, and it is making more sense to me. I've spent most of the morning learning about frameservers, Plugins & Filters, Colorspace yada yada.. Although it would be nice if the avisynth.org webpage was up?

I see the list of frequently used filters & descriptions and even read several linked conversations to this forum.

What I'm looking for is almost a predefined avs file that I can simply change the video path & be done (& tweek sizes & variables). Am I aksing too much? Am I the first to ask? So far, thanks to this forum, I have accomplished nothing at work today :scared:

My thought is that being how differnet videos are (even from the same capture source), a pre-defined template would take more work to fix than just adding a few lines of scripts myself.....?

cacepi
1st December 2006, 01:51
What I'm looking for is almost a predefined avs file that I can simply change the video path & be done (& tweek sizes & variables). Am I aksing too much? Am I the first to ask?

You're not the first to ask, but you are expecting much. There really isn't a single "master script" you can use - that I know of, anyway - which can cover all the bases. The variables are too complex: quality of source, compressed vs. uncompressed, deinterlacing and/or ivtc, cleanup, resizing... the list goes on and on.

I'd start with the basics: get a reliable capturing procedure down, one that you can do in your sleep (because trust me, you'll probably have a sleepless night or two figuring one out :)). After you get that, then you can tackle the ins and outs of Avisynth for even more insomnia. :)

PS - I wouldn't worry too much about the Avisynth site being down, as most of the info on it is a mirror of the docs. A few updates here and there, but nothing to get to worked up about.

Good luck!

shevegen
1st December 2006, 06:57
What you should also not forget RjBeals is that there are some DAMN smart people hanging around here (not me but others), they helped me a lot in the past. :)

DarkZell666
1st December 2006, 13:52
Quick advice: you'll have to start learning about how to recognize the different artefacts you're trying to clean first ;)

VHS has specific artefacts which aren't present on DVD's and vice-versa. Each avisynth filter is designed to clean a certain type of artefact, but by tweaking the parameter's you can take shortcuts and clean 2 artefacts at the same time.

Using some filters with too strong settings will produce other artefacts which weren't there before (you must have understood that already reading the docs).

Some of the artefacts I can think of you'll encounter cleaning VHS would be :

- Temporal noise (or just "noise", use a temporal denoiser)
- Blurring (use a sharpening filter, but not too much)
- Haloing (a white echo of objects' edges, slightly shifted a couple of pixels in a certain direction, dehaloing filters exist).
- Chroma bleeding (colors are smudged)
- Rainbowing (you can see a moving rainbow in some parts of the picture, usually on objects' edges, use a chroma denoiser).

You'll find some screenshots of what all these look like somewhere on the net (there was a complete thread about haloing going on recently on Doom9, with screenshots).

Other artefacts you might be interested in :
- Blocking (mostly present in dvd rips or DVB captures)
- Dot crawl (distorted edges, from what I've understood, but different from aliasing)
- Aliasing (there's a SuperResolution script/plugin that has been created recently to deal with this)
- Interlacing (black lines every 2nd line on moving objects, this is normal when dealing with DVD's, but needs to be cleaned when archiving a dvd to xvid/divx/x264 or whatever you prefer)

The scripting syntax in itself is easy, the "hardest" bit is choosing the right filter for the right occasion :)

It took me quite some time to gather all this when I first discovered avisynth so I hope it'll be useful for you ;)

RjBeals
1st December 2006, 15:17
What you should also not forget RjBeals is that there are some DAMN smart people hanging around here...
It seriously blows my mind. How do these people learn all this? Is there a "advanced video for dummies" guide that is out there? I must admit, this week alone I've learned a great deal - but I'm the type of person who likes to know it all. It will be tough to balance work/home/AVISYNTH!! Even last night my wife wanted to watch a movie, and during the movie I was thinking about plugins :D


It took me quite some time to gather all this when I first discovered avisynth so I hope it'll be useful for you ;)

Very Useful.

Last night I plugged the VCR in and captured a 15 minute clip using the Huffyuv codec. File size was like 7gb. I opened the file in virutaldub. Then I started playing with avisynth. Only a couple of hours, but I did get several scripts working, although I can see how tweaking the code can be the hard part. It will just take longer than I hoped.

I’ve seen several threads were people posted their avs scripts & asked for advice – I was hoping that there was a script posted like this that was filled out with the best plugins & best settings for common VHS problems. O-well. You'll probably be seeing more posts from me ! Thanks.

RjBeals
1st December 2006, 22:16
Didn't want to start a new thread for this, so I'll ask here:

3 Questions:

1. If I'm running a lot of filters, including "ConvertToYUY2" I still only have 1 script to load right? each filter will run in the order I script them, before it renders the frame? I think thats correct, but didn't know if I needed to convert to YUY2 first?

2. Again I've searched but can't find: Is it standard practice to load the avs file full of filters, and compress the file via virtualdub? Or do you add a script at the bottom of your avs file to compress?

3. Best method to encode to mpeg2 (DVD's) after running my avs scripts? I guess I need to install an MPEG codec that I can select as my compress option in virtualdub before I process the video?

I'll be an expert soon at this rate

foxyshadis
2nd December 2006, 00:25
1. You can read a script as executing from top to bottom. The reality that it's sort of the opposite only matters if you develop complex scripts.

2. You have to have some host, and most people use virtualdub. There are a lot of other tools that accept avisynth as well, and in particular, vdub can only export avis, not mpegs.

3. You'd probably want to use CCE, Tmpgenc, Quenc, or HC for that. All have GUIs and are quite good, the last two are free as well. The only way to do it in Vdub is by hacking ffdshow, which isn't very good at mpeg2 anyway.

DarkZell666
2nd December 2006, 00:29
1. correct ;) But you might need to ConvertToYV12() or ConvertToYUY2() or even ConvertToRGB32() before every filter that needs it (so you'll end up using several ConvertToxxx in some cases). This is because, as you've noticed, not all filters support all colorspaces :)

2. You can do all your processing in a single script and import other scripts (.avsi files) or plugins (dll files) to use their functions.

3. The avs script you've written is to be used as an input file instead of the original avi/dvd/mp4/whatever file, because the avs script opens that file via avisource() or directshowsource(). Simply use the script in any program that supports avs input and outputs MPEG2 (QuEnc is one of them, Nero also supports avs input but it's rather buggy in some cases).

Edit: beaten by the minute by foxy :p