View Full Version : Avisynth 2.5 problems with cce
deXtoRious
26th March 2003, 22:15
Excuse me for interupting your discussion, but after all these problems - isn't it easier to use VFAPI?
Doom9
26th March 2003, 23:12
@dext: I'm afraid you're way off track here. Using AviSynth is not a problem, it's ages faster than VFAPI and it allows us to use filters whereas VFAPI doesn't (IVTC anyone?).
back to topic.. this is just a hunch but Resampleaudio doesn't do anything when there's no audio track, correct? So there's no computational overhead. The AddAudio function on the other hand is doing something which could explain the performance decrease. I'm sure that the material eyes is talking about is not interlaced.
Also, with the YV12 speed increase in the DivX/XviD department I'm not so sure anymore but somehow I thought that DVDs were stored in YUV2 colorspace..
sh0dan
26th March 2003, 23:34
Try Mpeg2Source("file.d2v",idct=5) on P4 or Mpeg2Source("file.d2v",idct=2) on AMD / P3. Finally you could try using YV12ToYUY2() which is the older DVD2AVI conversion routine.
Blankclip() doesn't add that much overhead - close to nothing - besides if you compress without audio, if will never be used.
MPEG2 (as well as MPEG4) is stored in I420 (which is the same as YV12, with swapped chroma channels).
arlsair
26th March 2003, 23:36
Originally posted by Doom9
back to topic.. this is just a hunch but Resampleaudio doesn't do anything when there's no audio track, correct? So there's no computational overhead. The AddAudio function on the other hand is doing something which could explain the performance decrease. I'm sure that the material eyes is talking about is not interlaced.
DDogg tested it and his speed is similar or also little bit faster then without AddAudio. Look here (http://forum.doom9.org/showthread.php?s=&threadid=42924&perpage=30&pagenumber=2).
DDogg
27th March 2003, 01:52
The whole reason for the addaudio() is so you can drag and drop or right click and add a avs file in CCE 2.5 without crashing it. After you save the ECL file with the audio box unchecked, you can do the encode without even using the addaudio() statement in the AVS script.
Just for the heck of it I did 3 15 min tests using 2584 CBR no Vaf. I hand edited the avs script and reloaded the ECL for each test:
LoadPlugin("MPEG2DEC3.DLL")
mpeg2source("D:\Sea\DVD2AV~1.D2V")
LanczosResize(480,360)
AddBorders(0,60,0,60)
ConvertToYUY2()
#ResampleAudio(44100) # Test 1 - 1.534 RT No longer works for add or DragnDrop
#addaudio() # Test 2 - 1.534 RT DragnDrop and Add work
#None # Test 3 - 1.543 RT No DragnDrop or Add
# added # Test 4 - 1.567 RT Test 3 with idct=2
# added # Test 5 - 1.511 RT Test 4 with YV12ToYUY2()
Note: above tests done on slightly tweaked AMD 1.4 TBird. They are only 15 minute tests so the accuracy is questionable. Test 3 might indicate a slightly faster speed. If so, I doubt it is not enough to worry about. /edit In the added Test 4, the idct=2 parameter Sh0dan suggested for AMDs increased speed. :) Test 5 with YV12ToYUY2() was the slowest of all.
Note2: All of the above were done without the mpeg2dec3.DEF file. When the stock DEF file from the zip was added to the directory with mpeg2dec3.dll even though idct=2 was set in it, I noticed a speed decrease. I guess it had something to do with all the other settings in the def file. Until I understand it a bit more I removed it and the speed returned to the above numbers.
wmansir
1st April 2003, 09:06
For some reason AddAudio() was causing errors when I tried to open it in Vdub. When I tried to open the following Avisynth 2.50 beta script with Vdub 1.4.11 the debug screen would pop up with a divide-by-zero error.:
LoadPlugin("C:\easyenc\GORDIA~1\mpeg2dec3.dll")
LoadPlugin("C:\easyenc\GORDIA~1\decomb.dll")
LoadPlugin("C:\easyenc\GORDIA~1\SimpleResize.dll")
mpeg2source("E:\seal\seal.d2v")
Telecide(guide=1).Decimate(5)
SimpleResize(480,480)
Temp=Trim(0,70369).fadeout(30)
Temp+Temp.blackness(150)
Addaudio()
I should let you know that this script is a little deceptive because I installed AviSynth 2.5 and modified several things to get it to work with Gknot without manually modifying the clips too much. Basically, the SimpleResize.dll is actually BicublinResize.dll, renamed so Gknot will load it. And the SimpleResize function call is a macro for:
FastBilinearresize(V,H).converttoyuy2()
The Converttoyuy2() call is to make the clip compatible with CCE. The entire reason I'm trying to use AddAudio is to see if it solves a memory leak problem I am experiencing with the program.
I don't think those things affected the problem I'm having with AddAudio. After some trial and error I tracked the problem down to the BlankClip call in the AddAudio macro. I replaced the line:
v2 = Blankclip(v1,audio_rate = 44100, sixteen_bit=true)
with just
v2 = Blankclip()
and it worked fine. Of course the default clip created by Blankclip() wouldn't match the video properties of the original clip, so they could not be appended, but the audio properties are fine for using in audiodub().
I don't know why I received this error, as no one here has reported it. Perhaps it is related to the use of Blackness? Before posting this I tried upgrading to AVS 2.51 beta, with the same results.
DDogg
1st April 2003, 17:40
The entire reason I'm trying to use AddAudio is to see if it solves a memory leak problem I am experiencing with the program. wmansir, I fear I am missing something. I thought AddAudio() was only to be used as a workaround for the old CCE 2.50 problem of the first load of a avisynth script. It crashes most other apps like VDub and should only be used for CCE 2.50. How would it help solve a memory leak problem? Maybe I missed a thread or something.
/Edit: Ok, I get it. You are saying that the addaudio.avsi can be modified as below and the avs will load in both VDub and CCE 2.50 (and CCE 2.66)(Yep, sure does work AND the script will play in WMP without error). This is great! Good work, sir! Who would have thunk it?
function AddAudio(clip v1) {
v2 = Blankclip()
v1 = AudioDub(v1,v2)
return v1
}
@Sh0dan, is this a feature or a bug? :)
wmansir
2nd April 2003, 01:17
And it does fix a memory leak in CCE 2.66.01.07. Or at least it reduced it to a manageable level. Several people noted the problem in the EclCCE thread in the CCE forum. Someone there said it was due to missing audio, which lead me here. The problem looks like this...
When you add an .avs file without audio to CCE it's pagefile usage increases. It increases by around 20MB-25MB for the files I use, 40-60 minutes of video per file for encoding to SVCD. Removing the file does not release the VM. When encoding, most noticeable multipass or multiple files, the VM memory continues to increase. Since I have my VM hard-coded at around 1300MB the program would fail (after around 4 files, 3 passes each) when it used up all available VM.
By adding audio, the increase in VM is only around 5MB per file added. It still wasn't released when removing files but the leak is reduced considerable. On my system, XP SP1, CCE uses around 190MB VM when first opened. Last night I encoded 4 files, 3passes each, and the final VM allocated was around 350MB. I believe the problem is still there, but adding audio makes it manageable.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.