![]() |
Are AviSynth scripts, VirtualDub filters run as separate processes?
I assume that when there is an AviSynth script to be run by VirtualDub and VirtualDub filters also need to be applied that they will occur in separate passes. For example, an AviSynth script is processed by VD and VD creates an intermediate file without using any VD filters. Then VD will apply its filters to the intermediate file in a separate pass to create the final output (or another intermediate file to be altered by another AviSynth script). Is there a situation where VD processes an AviSynth script and applies its own filters in the same pass?
|
I almost always apply VirtualDub filters in the same pass when running Avisynth scripts. The exception is when either Avisynth or VirtualDub filters are so slow or touchy that running both gets confusing as to which filter is doing what or results in too many tries to get things coordinated. When using a single pass, I usually start and stop the Avisynth script to make changes and refresh Virtualdub's window using the F2 key or "Reopen video file" to observe the script change effects. Then VDub filters are applied, usually for color work. VDub or script restart will eventually run out of memory, so it's a good idea to save VD filter settings in a .vcf file periodically.
Remember that VDub filters run in RGB, so to make that YUV->RGB conversion properly do it in Avisynth -- especially if the source is YV12 and/or interlaced: Code:
ConvertToRGB32(interlaced=true) |
Some of this is really about how CPUs work, how threading works, how processes work. Due to the nature of Avisynth and VirtualDub -- meaning that it's not an official product, but rather a mishmash/conglmoeration of amateur/indy coding -- it can be all over the map in terms of how it operates.
However, I'm not sure this is what you're asking. And your example isn't accurate. Specifically, this doesn't happen: "VD creates an intermediate file". No such file is created. |
Quote:
|
Avisynth and VirtualDub are both consecutive in how filters are run, though you can sometimes alter this. It really depends on the filter, and the script/chain. Sequence is important, because sometimes you must deinterlace first, or can only us a specific colorspace. It's also why RAM and CPU matters, and why long scripts can crash either (too much data, too many filters).
One of the most important aspects of VirtualDub is indeed to correctly set your colorspace, though I'm not sure how that factoid pertains to the original question. I set mine to YUY2, and rarely change it. This settings should be preserved from session to session, not something that you have to set each time. |
Quote:
LordSmurf you said "And your example isn't accurate. Specifically, this doesn't happen: "VD creates an intermediate file". No such file is created." Not sure what you mean since I set up VDub to create an avi file that I use as just an intermediate video. I then do another pass where I have VDub apply its filters and output another file that I consider another intermediate file or the final file. Maybe we're just caught in a semantics situation. |
Your first statement made it seem as if you thought VirtualDub was creating a file on it's own, and it does not. But if you manually create a file, then VirtualDub of course creates the specified file. Entirely different.
|
An Avisynth script creates a stream of a/v frames. VirtualDub receives that output and allows you to save that stream as an avi file. If you apply VDub filters, VDub modifies that stream and lets you save it as an avi file. If you don't apply any VDub processing the stream is saved as-is, not "created" by Virtualdub.
If you allow VirtualDub to pass and save the file in "full processing mode" without specifying a colorspace or compressor for output, by default VirtualDub modifies the stream by converting it to uncompressed RGB, whether you apply VDub filters or not and whether you specify a different colorspace/compressor or not. If you don't want VirtualDub to use that RGB conversion, specify an output colorspace and compression and specify "fast recompress" mode. VirtualDub has online help. Hit the F1 key. When Help displays, in the left-hand column click "Processing", then click "the pipeline". |
Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.