VideoHelp Forum
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. I tested this on x32 and x64 MeGUI, but after I index this .mkv file (either FFMS or LSMASH) and click Apply Preview, I get this error:

    I tested my MeGUI with other files and they work and apply preview fine except this video.
    Image Attached Files
    Last edited by midts; 9th May 2017 at 05:20.
    Quote Quote  
  2. Groucho2004
    Guest
    Originally Posted by midts View Post
    What is wrong with this video file?
    Nothing. Post the script.
    Quote Quote  
  3. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    The problem is not in the video file, but in the structure of the generated AviSynth script processing it.
    Quote Quote  
  4. It's basic avs script, there's nothing special in it. And I use same exact script for other files and they work.
    HTML Code:
    LoadPlugin("C:\MeGUIx64\tools\lsmash\LSMASHSource.dll")
    LWLibavVideoSource("C:\sample.mkv")
    LoadPlugin("C:\MeGUIx64\tools\avisynth_plugin\TIVTC.dll")
    SetMemoryMax(7168)
    #deinterlace
    #crop
    #resize
    #denoise
    update:
    okay thats funny, preview works if I delete BOTH the
    HTML Code:
    LoadPlugin("C:\MeGUIx64\tools\avisynth_plugin\TIVTC.dll")
    SetMemoryMax(7168)
    If I delete only one of them, it still gives the error, no matter which one I leave, but it works if you remove BOTH of them. These two lines are added into one of my default avisynth scripts. And all videos worked up until now.
    Quote Quote  
  5. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    As already mentioned before elsewhere: Requesting up to 7 GB (Gigabytes!) of RAM for such a basic script is nonsense, and will probably disturb other applications due to a lack of RAM left for them.

    And why import a plugin which is never used with any of its provided functions?

    Furthermore, sometimes the order of commands in a script is important. If you need a SetMemoryMax at all (not here, only for very complex multi-threaded scripts), use it as early as possible. And load all required plugins before using any filter.
    Quote Quote  
  6. Groucho2004
    Guest
    Your script doesn't return a clip because you added statements after the source filter. You should familiarize yourself with Avisynth grammar, particularly the "last" variable.
    Besides, why do you load a plugin if you're not using it? Also, the "SetMemoryMax" statement should be at the beginning of the script (I'm just ignoring the utterly insane value you set there).

    Edit - Ligh was faster.
    Quote Quote  
  7. Groucho2004
    Guest
    Here is some info on "SetMemoryMax". Although setting a high value does less harm in AVS+, you may run into problems due to paging.
    You can use "SetLogParams" in AVS+ as described at the bottom of this post to determine if you need to increase the default value for SetMemoryMax for a given script.
    Last edited by Groucho2004; 9th May 2017 at 09:05.
    Quote Quote  
  8. Putting SetMemoryMax() and LoadPlugin() at the start of your script is good practice -- but not strictly necessary. To clarify things a bit...

    If you don't specify what to output AviSynth will output the result of the last command (comments don't count). SetMemoryMax() does not output a video clip, hence the error. LoadPlugin() will have the same problem. So you can work around the current problem by putting those two commands above LWLibAvVideoSource():

    Code:
    SetMemoryMax(7168)
    LoadPlugin("C:\MeGUIx64\tools\lsmash\LSMASHSource.dll")
    LoadPlugin("C:\MeGUIx64\tools\avisynth_plugin\TIVTC.dll")
    
    LWLibavVideoSource("C:\sample.mkv")
    #deinterlace
    #crop
    #resize
    #denoise
    Another workaround is to specify what to output -- put return(last) at the end of the script:

    Code:
    LoadPlugin("C:\MeGUIx64\tools\lsmash\LSMASHSource.dll")
    LWLibavVideoSource("C:\sample.mkv")
    LoadPlugin("C:\MeGUIx64\tools\avisynth_plugin\TIVTC.dll")
    SetMemoryMax(7168)
    #deinterlace
    #crop
    #resize
    #denoise
    return(last)
    What is "last"? If you don't specify a name for a video stream the name "last" is used instead. So a script that reads:

    Code:
    SetMemoryMax(7168)
    LoadPlugin("C:\MeGUIx64\tools\lsmash\LSMASHSource.dll")
    
    LWLibavVideoSource("C:\sample.mkv")
    FlipVertical()
    is equivalent to:

    Code:
    SetMemoryMax(7168)
    LoadPlugin("C:\MeGUIx64\tools\lsmash\LSMASHSource.dll")
    
    last = LWLibavVideoSource("C:\sample.mkv")
    last = FlipVertical(last)
    return(last)
    Quote Quote  



Similar Threads

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