VideoHelp Forum
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. Member
    Join Date
    Jul 2004
    Location
    United States
    Search Comp PM
    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.
    When I tried to run this AVS script through VirtualDub but I get the error below. Any help? Thanks.
    Code:
    a1=AVISource("D:\OTA\Video1.avi")
    a2=ImageSource("D:\OTA\Logo.png",pixel_type="RGB32")
    a3=Overlay(a1,a2,mask=a2.ShowAlpha())



    Click image for larger version

Name:	duBb.png
Views:	1636
Size:	25.0 KB
ID:	22251
    Quote Quote  
  2. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    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?
    Quote Quote  
  3. 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:

    Return a3

    at the bottom and see what happens.
    Quote Quote  
  4. Member
    Join Date
    Jul 2004
    Location
    United States
    Search Comp PM
    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.

    Code:
    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.
    Click image for larger version

Name:	error.png
Views:	1520
Size:	24.8 KB
ID:	22346
    Quote Quote  
  5. Originally Posted by kj1983 View Post



    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.

    Code:
    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.
    Image
    [Attachment 22346 - Click to enlarge]

    They should be quotation marks "" , not apostrophe ''

    Code:
    ab=AVISource("D:\sample2.avi") 
    ac=ImageSource("D:\logo.png",pixel_type="RGB32") 
    ad=Overlay(ab,ac,mask=ac.ShowAlpha())   
    
    Return ad
    Quote Quote  
  6. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    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")
    ad=Overlay(ab,ac,x=250, y=150,mask=ac.ShowAlpha())
    Return ad

    Click image for larger version

Name:	ScreenHunter_46 Dec. 25 23.40.jpg
Views:	369
Size:	59.0 KB
ID:	22349

    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; 26th Dec 2013 at 00:48. Reason: opacity
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!