View Full Version : ffavisynth - ffdshow preprocessing filter for avisynth
pogo stick
16th November 2004, 06:33
New versions of ffdshow include this filter (as well as filters for VirtualDub and DScaler).
Here is what ffdshow's help says about it:
ffavisynth
ffavisynth - Avisynth filter to directly use ffdshow image processing filters from Avisynth scripts
Syntax
ffdshow(string "preset", string "options")
preset - existing ffdshow preset to be used
options - array of "name=value" pairs separated by commas
Both parameters are optional. If preset is not specified, a new preset called ffavisynth is created temporarly. Options override preset settings. List of allowed options names and values is to be written, for now look at registry key HKEY_CURRENT_USER\Software\GNU\ffdshow\default to get the idea.
Limitation
Input and output colorspaces are equal. Even if ffdshow image processing filter chain would produce image with different colorspace, it will be converted to match that on input.
And here is more explanations by Milan:
Try to append this:
ffdshow(options="isLevels=1,levelsMode=0,levelsGamma=1500")
to your script. If it would work, the effect should be very visible.
Another for is:
ffdshow(preset="alread_existing_preset_name")
and you can combine both
ffdshow(preset="alread_existing_preset_name",options="isLevels=1,levelsMode=0,levelsGamma=1500")
which will load preset, modify given values and process video.
I tried some options and it seems to work as it should.
sh0dan
16th November 2004, 08:57
Rock! Really cool feature! Being able to use AviSynth in ffdshow is great, but this is awesome!
Zarxrax
17th November 2004, 06:30
WOW! Just the other day I was wishing for something that does exactly this!
Video Dude
5th December 2004, 02:16
This filter works great.
Valky
21st December 2004, 01:12
I wasn't lucky enough to get this to work. I wonder what I did wrong.
In ffdshow I adjusted my settings so that video looked good. Then I saved my preset to 'e:\avs-testit\' as 'newone'.
Then I tried this script:
AviSource("E:\AVS-TESTIT\testi.avi")
ffdshow(preset="e:\avs-testit\newone")
And it didn't work? It doesn't give me any errors in VD, but I just know that the postprocessing, level adjustment or reize isn't there but video loads fine.
My ffdshow is version from beginning of november. Are there something I didn't understand (well that's obvious...) ?
edit: fortunately VD-plugin works great and I can do the same things there!
marcellus
22nd December 2004, 01:03
Originally posted by Valky
I wasn't lucky enough to get this to work. I wonder what I did wrong.
In ffdshow I adjusted my settings so that video looked good. Then I saved my preset to 'e:\avs-testit\' as 'newone'.
Then I tried this script:
AviSource("E:\AVS-TESTIT\testi.avi")
ffdshow(preset="e:\avs-testit\newone")
And it didn't work? It doesn't give me any errors in VD, but I just know that the postprocessing, level adjustment or reize isn't there but video loads fine.
My ffdshow is version from beginning of november. Are there something I didn't understand (well that's obvious...) ?
edit: fortunately VD-plugin works great and I can do the same things there!
AFAIK the presets in ffdshow are saved only in registry, I don't know how you managed to save a preset on disk (or you just typed a path as a preset name?). Next time try to save the preset to a name like "my_preset" and call it from avisynth with that name, without any path. I did so some time ago and it worked.
Valky
22nd December 2004, 01:59
Originally posted by marcellus
AFAIK the presets in ffdshow are saved only in registry, I don't know how you managed to save a preset on disk (or you just typed a path as a preset name?). Next time try to save the preset to a name like "my_preset" and call it from avisynth with that name, without any path. I did so some time ago and it worked.
In ffdshow you can find 'image settings' in menu where and there you can choose option 'save to file'. You can also load your presets here.
So I saved my preset as 'newone' on that particular folder in my script and I have in that folder 7k file named 'newone.preset'. I tried to open this file in avisynth also with extension, but no luck (no error either and video opens in vd, but without any filtering...).
Also if I open this preset-file in notepad, I can see that there are just those options enabled that I had enabled in ffdshow just before I saved that file, so I dont know why this didn't work
Leak
22nd December 2004, 07:59
Originally posted by Valky
In ffdshow you can find 'image settings' in menu where and there you can choose option 'save to file'. You can also load your presets here.
So I saved my preset as 'newone' on that particular folder in my script and I have in that folder 7k file named 'newone.preset'. I tried to open this file in avisynth also with extension, but no luck (no error either and video opens in vd, but without any filtering...).
Are you sure that the ffdshow-AviSynth-plugin wants a file name here?
Have you tried just creating a preset in the ffdshow config dialog (which gets stored in the registry AFAIK) and using just it's name instead of a filename?
Valky
22nd December 2004, 12:59
Originally posted by Leak
Are you sure that the ffdshow-AviSynth-plugin wants a file name here?
Have you tried just creating a preset in the ffdshow config dialog (which gets stored in the registry AFAIK) and using just it's name instead of a filename?
I have also tried script:
loadplugin("C:\Program Files\AviSynth 2.5\plugins\ffavisynth.dll")
AviSource("E:\AVS-TESTIT\testi.avi")
ffdshow()
And it doesn't work (well video opens fine, but settings aren't there)
Is it broken in this version from Nov 1 ?
Leak
22nd December 2004, 13:42
Originally posted by Valky
I have also tried script:
loadplugin("C:\Program Files\AviSynth 2.5\plugins\ffavisynth.dll")
AviSource("E:\AVS-TESTIT\testi.avi")
ffdshow()
And it doesn't work (well video opens fine, but settings aren't there)
Is it broken in this version from Nov 1 ?
I'd say this doesn't work because, as it's stated in the first post in this thread, if you don't specify anything it'll use a preset named "ffavisynth". If you want to use the current ffdshow settings, you'll probably have to use
ffdshow("default")
or you can just create a new preset by hitting the new button, rename it by clicking twice on "default 1" or what the new one is named and change it's settings to your liking, then using
ffdshow("<name of your new preset>")
and it should work. No files on disk involved - everything gets stored in the registry.
Also, the newest ffdshow build can be found here:
http://celticdruid.no-ip.com/xvid/ffdshow/
Valky
22nd December 2004, 14:08
Originally posted by Leak
[B]I'd say this doesn't work because, as it's stated in the first post in this thread, if you don't specify anything it'll use a preset named "ffavisynth". If you want to use the current ffdshow settings, you'll probably have to use
ffdshow("default")
Ah, finally!
The trick was to use parameter "default" so thank you very much :)
marcellus
22nd December 2004, 15:03
Originally posted by Valky
In ffdshow you can find 'image settings' in menu where and there you can choose option 'save to file'. You can also load your presets here.
Ahh, yes, my mistake, sorry, I was confused ( I was thinking about the encoder's presets, not image processing presets).
Anyway, it seems that ffavisynth cannot call presets that are not already in registry, so for now forget about presets saved on disk.
Originally posted by Valky
The trick was to use parameter "default" so thank you very much
Yes, this does the trick as long you don't modify it (which is very easy to do when you play a file and fiddle with settings). If you like your settings and you want to keep'em for future use create a new preset as Leak told you and give it a name like "denoise" (or something) and call it with
ffdshow("denoise")
It will work, I assure you, and besides you can make as many presets as you need for various movie sources you have and save time that way. This is what a preset is meant for.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.