Importing avs and assigning to a variable.
Is there any way to import an avs script wich its result is a video and assign it to a variable:
video=import("MyVideo.avs") last=video I tryed this but it doesn't work. |
Re: Importing avs and assigning to a variable.
Quote:
video=import("MyVideo.avs") return video |
Re: Importing avs and assigning to a variable.
Quote:
Code:
ping=import("E:\DVD Authoring Working Folder\Pitch Black\video.avs").slicer(1,15,1,"ping") It gives me error, gripcrop could not save target frame size as variables, but it plays fine if only import one line. Thanks. |
An avs script is not read with an import, but with an avisource !
This is what I'm currently using to find the complete read time of eight episode of a serie that I put on a single disc : Code:
a=Avisource("509 Schizogenie.avs") |
a) You still apply that ping+pong at once method returning ping+pong.
I thought we have been through this??????? Means: You getting yourself into shemes not needed for a logical programming as thats your intention finally. Also calling a ping on one import and a pong on a second import means 2 times the avisynth's internal sourcevideo call and therefore a double!! Avisynth Memory is needed. you see the point? So as explained some time ago: v=import("E:\DVD Authoring Working Folder\Pitch Black\video.avs") v_ping=v.slicer(1,15,1,"ping") v_pong=v.slicer(1,15,1,"pong") return v_ping + V_pong Results in loeading the Source only ONE time (less caching and Memory usage) or even more logical (as expl. above): import("E:\DVD Authoring Working Folder\Pitch Black\video.avs").slicer(2,15,1,"ping") = SAME result, same Bits sampled and same amount used. Also NO return command needed, no variables needed. b) I dont know whats GripCrop as Error is present here? Did you use it in the inported avs's ??? @Phil Importing avs scripts into a present avs script is the way to go as if Global Variables are determined in the imported avs, theses ones will be recognised in the present Avs Script. If you simply load one using avisource() that means the variables out of the source avs are off. ;) Also speed will be your friend as the videodecoder would have to ecode 3times instead of 2 times. decoding in the source in the import script + decoding import script via avisource() + decoding present script output. vs. decoding in the source in the import script + decoding only present script output. you see :) |
Quote:
It partially works. I did obtain a green screen. I replaced avisource with directshowsource and it worked. But I remember that Incredible said me a time ago that it consumes more recurses. Do you think it is ok to use directshowsource, and why avisource doesn't work? |
See my post above.
Using Directshowsource() is only your water if the roof is on fire, means if nothing else really works. but your approach above DOES work if typed correctly, so try and error till it works ;) - directshowsource is mega affectable via dshow filters in the system and also you cant see which colorspaceroutines really will be handled inside the system. As every individual user which uses your Apps. gots individual decoding routines in its dshow filter components. |
Quote:
Is that Im working on old code when I used that double ping + pong and I don't really realized that it is better import("E:\DVD Authoring Working Folder\Pitch Black\video.avs").slicer(2,15,1,"ping") Thanks for your patience. Edited: It is working well: import("E:\DVD Authoring Working Folder\Pitch Black\video.avs").slicer(2,15,1,"ping") |
Quote:
When you use Gripcrop in the avs you don't have other choice than using avisource Quote:
|
Quote:
|
Quote:
What I say about import vs avisource (or directshow or any other *source command of avisynth) because of problem with Gripcrop is still valid. Avisynth produces an uncompressed avi, this is the base of frameserving. :arrow: RTFM Code:
This is when AviSynth takes action. It opens the videos you referenced in the script, runs the specified filters, and feeds the output to video application. The application, however, is not aware that AviSynth is working in the background. Instead, the application thinks that it is directly opening a filtered AVI file that resides on your hard drive. |
Quote:
If Im child, you are more than fool. What are you saying. I did an avs script with mpeg2source as input and removegrain, deen and gripcrop, gripsize and gripborders. I did another avs script with the command Inc said me: import("E:\DVD Authoring Working Folder\Pitch Black\video.avs").slicer(2,15,1,"ping") and slicer function of course, and it works perfect. Do you have one of those days? Or there are something that I dont understood? :screwy: |
Quote:
(the situation you had in the very first post). This can't work because of static variables that use GripFit. The first import will set them. The second import tries to set them again, but as they are already setted, you obtain the error you reported. I thought you already understood that this was the reason of your problem. And I did not say that with only one import, this does not work (this wasn't clear in my post). |
So, all is clearer than water.
|
Quote:
Quote:
Quote:
|
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.