When I tried to run this AVS script through VirtualDub but I get the error below. Any help? Thanks.Code:Getting started Basically, AviSynth works like this: First, you create a simple text document with special commands, called a script. These commands make references to one or more videos and the filters you wish to run on them. Then, you run a video application, such as VirtualDub, and open the script file. 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.
Code:a1=AVISource("D:\OTA\Video1.avi") a2=ImageSource("D:\OTA\Logo.png",pixel_type="RGB32") a3=Overlay(a1,a2,mask=a2.ShowAlpha())
+ Reply to Thread
Results 1 to 6 of 6
Thread: Execute AviSynth script
Don't see anything wrong with your script but it says line 1, column 3 and that's your '=' sign or there's something between the 1 and =. Might try to retype it or use another variable like a, b, c and try again to make sure it isn't the actual a1 variable?
Trying to put a transparent logo on a video?
Nothing's going to happen in that script , if we're being shown the entire script. I don't know about the rest of it but the result isn't a video file. Maybe add:
at the bottom and see what happens.
Yes, I tried to add a simple water mark.Later, I'll display for 5 seconds for every 20 seconds in the video.
Here is the entire code, no difference except I give it a new variable name. The code is from how to add watermark guide thread.
ab=AVISource('D:\sample2.avi') ac=ImageSource('D:\logo.png',pixel_type='RGB32') ad=Overlay(ab,ac,mask=ac.ShowAlpha()) Return ad
I still get the same error.
Just got done testing and had the same results using AVISource or Directshowsource so I used my standby, FFMPegSource.
After running this it displayed perfectly with transparent logo:
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\ffms2.dll")
v = FFVideoSource("C:\Users\Bud\Desktop\Transparent\sa mple.avi")
A = FFAudioSource("C:\Users\Bud\Desktop\Transparent\sa mple.avi")
ab = AudioDub(V, A)
ac=ImageSource("C:\Users\Bud\Desktop\Transparent\b ud 198x133.png",pixel_type="RGB32")
Comment out all but the avisource line and make sure that plays okay. Mine didn't with either DirectShow or avi sources. Hope it helps.
UPDATE: If you want the transparent watermark type just change overlay line to:
ad=Overlay(ab,ac,x=250, y=150,opacity = 0.3,mask=ac.ShowAlpha())
Opacity runs from 0.0(transparent ) to 1.0 (fully opaque)
Last edited by Budman1; 25th Dec 2013 at 23:48. Reason: opacity