Difference between revisions of "Avs"

From SDA Knowledge Base

Jump to: navigation, search
(Installation: copy DGDecode.dll to avisynth plugins dir. I'm going to try to avoid having to manually load plugins.)
(walkthrough pics)
Line 15: Line 15:
  
 
<u>Ideas for guide</u>
 
<u>Ideas for guide</u>
* No more follow-these-steps-blindly instructions this time. Learn or gtfo.
+
* No more follow-these-steps-blindly instructions this time.
* Include more pictures.. haha this page is going to be like 50 megs (or more?).
+
* Include more pictures. Use thumbnails when necessary.
* Maybe separate the guide into multiple pages (see above). Also, won't seem so overwhelming.
+
 
* At the start of each section, show a typical script in progress.
 
* At the start of each section, show a typical script in progress.
 
* Include exercises with downloadable packages containing a video and a partial script.
 
* Include exercises with downloadable packages containing a video and a partial script.
  
  
<b>Stuff to do:</B>
+
<b>Stuff to do:</b>
 +
 
 +
<u>Getting setup</u>
 
* Introduction
 
* Introduction
 
* <s>Setting up a work environment</s>
 
* <s>Setting up a work environment</s>
 
* <s>Installation</s>
 
* <s>Installation</s>
 +
 +
<u>Walkthrough</u>
 +
* Line by line through script with pictures.
 +
 +
<u>The script</u>
 
* Loading the source files  
 
* Loading the source files  
* Fixing Constant audio desync
 
* Fixing Progressive audio desync
 
 
* Appending  
 
* Appending  
 
* Deinterlacing
 
* Deinterlacing
Line 38: Line 42:
 
* SDA StatID  
 
* SDA StatID  
 
* QuickTime compatibility  
 
* QuickTime compatibility  
 +
 +
<u>Extras</u>
 
* Sample scripts  
 
* Sample scripts  
 
* Script verification
 
* Script verification
 +
 +
<u>Fixes</u>
 +
* Fixing Constant audio desync
 +
* Fixing Progressive audio desync
 +
 +
 +
 +
  
  
Line 46: Line 60:
 
#[[#workenvironment | Setting up your work environment]]
 
#[[#workenvironment | Setting up your work environment]]
 
#[[#installation | Installation]]
 
#[[#installation | Installation]]
 +
#[[#walkthrough | Walkthrough]]
  
  
Line 139: Line 154:
 
<!-- <font color=red>Move to a troubleshooting section?</font> - If AviSynth complains that the MSVCR71.dll file is missing, you can download it at http://www.dll-files.com/. Place it in your "C:\WINDOWS\SYSTEM32\" directory.
 
<!-- <font color=red>Move to a troubleshooting section?</font> - If AviSynth complains that the MSVCR71.dll file is missing, you can download it at http://www.dll-files.com/. Place it in your "C:\WINDOWS\SYSTEM32\" directory.
 
<br> -->
 
<br> -->
 +
 +
 +
 +
<br>
 +
<div id="walkthrough" style="background:#194BA2;width:100%;"><font size="+1" color="#FFFFFF">&nbsp;Walkthrough</font></div>
 +
 +
[[Glossary of terms]]
 +
 +
A typical script for DVD video:
 +
<pre><nowiki>
 +
Ac3Source(MPEG2source("VTS_01_1.d2v", upconv=1),"VTS_01_1 T80 2_0ch 192Kbps DELAY 0ms.ac3")
 +
mvbob()
 +
trim(13801,13900)
 +
Lanczos4Resize(640,480)
 +
</nowiki></pre>
 +
 +
 +
Work folder:
 +
 +
[[Image:AviSynth_walkthrough_workfolder.png]]
 +
 +
 +
The first line loads the Ac3 audio and MPEG2 video:
 +
 +
Ac3Source(MPEG2source("VTS_01_1.d2v", upconv=1),"VTS_01_1 T80 2_0ch 192Kbps DELAY 0ms.ac3")
 +
 +
[[Image:AviSynth_walkthrough_loadsource.png]]
 +
 +
 +
Next step is deinterlacing:
 +
 +
mvbob()
 +
 +
[[Image:AviSynth_walkthrough_deinterlace.png]]
 +
 +
 +
Next step is trimming, notice in this example I only chose 20 frames:
 +
 +
trim(17451,17470)
 +
 +
[[Image:AviSynth_walkthrough_trim.png]]
 +
 +
 +
Next step is to resize from DVD's 720x480 resolution to 640x480 resolution:
 +
 +
Lanczos4Resize(640,480)
 +
 +
[[Image:AviSynth_walkthrough_resize.png]]
 +
 +
 +
Here is an extra step I took since I wasn't happy with the darkness of the video:
 +
 +
Tweak(bright=30,cont=1.0)
 +
 +
[[Image:AviSynth_walkthrough_tweakbright.png]]

Revision as of 12:36, 11 April 2009

quick link to old guide
quick link to wiki editing
Anchors


Snow's new AviSynth guide. Yeah, I hope I actually finish this.


Ideas for layout

  • Custom table of contents, not so linear.
  • Use PNG! Lossless is cool.
  • Color headings.

Ideas for guide

  • No more follow-these-steps-blindly instructions this time.
  • Include more pictures. Use thumbnails when necessary.
  • At the start of each section, show a typical script in progress.
  • Include exercises with downloadable packages containing a video and a partial script.


Stuff to do:

Getting setup

  • Introduction
  • Setting up a work environment
  • Installation

Walkthrough

  • Line by line through script with pictures.

The script

  • Loading the source files
  • Appending
  • Deinterlacing
  • Trimming
  • Resizing
  • Sharpening
  • Cropping / Adding borders
  • Color / Brightness
  • SDA StatID
  • QuickTime compatibility

Extras

  • Sample scripts
  • Script verification

Fixes

  • Fixing Constant audio desync
  • Fixing Progressive audio desync




Table of contents:

  1. Introduction
  2. Setting up your work environment
  3. Installation
  4. Walkthrough



 Introduction

IMPORTANT NOTE: AviSynth scripting is an advanced topic. All beginners are recommended to use Anri-chan instead.

Blah blah blah.



 Setting up your work environment

File extensions

You'll very likely need to rename file extensions but they may be hidden by the operating system.

  1. open Windows Explorer
  2. open the Tools menu
  3. select Folder Options
  4. select the View tab
  5. choose to Show hidden files and folders
  6. uncheck Hide extensions for known file types
  7. click OK to apply changes.


AviSynth showhidden.png



Association of avs file extension with text editor

Now that you can see file extensions, let's associate the avs file extension with Notepad or other text editor of your choice.

  1. open Windows Explorer
  2. open the File menu
  3. select New
  4. select Text Document
  5. rename the new text file to New Text Document.avs. It should show up as an unknown type.
  6. open the avs file or right-click and select Open With. Windows will ask which program you want to use.
  7. select Notepad in the list
  8. place a checkmark in the box that says Always use the selected program to open this kind of file
  9. click OK


AviSynth avsnotepad.png



 Installation

Download and install a stable release version of AviSynth

The picture below identifes a stable release.
AviSynth download.png



Download and install necessary AviSynth plugins

  1. Go to Start menu
  2. [All] Programs
  3. AviSynth
  4. Plugin Directory. (This is where AviSynth stores its plugins.)
  5. Copy the files from inside the AviSynth plugins zip file to the Avisynth plugins directory window you just opened.

The plugins directory should look similar to what's shown in the picture. AviSynth will automatically load dll and avsi files.
AviSynth pluginsdir.png



Special instructions for those working with DVD sources
If you followed the instructions on the DVD page properly you should already have DGMPGDec installed. You need to copy a dll file from this directory to the AviSynth plugins directory in order for AviSynth to be able to load DVD video.

  1. navigate to the DGMPGDec directory. Should be C:\Program Files\DGMPGDec
  2. copy DGDecode.dll to the AviSynth plugins directory.



Download and install VirtualDub

This program will be useful for testing your script as you go along.



Verify that everything is installed properly

Download the following package and unzip the contents anywhere you'd like. Run VirtualDub and drag and drop the avs file into the window. You should see a frame that says "So far so good..".




 Walkthrough

Glossary of terms

A typical script for DVD video:

Ac3Source(MPEG2source("VTS_01_1.d2v", upconv=1),"VTS_01_1 T80 2_0ch 192Kbps DELAY 0ms.ac3")
mvbob()
trim(13801,13900)
Lanczos4Resize(640,480)


Work folder:

AviSynth walkthrough workfolder.png


The first line loads the Ac3 audio and MPEG2 video:

Ac3Source(MPEG2source("VTS_01_1.d2v", upconv=1),"VTS_01_1 T80 2_0ch 192Kbps DELAY 0ms.ac3")

AviSynth walkthrough loadsource.png


Next step is deinterlacing:

mvbob()

AviSynth walkthrough deinterlace.png


Next step is trimming, notice in this example I only chose 20 frames:

trim(17451,17470)

AviSynth walkthrough trim.png


Next step is to resize from DVD's 720x480 resolution to 640x480 resolution:

Lanczos4Resize(640,480)

AviSynth walkthrough resize.png


Here is an extra step I took since I wasn't happy with the darkness of the video:

Tweak(bright=30,cont=1.0)

AviSynth walkthrough tweakbright.png

Personal tools