VideoHelp Forum
+ Reply to Thread
Results 1 to 17 of 17
Thread
  1. Member
    Join Date
    Feb 2015
    Location
    Singapore
    Search PM
    Hello, I'm currently trying to input a watermark on my video along with hard-coding some subtitles to my .mp4 video. However, I keep encountering this problem as shown in the image attached below when I click "Preview AVS Script".

    I have absolutely no problem viewing the video before and after attaching the subtitles, but when I edited the script to input the watermark, the error keeps popping up.

    Click image for larger version

Name:	avisynth script error.jpg
Views:	1419
Size:	20.2 KB
ID:	30074

    I have tried installing:

    i) http://www.avisynth.nl/users/warpenterprises/ (remapframes_25_dll_20050826 and imagesequence_20101115 )
    ii) https://www.videohelp.com/tools/ffdshow
    iii) https://www.videohelp.com/tools/Haali-Media-Splitter

    Below is my script:

    LoadPlugin("C:\Users\user\Downloads\MeGUI_2507_x86 \tools\ffms\ffms2.dll")

    #deinterlace
    #crop
    #resize
    #denoise

    LoadPlugin("C:\Users\user\Downloads\MeGUI_2507_x86 \tools\imagesequence_20101115\ImageSequence.dll")
    a1=FFVideoSource("C:\Users\user\Documents\150127 T-ARA @ THESHOW INTERVIEW CUT (720p).mp4")
    a2=ImageReader("C:\Users\user\Documents\logo.bmp")
    a3=ImageReader("C:\Users\user\Documents\logo.bmp", pixel_type="RGB32")
    Overlay(a1,a2,mask=a3)
    Would greatly appreciate if someone could tell me if there is a particular plugin/software/script that can rectify this error, thank you in advance!
    Last edited by vancew90; 7th Feb 2015 at 10:28.
    Quote Quote  
  2. ImageReader() should come default with avisynth install

    Try replacing it with ImageSource()

    Code:
    LoadPlugin("C:\Users\user\Downloads\MeGUI_2507_x86 \tools\ffms\ffms2.dll")
    
    #deinterlace
    #crop
    #resize
    #denoise
    
    LoadPlugin("C:\Users\user\Downloads\MeGUI_2507_x86 \tools\imagesequence_20101115\ImageSequence.dll")
    a1=FFVideoSource("C:\Users\user\Documents\150127 T-ARA @ THESHOW INTERVIEW CUT (720p).mp4")
    a2=ImageSource("C:\Users\user\Documents\logo.bmp")
    a3=ImageSource("C:\Users\user\Documents\logo.bmp", pixel_type="RGB32")
    Overlay(a1,a2,mask=a3)

    If there is alpha channel (transparency) in the bmp logo, and it's not a black/white logo, you need to use showalpha()




    Code:
    LoadPlugin("C:\Users\user\Downloads\MeGUI_2507_x86 \tools\ffms\ffms2.dll")
    
    #deinterlace
    #crop
    #resize
    #denoise
    
    #LoadPlugin("C:\Users\user\Downloads\MeGUI_2507_x86 \tools\imagesequence_20101115\ImageSequence.dll")
    a1=FFVideoSource("C:\Users\user\Documents\150127 T-ARA @ THESHOW INTERVIEW CUT (720p).mp4")
    a2=ImageSource("C:\Users\user\Documents\logo.bmp", pixel_type="RGB32")
    Overlay(a1,a2,mask=a2.showalpha())
    Quote Quote  
  3. Member
    Join Date
    Feb 2015
    Location
    Singapore
    Search PM
    I've tried ImageSource, ImageReader and ImageSequence but to no avail... Thank you anyway, really appreciate it!
    Quote Quote  
  4. Copy & paste the 2nd version of the script above. Post any error messages verbatim
    Quote Quote  
  5. Member
    Join Date
    Feb 2015
    Location
    Singapore
    Search PM
    Originally Posted by poisondeathray View Post
    Copy & paste the 2nd version of the script above. Post any error messages verbatim
    I've tried copying that and also trying the 3 variations (ImageSource, ImageReader, ImageSequence) but the same error still persists

    Click image for larger version

