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 > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 29th December 2002, 20:02   #1  |  Link
framerman
I Am Cornholio!
 
framerman's Avatar
 
Join Date: Nov 2002
Posts: 109
avisynth guide

I'm moving in steps. I started backing up dvd-5 movies. Got that down. Next step is reencoding. Got that down. Now I see stories about avisynth over vfapi to reencode in cce. I want to gain some encoding speed (I'm at .47, 1.0 GHz Celeron, stop chuckling)

My problem is where are some guides that are, like, not so damn confusing and techie. I quickly tried this from the cce guide:

LoadPlugin("C:\Program Files\AviSynth2\plugins\mpeg2dec3.dll")
mpeg2source("C:\MUMMY RETURNS\VIDEO_TS\VTS_01_d2v-vfapi.mpv").
ResampleAudio(44100)

I know there is way more to it than that. I plugged that in and got a screen resolution of 588x56. The frame rate is also off.

I would greatly appreciate any direction.
framerman is offline   Reply With Quote
Old 29th December 2002, 20:19   #2  |  Link
seewen
Registered User
 
Join Date: Jun 2002
Posts: 250
You don't need vfapi anymore with AVisyth. Avisyth can do the job better/faster

You need to resize you video (if you go for a SVCD/CVD).

So first rip the DVD, then make a dvd2avi project.

