Need help with a filter in Avisynth

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
Locked
blaze077
Joined: Sat Feb 27, 2016 2:29 pm
Org Profile

Need help with a filter in Avisynth

Post by blaze077 » Sat Feb 27, 2016 2:47 pm

I just found out about this upscaling filter called Waifu2X. I wanted to try it out but whenever I created an AVS Scrpt adn tried to run it in MeGUI or using the x264 encoder cli, MeFGUI would crash and the x264 encoder wouldn't start encoding. This is my script:
LoadPlugin("C:\Anime Encoding\MeGUI\tools\avisynth_plugin\Waifu2xAvisynth.dll")
LoadPlugin("C:\Anime Encoding\MeGUI\tools\avs\plugins\directshowsource.dll")
DirectShowSource("C:\Users\Blaze\Desktop\Bleach - 01.mkv", fps=24.000, audio=false, convertfps=true).AssumeFPS(24,1)
ConvertToYV12()
waifu2x(nr=0, scale=4, models="C:\Anime Encoding\MeGUI\tools\avisynth_plugin\models", jobs=0)
Any help would be appreciated.

User avatar
l33tmeatwad
Joined: Wed Feb 16, 2005 3:22 pm
Location: Christiansburg, VA
Contact:
Org Profile

Re: Need help with a filter in Avisynth

Post by l33tmeatwad » Mon Feb 29, 2016 11:54 am

DO NOT USE DIRECTSHOWSOURCE!!! I would recommend using LSMASHSource or FFMS2 to handle MKV or MP4 files. Additionally, to gain more information open the script in VirutalDub to see what error code you get exactly and report that back here.
Software & Guides: AMVpack | AMV 101 | AviSynth 101 | VapourSynth 101
PixelBlended Studios: Website | Twitter | YouTube

User avatar
BasharOfTheAges
Just zis guy, you know?
Joined: Tue Sep 14, 2004 11:32 pm
Status: Breathing
Location: Merrimack, NH
Org Profile

Re: Need help with a filter in Avisynth

Post by BasharOfTheAges » Mon Feb 29, 2016 12:06 pm

IIRC, it will take a long time to process footage this way too unless you have a seriously beefy system.
Anime Boston Fan Creations Coordinator (2019-2023)
Anime Boston Fan Creations Staff (2016-2018)
Another Anime Convention AMV Contest Coordinator 2008-2016
| | |

blaze077
Joined: Sat Feb 27, 2016 2:29 pm
Org Profile

Re: Need help with a filter in Avisynth

Post by blaze077 » Mon Apr 04, 2016 8:52 pm

Sorry, I completely forgot to report back. I was disappointed as though I managed to start the process using x264 directly, it was very very slow. Well, I'll just wait until I get a really powerful system.
l33tmeatwad wrote:DO NOT USE DIRECTSHOWSOURCE!!! I would recommend using LSMASHSource or FFMS2 to handle MKV or MP4 files. Additionally, to gain more information open the script in VirutalDub to see what error code you get exactly and report that back here.
Some other people too told me not to use it. Can you please tell me what disadvantage DirectShowSource has?

User avatar
l33tmeatwad
Joined: Wed Feb 16, 2005 3:22 pm
Location: Christiansburg, VA
Contact:
Org Profile

Re: Need help with a filter in Avisynth

Post by l33tmeatwad » Tue Apr 05, 2016 8:21 am

From the AviSynth Wiki:
  • There are some caveats:
  • Some decoders (notably MS MPEG-4) will produce upside-down video. You'll have to use FlipVertical.
  • DirectShow video decoders are not required to support frame-accurate seeking. In most cases seeking will work, but on some it might not.
  • DirectShow video decoders are not even required to tell you the frame rate of the incoming video. Most do, but the ASF decoder doesn't. You have to specify the frame rate using the fps parameter, like this: DirectShowSource("video.asf", fps=15).
  • This version automatically detects the Microsoft DV codec and sets it to decode at full (instead of half) resolution. I guess this isn't a caveat. :-)
  • Also this version attempts to disable any decoder based deinterlacing.
    Try reading AVI files with AviSource first. For non-AVI files, try FFmpegSource or LSMASHSource. If that doesn't work then try this filter instead.
Basically it can't guarantee frame accuracy and it may or may not allow seeking, which is problematic when you try to use any filter that needs to read frames before and after it to work. It's basically still there as a "Hail Mary" in case nothing else works, however FFmpegSource or LSMASHSource will pretty much will read anything.
Software & Guides: AMVpack | AMV 101 | AviSynth 101 | VapourSynth 101
PixelBlended Studios: Website | Twitter | YouTube

blaze077
Joined: Sat Feb 27, 2016 2:29 pm
Org Profile

Re: Need help with a filter in Avisynth

Post by blaze077 » Thu Apr 07, 2016 7:37 pm

l33tmeatwad wrote:From the AviSynth Wiki:
  • There are some caveats:
  • Some decoders (notably MS MPEG-4) will produce upside-down video. You'll have to use FlipVertical.
  • DirectShow video decoders are not required to support frame-accurate seeking. In most cases seeking will work, but on some it might not.
  • DirectShow video decoders are not even required to tell you the frame rate of the incoming video. Most do, but the ASF decoder doesn't. You have to specify the frame rate using the fps parameter, like this: DirectShowSource("video.asf", fps=15).
  • This version automatically detects the Microsoft DV codec and sets it to decode at full (instead of half) resolution. I guess this isn't a caveat. :-)
  • Also this version attempts to disable any decoder based deinterlacing.
    Try reading AVI files with AviSource first. For non-AVI files, try FFmpegSource or LSMASHSource. If that doesn't work then try this filter instead.
Basically it can't guarantee frame accuracy and it may or may not allow seeking, which is problematic when you try to use any filter that needs to read frames before and after it to work. It's basically still there as a "Hail Mary" in case nothing else works, however FFmpegSource or LSMASHSource will pretty much will read anything.
Oh, I see. Thank you. :D

Locked

Return to “AviSynth Help”