Name:	avisynth script error2.jpg
Views:	1545
Size:	94.0 KB
ID:	30075
    Last edited by vancew90; 7th Feb 2015 at 10:37.
    Quote Quote  
  6. Originally Posted by vancew90 View Post
    Originally Posted by poisondeathray View Post
    Copy & paste the 2nd version of the script above. Post any error messages verbatim
    I've tried copying that and also trying the 3 variations (ImageSource, ImageReader, ImageSequence) but the same error still persists


    It's not possible or you're not reporting what is happening correctly - Does the error message change? For example, if you call ImageSource() it won't give you an error regarding ImageSequence() . It will say something about ImageSource()




    Since FFMS2 is working, you can replace with FFVideoSource() for a single image logo as a workaround until you fix your setup. This won't load an image sequence.

    This assumes that your logo is RGBA (transparent)
    Code:
    LoadPlugin("C:\Users\user\Downloads\MeGUI_2507_x86 \tools\ffms\ffms2.dll")
    
    a1=FFVideoSource("C:\Users\user\Documents\150127 T-ARA @ THESHOW INTERVIEW CUT (720p).mp4")
    a2=FFVideoSource("C:\Users\user\Documents\logo.bmp")
    Overlay(a1,a2,mask=a2.showalpha())


    Or, you probably need to install avisynth. I think some versions of megui have a "portable" avisynth install or something like that it might cause problems
    Quote Quote  
  7. Member
    Join Date
    Feb 2015
    Location
    Singapore
    Search PM
    Originally Posted by poisondeathray View Post
    Originally Posted by vancew90 View Post
    Originally Posted by poisondeathray View Post
    Copy & paste the 2nd version of the script above. Post any error messages verbatim
    I've tried copying that and also trying the 3 variations (ImageSource, ImageReader, ImageSequence) but the same error still persists


    It's not possible or you're not reporting what is happening correctly - Does the error message change? For example, if you call ImageSource() it won't give you an error regarding ImageSequence() . It will say something about ImageSource()
    Yes, the error varies according to the codes that I have tried.


    Since FFMS2 is working, you can replace with FFVideoSource() for a single image logo as a workaround until you fix your setup. This won't load an image sequence.

    This assumes that your logo is RGBA (transparent)
    Code:
    LoadPlugin("C:\Users\user\Downloads\MeGUI_2507_x86 \tools\ffms\ffms2.dll")
    
    a1=FFVideoSource("C:\Users\user\Documents\150127 T-ARA @ THESHOW INTERVIEW CUT (720p).mp4")
    a2=FFVideoSource("C:\Users\user\Documents\logo.bmp")
    Overlay(a1,a2,mask=a2.showalpha())


    Or, you probably need to install avisynth. I think some versions of megui have a "portable" avisynth install or something like that it might cause problems
    I've tried replacing my previous version of avisynth (2.5.8) with the latest one (2.6.0) but I still get the same message...

    And yes, my image file is transparent.


    Click image for larger version

Name:	Untitled1.png
Views:	1289
Size:	55.6 KB
ID:	30077

    Alternatively, I've tried the newest code that you had given me:

    Since FFMS2 is working, you can replace with FFVideoSource() for a single image logo as a workaround until you fix your setup. This won't load an image sequence.
    But instead, this error pops up:

    Click image for larger version

Name:	Untitled2.png
Views:	1115
Size:	57.1 KB
ID:	30078
    Quote Quote  
  8. Erase the "pixel_type" . Re-read/ copy the post again. You probably copy/pasted it before I made a quick eit
    Quote Quote  
  9. Member
    Join Date
    Feb 2015
    Location
    Singapore
    Search PM
    Originally Posted by poisondeathray View Post
    Erase the "pixel_type" . Re-read/ copy the post again. You probably copy/pasted it before I made a quick eit
    Oh yes, it worked like a charm! Thank you so much! But one more thing: This is my current code:

    LoadPlugin("C:\Users\user\Downloads\MeGUI_2507_x86 \tools\ffms\ffms2.dll")

    #deinterlace
    #crop
    #resize
    #denoise

    #LoadPlugin("C:\Users\user\Downloads\MeGUI_2507_x8 6\tools\imagesequence_20101115\ImageSequence.dll")
    TextSub("C:\Users\user\Documents\150127 T-ARA @ THESHOW INTERVIEW CUT.ass", 1)
    a1=FFVideoSource("C:\Users\user\Documents\150127 T-ARA @ THESHOW INTERVIEW CUT (720p).mp4")
    a2=FFVideoSource("C:\Users\user\Documents\logo.bmp ")
    Overlay(a1,a2,mask=a2.showalpha())
    How do I add in a line to include the subtitles that I had attached earlier?

    Click image for larger version