Then make a script like it ( i assume you have Avisynth 2.5.. ? right ? But it in fact, it's the same with 2.07 )
Code:
LoadPlugin("X:\YourFolder\Mpeg2dec3.dll")
mpeg2source("X:\XourFolder\YourDVD2AVI_project.d2v")

LanczosResize(480,480)
Here you have an script for a SVCD-NTSC, but you can make this :
LanczosResize(480,576) #SVCD-PAL
LanczosResize(352,576) #CVD-PAL
LanczosResize(352,480) #CVD-NTSC

But if you gonna use CCE, and you have an AMD-ATHLON cpu, you must add
Code:
ResampleAudio(44100)
At the very end of your script.

-----
I told you to use LanczosResize, beccause it's my favorite.. But you can use BilinearResize or BicubicResize .


For the FrameRate, Avisynth don't touch it.. So you'll have the same framerate with the script, than in the DVD2AVI project.

( But you could make more "cleaver" script, if you Crop the img, in order to cut the Black Bars of the movie ... I let you see the Avisynth documentation to see how it works.)
seewen is offline   Reply With Quote
Old 29th December 2002, 20:33   #3  |  Link
framerman
I Am Cornholio!
 
framerman's Avatar
 
Join Date: Nov 2002
Posts: 109
Thanks alot. Actually, I'm trying to put this on a dvd. So I'm guessing that my script would say:



LoadPlugin("X:\YourFolder\Mpeg2dec3.dll")
mpeg2source("X:\XourFolder\YourDVD2AVI_project.d2v")

LanczosResize(720, 480)

?
framerman is offline   Reply With Quote
Old 29th December 2002, 20:41   #4  |  Link
framerman
I Am Cornholio!
 
framerman's Avatar
 
Join Date: Nov 2002
Posts: 109
Sorry, I downloaded avisynth package from here today. It seems it's avisynth 2.07, but it opens up in a program called Link2 v. 0.951. Is this correct? I just tried that script and got 488x56.

Oh, also, I'm putting in the mpv file from dvd2avi. This doesn't seem right to me.
framerman is offline   Reply With Quote
Old 29th December 2002, 21:33   #5  |  Link
seewen
Registered User
 
Join Date: Jun 2002
Posts: 250
Quote:
Originally posted by framerman
Thanks alot. Actually, I'm trying to put this on a dvd. So I'm guessing that my script would say:



LoadPlugin("X:\YourFolder\Mpeg2dec3.dll")
mpeg2source("X:\XourFolder\YourDVD2AVI_project.d2v")

LanczosResize(720, 480)

?

For a NTSC DVD it's right.

You should really install Avisynth 2.07 from here : http://sourceforge.net/projects/avisynth2/
(LanczosResize won't work with something earlier than Avisynth 2.06 )

And pay attention that you have to use DVD2AVI 1.76 (maybe 1.77.1, or DVD2AVi_Nic, but I'm not sure..).
Just open the Vob/*.M2V in DVD2AVI, and then File->save Project. (You should maybe read the DVD2AVI guide from Doom9 to know exactly how to use it correctly http://www.doom9.org/mpg/dvd2avi.htm )


And if you use extrenal plugin like "mpeg2dec3.dll", take those that are made for Avisynth 2.0x (aka YUY2 ). And not those for Avisynth 2.5 (aka YV12, Avisynth alpha, avisynth beta.
And if you want to use Avisynth 2.5, you should read this : http://forum.doom9.org/showthread.php?s=&threadid=37276 (all is very well explained in it )

Last edited by seewen; 29th December 2002 at 21:36.
seewen is offline   Reply With Quote
Old 29th December 2002, 22:05   #6  |  Link
scmccarthy
Registered User
 
Join Date: Oct 2002
Posts: 462
Quote:
But if you gonna use CCE, and you have an AMD-ATHLON cpu, you must add
Quote:
ResampleAudio(44100)
You can use besweet to resample the audio also. Then add the wav file with audiodub():

LoadPlugin("X:\YourFolder\Mpeg2dec3.dll")
AudioDub(mpeg2source("X:\YourFolder\YourDVD2AVI_project.d2v"),("X:\YourFolder\YourWav.wav"))

LanczosResize(480,480)
Quote:
Oh, also, I'm putting in the mpv file from dvd2avi. This doesn't seem right to me.
Your right, it's wrong. Until you create a d2v file with DVD2AVI and use that, your just spinning your wheels.

Stephen
scmccarthy is offline   Reply With Quote
Old 30th December 2002, 00:42   #7  |  Link
framerman
I Am Cornholio!
 
framerman's Avatar
 
Join Date: Nov 2002
Posts: 109
I know how to use dvd2avi pretty good. I don't know why I was trying to use the mpv file. I put the d2v file in, have the script exactly as it shows above, put in the audio part just in case (don't have the athlon, celeron, remeber? I said quit chucklin' )but when I try to put in the avs file in Link2 it disappears. Gone.

I'll read up on the threads above. Thanks, I appreciate that.

The other thing is this LanczosResize. Is this something I need as a plugin? Like I said, this is really confusing to me. I don't understand this programming stuff very much, but I am a quick learner.

This is NTSC Region 1 BTW. 720x480.

DVD2AVI v. 1.76 is what I use.

How do you check which version of avisynth you have? It seems that it's a dos type program and the Link2 is the GUI.
framerman is offline   Reply With Quote
Old 30th December 2002, 00:59   #8  |  Link
seewen
Registered User
 
Join Date: Jun 2002
Posts: 250
But WHY do you want to use Link2 or vfapi ???

I really don't understand it..

Just make a DVD2AVI project, then make an AVS script (the same that you made, but refer to the *d2v file).

Then open it in CCE (2.50, 2.64.1.10, 2.66.x), or whatever you want (VirtualDub, etc..).

BUT YOU DON'T NEED LINK2 or VFAPI !


And yes YOU MUST ADD "ResampleAudio(44100)" in the AVS script, if you open it trought CCE and you have an ATHLON (nothing to do with Audio... You MUST DO IT even if there's no Audio in the script !)
---------------------------

If you want to see the Avisynth version, just read the Avisynth documentation.. It's very well explained.
(or try to write a script with "Version()" , an open it in Vdub, for example)
seewen is offline   Reply With Quote
Old 30th December 2002, 01:51   #9  |  Link
scmccarthy
Registered User
 
Join Date: Oct 2002
Posts: 462
Quote:
How do you check which version of avisynth you have? It seems that it's a dos type program and the Link2 is the GUI.
AviSynth is a Windows program that mimick an avi file. If you put avisynth in the system folder and install the registry keys, any program that can open an avi file will be able to open an avs file directly. Don't use link2.

Stephen
scmccarthy is offline   Reply With Quote
Old 30th December 2002, 02:09   #10  |  Link
framerman
I Am Cornholio!
 
framerman's Avatar
 
Join Date: Nov 2002
Posts: 109
My aplogies seewen. That's what I was saying, this is very confusing to me. I actually don't want to use Link2. I thought it was a GUI for avisynth. (What a noob I am) I think I've got a little more of a grasp on it now.

Thanks for being patient.
framerman is offline   Reply With Quote
Old 30th December 2002, 02:46   #11  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
@framerman:

Welcome to the AviSynth world! You are very welcome to ask questions here. Try going through the documentation that came along with AviSynth, search the forums, and visit www.avisynth.org, and soon you'll be the one answering questions!
__________________
Regards, sh0dan // VoxPod
sh0dan is offline   Reply With Quote
Old 30th December 2002, 02:53   #12  |  Link
seewen
Registered User
 
Join Date: Jun 2002
Posts: 250


Avisynth is "just" a frameserver (that's not right, it's really 10'000x more than that ).

There's no GUI for Avisynth. It take a video/(audio) source, give back a video/audio.
And you can apply filters/effects with it. Just by giving some cmd, like "lanczosResize", "mpeg2source", "resampleaudio", etc..


But when you open an AVScript in WindowsMediaPlayer (version 6.4), or Vdub, etc.. It's like if you were opening a regular AVI in it.

LINK2 is a frameserver too, vfapi too, VirtualDub could act as a frameserver too. But Avisynth is the more powerfull (at least for me).

So you only need a frameserver if you won't to apply filters/effect on the video before encoding it. (you need a frameserver if the Encoder you are using cannot open a *.m2v/*.mpg/*.avi/*.d2v too).

But in you case, you want to make a DVD right ? I suppose you want to backup a DVD ?
If yes, you don't need to use "lanczosResize", beccause your source has already the good resolution.

But you may want to apply filters (to de-noise the video, or to make it more sharp, or make it more bright, etc.. ).

If you want to learn Avisynth, you should :
- Read the documentation
- Read some post in the Avisynth part of Doom9 forum
- Try to use DVD2SVCD (it's a good starting point for MPEG-2 world ;-) lol). Set DVD2SVCD (www.dvd2svcd.org) to make a DVD ( you can make SVCD, CVD; VCD and DVD with it), make it run, and then look at the AVisynth script.
- Try to use Gordian Knot (www.gknot.doom9.net) , and see how the AVScript looks like

Last edited by seewen; 30th December 2002 at 02:56.
seewen is offline   Reply With Quote
Old 30th December 2002, 02:59   #13  |  Link
framerman
I Am Cornholio!
 
framerman's Avatar
 
Join Date: Nov 2002
Posts: 109
I'm still having troubles. I appreciate your patience. This is what my script file says exactly:


LoadPlugin("C:\Program Files\AviSynth2\plugins\mpeg2dec3.dll")
mpeg2source("C:\MUMMY RETURNS\VIDEO_TS\VTS_01.d2v")
LanczosResize(720, 480)
ResampleAudio(44100)


This is saved as a file named (VTS_01_d2v-vfapi.avs). I have a dvd2avi file in the same folder named (VTS_01_d2v-vfapi.avi). I also have the d2v file with the same name. When I open up cce, I right click on the screen, press add, select all files instead of .avi's, and select the .avs file above. It immediately closes cce. I tried opening up some of the sample .avs files in cce and it did work, although rather much slower than my vfapi technique before, but it did work. Now I assume I still have something wrong in the script or I have forgotten a step somewhere. You guys are lifesavers to me. If you could help me a little more, I will be forever greatful.
framerman is offline   Reply With Quote
Old 30th December 2002, 04:09   #14  |  Link
framerman
I Am Cornholio!
 
framerman's Avatar
 
Join Date: Nov 2002
Posts: 109
I can't seem to get anything to work in cce. It crashes every time. I went back to square 1 and uninstalled everything and reinstalled. I've got AviSynth 2.07. Extracted it, went to C:\Program Files\AviSynth 2. In this folder is another with examples. I can open these and run them in cce with no problem. I went to the website (AviSynth) and went to square 1 there. Said to make the most basic script there can be. Typed in this:

AVIFileSource("C:\VIDEO_TS\VTS_01_d2v-vfapi.avi")

That's it. This is the avi file that vfapi and dvd2avi created for me. I also have the d2v and ac3 in there also. When I open up cce, right click, add, select avs file, it crashes. But why this and not the examples? Is this not a correct avi file to use? Man this is frustrating!

BTW this (mpeg2dec3.dll), where exactly is this supposed to be, and what does it link to? Man, I feel like such a noob!

Last edited by framerman; 30th December 2002 at 04:12.
framerman is offline   Reply With Quote
Old 30th December 2002, 04:45   #15  |  Link
scmccarthy
Registered User
 
Join Date: Oct 2002
Posts: 462
@frameman

You could be using the wrong version of mpeg2dec6, you want beta6 the earlier AviSynth 2.07 version; or use MPEG2DEC2 instead.

Stephen
scmccarthy is offline   Reply With Quote
Old 30th December 2002, 05:19   #16  |  Link
framerman
I Am Cornholio!
 
framerman's Avatar
 
Join Date: Nov 2002
Posts: 109
I am absolutely baffled. In the folder that came with the AviSynth package, there are examples. One in there is a file named (Version.avs). In this file there is a simple text that says:

# Prints out version information

Version()

I can open this file in windows media player along with all the other example files in there. Now I right click on my desktop, create a new text document. I type in this:

Version()

nothing happens. I thought that I didn't need to type in "Prints out version information". Is this where I'm going wrong? Doom's guide said to just put in

LoadPlugin("C:\Program Files\AviSynth2\plugins\mpeg2dec3.dll")
mpeg2source("C:\MUMMY RETURNS\VIDEO_TS\VTS_01.d2v")
ResampleAudio(44100)

What am I missing? I have read documentation, and threads, and nowhere does it say this.
framerman is offline   Reply With Quote
Old 30th December 2002, 05:27   #17  |  Link
scmccarthy
Registered User
 
Join Date: Oct 2002
Posts: 462
Does your avs file have extension avs?

You have to click save as, then choose all files as type, and save with the avs extension. That file type is registered as an avisyth script.

Stephen
scmccarthy is offline   Reply With Quote
Old 30th December 2002, 05:30   #18  |  Link
seewen
Registered User
 
Join Date: Jun 2002
Posts: 250
For the last time I try to help you:

Download Avisynth from here http://sourceforge.net/project/showf...ease_id=123659
It's an exe ! No need to "extract" anything like you did. So please, download AviSynth_207.exe , and simply run the installer-

Then download Mpeg2dec3.dll beta 6 from there : http://ziquash.chez.tiscali.fr/ (pay attention to download to download the one compatible with Avisynth 1.0 to 2.0.x, it's at the bottom of the page (not the one at the top of the page !)


1) Now re-write your script, and use THIS mpeg2dec3.dll (LoadPlugin(", etc..). Not the one you've try before !

2) Open DVD2AVI 1.76, and NOTHING ELSE than this one. Beccause the newers/others DVD2AVI have changed their structures, and are no more compatible with Mpeg2Dec. (some newers are compatible, but I'm not sure to know exactly the version).

3) Rip your DVD on the HDD with DVDecrypter, for example.

4) Load the VBobs in DVD2AVI (or the *.m2v if you have demuxed the vobs, or the *.mpg if you start from a SVCD or something similar ).

5) Read the DVD2AVI's doom9 Guide, in order to know how to set "Video"->"Field Operation" (Set it on "None", "forced film", "swap field order", depend of your source)

6) "File" -> "Save Project" (in DVD2AVI)

7) when it's done, Re-open your Avisynth script, and give the path/name of the DVD2AVI project (and don't forget to use the Mpeg2Dec3.dll that "I gave you" : Mpeg2Dec3.dll beta 6 from MarcFD )

8) Open the script in CCE.


If you do something else than those 8 points, IT'S POSSIBLE THAT IT WON'T WORK. So please, for the last time, stop using Vfapi or Link2. It's totally useless with Avisynth . Avisynth do the same much better.



You must open your AVS script in Windows Media Player 6.4 NOT 8-9. Or better, open it in VirtzalDub. If it doesn't open, it's beccause Avisynth is not installed, or your script end with something other than *.AVS (probably *.avs.txt )

Last edited by seewen; 30th December 2002 at 05:37.
seewen is offline   Reply With Quote
Old 30th December 2002, 05:49   #19  |  Link
jorel
Guest
 
Posts: n/a
seewen,
very good explanation. it's a tutorial.
  Reply With Quote
Old 30th December 2002, 06:01   #20  |  Link
scmccarthy
Registered User
 
Join Date: Oct 2002
Posts: 462
Quote:
You must open your AVS script in Windows Media Player 6.4 NOT 8-9.
If everything is working right, any program that can open an avi file can open an avs file too. I can run an avs file in WMP9 after a warning about the file type not being known to be able to play. AviSynth can fool a program into thinking its scripts are avi files; that is why AviSynth has avi in its name.

Stephen
scmccarthy is offline   Reply With Quote
Reply

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 09:11.


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