View Full Version : Very slow avisynth script
bwlonsdale
8th January 2005, 23:11
I'm trying to convert my monster inc. (amongst others) HDTV cap to XVID and I've been experimenting with avisynth. I seem to find that it's really relly slow at frameserving. Now I'm not sure if this is normal or not, so I'll go through what I'm doing...
Installed Avisynth latest 2.55
Using ProjectX to create an .m2v file which I have processed with DVD2AVIdg version 1.77.3dg1.0.0RC2 (part of the decodefix100 package with MPEG2DEC3.dll version 1.0.1.0) to create a .d2v file and stored that in the same location as the source video.
I've got an avisynth script which uses FDecimate 1.0.1 from Donald Graft to remove the duplicate frames down to 23.976 and then opening the .avs in VirtualDubMod_1_5_10_1_All_inclusive
I've got a pretty fast PC - an AthlonXP OC'd to 2.7GHz (water-cooled), 1GB of memory,a RAID-0 array and another standard drive. The source .m2v file is on the RAID-0 array and the file I'm writing to is on the other drive.
I'm only getting about 3 or 4 fps from the script at best and I want to know other people's experiences with this - does this sound normal??
The script is:-
loadplugin("E:\Software\Apps\VideoEditing\decodefix100\MPEG2Dec3dg.dll")
loadplugin("E:\Software\Apps\VideoEditing\fdecimate101\FDecimate.dll")
mpeg2source("C:\software\Monsters\monsters.d2v")
FDecimate()
I've been attempting to play the .avs file in windows media player and other players and they all give the 3 or 4fps too so I'm confident that VirtualDub isn't the problem and the bottleneck is avisynth.
Thanks!
scharfis_brain
8th January 2005, 23:22
that sounds pretty normal....
if you intend to reduce the resolution put a resizer before fdecimate.
btw.
selecteven().decimate()
should be much more faster than fdecimate()
bwlonsdale
9th January 2005, 03:56
If that's fairly normal then I'll stop worrying. Some basic DVD->XVID caps I'vd done before have all been in double figures, hence the worry that something was wrong - I'm keeping the resolution the same (it was a 1280x720p cap)
I'm now wondering about frameserving over the network - I have a HTPC which could do the avisynth part and leave the encoding to my main PC.
Any thoughts on how that could be achieved easily?...I've tried just opening the .avs file over the network which just craps out...and everything I've read about frameserving so far has nothing about 'over the network' stuff.
Thanks once more...!
Leak
9th January 2005, 13:31
Originally posted by bwlonsdale
If that's fairly normal then I'll stop worrying. Some basic DVD->XVID caps I'vd done before have all been in double figures, hence the worry that something was wrong - I'm keeping the resolution the same (it was a 1280x720p cap)
Well, if you do the math you'll see that your HDTV capture has about 2.4 times the number of pixels that your DVD conversions had, which means XviD has to work on 2.4 times the pixels per frame, which of course will lower the FPS. Add to that that even less of the image fits into your CPU's level 2 cache (and, depending on your CPU, that a line might not fit completely into the level 1 cache), and I'm not surprised you experience such a drop in frame rates.
np: Pan Sonic - Ahdin (A)
bwlonsdale
9th January 2005, 20:28
Leak - I appreciate the comment and I do realise that the XViD codec is going to be slower. However the question was about avisynth as I've only just begun using it and have no idea what kind of performance I should expect from the filters, either built in or external.
My DVD->XViD conversions have been around 30fps, so to get 3 or 4fps is a huge drop.
scharfis_brain - I've been using FDecimate because it gives very good results. I'll give the selectevent().decimate() a go and see what kind of results it gives.
There are plenty of guides for DVD->XViD conversion but not a huge amount of good stuff on HDTV conversions (yet).
Leak
9th January 2005, 21:01
Originally posted by bwlonsdale
Leak - I appreciate the comment and I do realise that the XViD codec is going to be slower. However the question was about avisynth as I've only just begun using it and have no idea what kind of performance I should expect from the filters, either built in or external.
My DVD->XViD conversions have been around 30fps, so to get 3 or 4fps is a huge drop.
Well, what I said for XviD of course goes for AviSynth when it's processing frames as well, and if you take into account that FDecimate has to look at several images to decide which to drop and which to keep things definitely won't get faster.
AviSynth can be fast or slow, it all depends on what you do with it - and it mostly depends on the plugins you are using.
Why don't you just make a simple AviSynth script that just opens your source and passes it through to VirtualDub, and then preview it? That should give you a good indication of the highest speed possible. I'm certain that adding FDecimate will drop your FPS quite a bit.
(Also, the last AviSynth script I used for DVD->XviD conversion also ran at 3-4 FPS, doing IVTC, denoising, resizing and sharpening. Still, I wouldn't consider it to be very slow; and I also wouldn't call the same speed at HDTV resolution slow, either.)
np: Pan Sonic - Säteily / Radiation (Kesto (234.48:4) (Disc 4))
bwlonsdale
9th January 2005, 21:10
Leak - good advice and I tried what you said. It's rendering around 63fps just serving straight into VirtualDub.
Now the scarey part - just did a nice simple addition of selecteven() and the fps drops to 2 or 3 fps !!!!
That sounds like something is wrong. All that's doing is dropping frames and reducing it hugely.
Any ideas?
Leak
9th January 2005, 21:19
Originally posted by bwlonsdale
Leak - good advice and I tried what you said. It's rendering around 63fps just serving straight into VirtualDub.
Now the scarey part - just did a nice simple addition of selecteven() and the fps drops to 2 or 3 fps !!!!
That sounds like something is wrong. All that's doing is dropping frames and reducing it hugely.
What version of AviSynth are you using?
Oh, and probably try the latest DGDecode that can be found at http://neuron2.net/fixd2v/decodefix.html , as some of the earlier releases (the latest DLL is called dgdecode.dll, not mpeg2dec3dg.dll) IIRC started seeking as soon as you skipped a frame.
This of course makes the framerate plummet if it has to seek to every other frame. Newer versions continue decoding if the new frame is less than IIRC 7 frames away, which would cut your FPS in VirtualDub about in half, but not kill them like this.
np: K-Taro Takanami - Touch 'n Go (Chobits Original Soundtrack 001)
bwlonsdale
9th January 2005, 22:02
Ahh...now that's better!!
Now using the updated DGIndex instead of MPEG2Dec3dg.dll and the framerate is getting up to 25fps now. I had used this earlier today but think it was when I was messing around processing the transport stream directly and there were other errors happening so I'd gone back to MPEG2Dec3dg.dll.
I'm using pulldown(0,3) to give a nice 23.976 film rate instead of the selecteven() parameter.
Thanks for your help!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.