Name:	Untitled3.png
Views:	1090
Size:	52.7 KB
ID:	30079

    Despite this, the subtitles don't show up when I click "Preview AVS Script" because there isn't a line in the script that inputs the subtitles right? I've tried TextSub() but it says "There is no function named TextSub."
    Quote Quote  
  10. You need to load vsfilter.dll for TextSub()

    LoadPlugin("PATH\vsfilter.dll")

    Where "PATH" is the actual directory path




    These observations suggest that you have other problems with your avisynth configuration. Do you have avisynth installed on the system? Or is it a "portable" megui version ?
    Quote Quote  
  11. Member
    Join Date
    Feb 2015
    Location
    Singapore
    Search PM
    Oh my god, it worked like a charm. Thank you so much for helping a tech idiot.

    Yes, I do have avisynth installed in my system through here, the meGUI that I'm using is most probably portable I downloaded the .zip file from here and merely unzipped before using it directly.

    Thank you so much though! Really appreciate it
    Quote Quote  
  12. Yes, but it's just a temporary workaround. FFVideoSource won't load an image sequence. eg. So if you had an animated logo image sequence you could only load the 1st frame.

    It should bother you that things aren't working as they should be (This might indicate that there could be other problems...)




    I can't explain the ImageSource() problem. Was everything downloaded the 32bit versions ?
    Quote Quote  
  13. Member
    Join Date
    Feb 2015
    Location
    Singapore
    Search PM
    I downloaded everything in 64 bit versions since my system is running on 64 bit. Seems like it's more advisable to use the 32bit versions?
    Quote Quote  
  14. For avisynth, the 32bit versions are more stable and have more plugins available

    64bit megui will work fine with 32bit avisynth, since it will "bridge" the pipe to 64bit x264
    Quote Quote  
  15. Member
    Join Date
    Feb 2015
    Location
    Singapore
    Search PM
    Alright, I'll replace my avisynth with the 32bit version, thank you so much for your help, ya! Really appreciate it.
    Quote Quote  
  16. There's an option in MeGUI's settings "always use the included Avisynth". If it's checked it'll be using the portable version of AVIsynth+ regardless of the Avisynth version you have installed.

    Avisynth+ doesn't have all the built in functions of the standard Avisynth, but the plugins giving it some/all of the missing abilities are buried in MeGUI's tools folder. For ImageReader, I think you'd need to load ImageSeq.dll.
    For me (XP) that'd look something like this:

    LoadPlugin("C:\Program Files\MeGUI\tools\avs\plugins\ImageSeq.dll")
    ImageReader("C:\Users\user\Documents\logo.bmp")

    I assume if you switch to the installed version of Avisynth by unchecking the option I mentioned earlier, you won't need to load ImageSeq.dll, although I think the portable version of Avisynth and MeGUI tend to play together a little more nicely.
    If you do switch to the installed Avisynth, you'll probably need to update devil.dll for importing animations as explained here. The newer devil.dll (I assume it's the same one) can be found in the "MeGUI\tools\avs" folder (if you're using the portable Avisynth+, you don't need to worry about it).
    Quote Quote  
  17. Member
    Join Date
    Jan 2019
    Location
    Turkey
    Search Comp PM
    Originally Posted by hello_hello View Post
    There's an option in MeGUI's settings "always use the included Avisynth". If it's checked it'll be using the portable version of AVIsynth+ regardless of the Avisynth version you have installed.

    Avisynth+ doesn't have all the built in functions of the standard Avisynth, but the plugins giving it some/all of the missing abilities are buried in MeGUI's tools folder. For ImageReader, I think you'd need to load ImageSeq.dll.
    For me (XP) that'd look something like this:

    LoadPlugin("C:\Program Files\MeGUI\tools\avs\plugins\ImageSeq.dll")
    ImageReader("C:\Users\user\Documents\logo.bmp")
    ........
    You're great!
    I couldn't do it for 3 days.
    I took care of the information you gave me.
    Thank you so much
    Let me write my own code for example;
    Code:
    LoadPlugin("C:\Program Files (x86)\MeGUI-2896-32\tools\avs\plugins\ImageSeq.dll")
    
    LoadPlugin("F:\Ozgur\Programlar\MeGUI-2896-32\tools\avisynth_plugin\VSFilter.dll")
    
    a1=DirectShowSource("F:\Mic.mp4", fps=30.000, audio=false, convertfps=true).AssumeFPS(30,1)
    a2=ImageReader("F:\LOGO2.png")
    a3=ImageReader("F:\LOGO2.png", pixel_type="RGB32").ShowAlpha(pixel_type="RGB32")
    Overlay(a1, a2, mask=a3)
    TextSub("F:\Mic.srt", 1)
    ConvertToYV12()
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!