To Moderator: I'm not exactly sure how to go about posting this particular thread/question, or if this is appropriate procedure. It's a related concern to my other post only because I've been steered down a solid, very good path that I did not even first consider (i.e. using Avisynth). I've crossed over to the dark side and am interested in using Avisynth. My original thread is still active in the restoration subforum about "proper deinterlace"), but I figured this particular topic about Avisynth plugin can also be seen as a "new" issue that I'm having that might work well in its own separate thread.
Lock, move or merge, or leave active. Appreciative of any advice.
Thread concern: I've copied the .dll file and .avsi file directly into my Avisynth folder, but I'm not even able to get AVSPmod to recognize the filter. There must be something that I'm doing incorrectly. Pictures below.
I have Avisynth 2.6 installed.
I've browsed through some of the pages in the above link, but things still remain a very hazy. I've search the internet, various message boards, I've done the copy and paste .dll file .avsi file into the avisynth plugin folder, but it still doesn't seem to work.
The Hysteria plugin is what I'm after, so that I may specifically darken the lines of cartoons/animations.
http://avisynth.nl/index.php/Hysteria
http://www.aquilinestudios.org/scripts/Hysteria-20100911.avsi
-It says required plugins: MaskTools 2.0 (MT_MaskTools)
-I believe I have "installed" it correct by copying and pasting the .dll file into my avisynth folder.
https://github.com/pinterf/masktools/releases/
Example of what the Hysteria filter/plugin is suppose to do:
http://www.aquilinestudios.org/compare/hysteria.html
The drop down tab in AVSPmod doesn't bring up "Hysteria" instead it bring up "Hysteresis" and I don't believe those two are the same. The command/script/or whatever it's called is:
specific example (can be seen here: http://www.aquilinestudios.org/compare/hysteria.htmlCode:Hysteria()
Code:Hysteria(strength=3.0,luma_cap=225)
The following "plugins" are in the AviSynth plugin folder (or are these referred to as something else, a different term). I have two AviSynth folders (AviSynth and AviSynth 2.5), so I figured I'll just put the Hysteria and masktools2.dll into both locations.
Hysteria-20100911 (AviSynth + Autoload Script)
masktools2.dll
mt_masktools.dll
mvtools2.dll
![]()
+ Reply to Thread
Results 1 to 30 of 111
-
Last edited by strawberryshortcake; 25th Apr 2018 at 02:04.
-
I don't know about Avspmod but what happens if you manually write "Hysteria()" into your script? The drop-down is just a helper.
If it cannot load some plugins or redistributable might be missing (like MS VC++ 2017 redist (32 bit)). Often you can debug such problems using avsmeter -avsinfo -
Not exactly sure how to decipher it, but I get the following message in red letters in AVSPmod (#1 this is the original AVSPmod that I downloaded).
Hysteria: YV12 input only
(Hysteria-20100911.avsi, line 78)
(New File, line 2)
I still want to know how to address or add in plugins (for future reference), but I decided to just go with the available installation pack for the time being found in the link below (animevideomusic.org) It worked, now I can do the hysteria thing; opening the AVSPmod that was packaged with the AMVpack worked. The drop down suggested menu tab shows "Hysteria".
When I did install the AMVpack (double click on it), it did prompt me to install some type of Microsoft Redistribution thing or whatever it's called like you pointed out. I still have the AVSPmod (original #1) that still doesn't have the drop down suggestion for hysteria, it's still hysteresis, but with the new AVSPmod (#2) that was packaged with the AMVpack it does work with hysteria ()
However, this doesn't really "teach me to fish" so to speak ; it's simply giving me the fish. Not going to know exactly how to properly "install" plugins.
AMVpack 64bit version.
https://www.animemusicvideos.org/forum/viewtopic.php?f=11&t=121948
AMVpack is an installer package for all the tools commonly used for handling and preparing footage for use in making AMVs. This is similar to AMVapp but is more up to date and will have an expiration date so that old versions will not run. I plan to keep this as up to date as possible and will try to have one release a year to help maintain the latest usable versions of any particular item in the package.
Download: Windows (x86/x64) / macOS / Sources
NOTE: THIS PACKAGE EXPIRES AND WILL NOT INSTALL AFTER DECEMBER 31, 2018!
I also don't quite understand the paragraph statements. It's set to expire, so does that mean after December 31, 2018, the program will stop working? -
The error message indicates Hysteria is installed but the video needs to be YV12, not whatever DirectShowSource() output. Add ConvvertToYV12(interlaced=true) between the two lines.
-
Script error: there is no function named "ConvvertToYV12" (New File, line 2)
[Attachment 45391 - Click to enlarge]
Then I thought maybe I should take out the extra "v" inside "ConvvertToYV12," but then I get another strange error.
[Attachment 45390 - Click to enlarge] -
AvsPmod crashed. Why don't you forget it for now, edit your scripts in Notepad and test them in Virtualdub2
-
Oops. I typed too many v's.
That's is the correct solution. I don't know why the program crashed. Possibly a version incompatibility problem between masktools 2.0 and Hysteria?
I tried it here with both 32 bit AviSynth (and 32 bit VirtualDub) and 64 bit AviSynth+ (and 64 bit VirtualDub). Both had no problems with an animated DVD source.Last edited by jagabo; 25th Apr 2018 at 18:01.
-
That type of error usually means plugin autoload issue . Look at some of your old plugins , clean out the ones you don't need (just put them into a different folder). You have 2 versions of masktools. Put mt_masktools into a different folder .
-
I'm still a complete novice to the world of avisynth. It's been less than a day of cumulative hours. The script and even the very first script is mostly a copy and paste job from seasoned veterans. I figured having the drop down menu in AvsPmod would be a good starting point; a guidance down the correct path of sort.
I think it does boil down to a compatibility issue. I did exactly what poisondeathray suggested, moved "mt_masktools " to a different location and now your suggestion to insert ConvvertToYV12(interlaced=true), after hitting F5 works. No errors returned.
Did exactly what you suggested there, moved mt_masktools outside of the plugin folder and now F5 to refresh/preview works.
What I still don't understand is why the dropdown suggestion menu in AVSPmod (#1) still doesn't show Hysteria as one of the selectable choices. I figured as newbie to the world of AVSPmod/Avisynth, if the code word is available within the drop down menu, gets its own color and bolded when selected, then the plugin was correctly installed. I did type the following, press F5 and did see changes to the video image. So it works, but just wondering why the world Hysteria is not one of the available option in the drop down menu in AVSPmod (#1)
Code:Hysteria(strength=9, usemask=true, lowthresh=6, highthresh=20, luma_cap=191, maxchg=255, minchg=0, showmask=false)
Figure 1: Shows mt_masktools moved out of the plugin folder, and this did the trick.
Figure 2: Show masktools2.dll in the plugin folder along with hysteria
Figure 3: Even though pressing F5 to preview works with the Hysteria code, I'm just wondering why "Hysteria" is not part of the suggested drop down menu.
Figure 4: This was the error situation when I still had mt_masktools within the plugin folder of avisynth. Something was in conflicted.
AVSPmod (#2) Has the Hysteria drop down menu and all the settings shown, Hysteria font is colored, and bold
AVSPmod (#1) Doesn't have the hysteria drop down menu, letters font is thin black.
Question remains: I'm guessing I "installed" the .dll file sort of correctly (by copying and pasting it directly into avisynth plugins folder? And is this basically the way to do it with all plugins? Just copy and past the .dll file into the Avisynth plugins folder.
And the same goes for something like this (random google search) .... just copy and past the .dll into the avisynth plugin folder.
http://avisynth.nl/index.php/Toon_v0.82 -
"dll hell" is an avisynth rite of passage . Nobody "levels up" until they waste hours cleaning up dll's
Not sure what you mean ?
Do you mean autofill / autocomplete ? It has to be either an autoloaded.dll or .avsi at runtime to load when you start avspmod . There are options to enable/disable. options=>program settings=> auto complete . It might be disabled partially in the one that doesn't work
-
-
It's probably just an older version. Just download the newest version. Maybe it's even newer than your #2
The problem with downloading prepackaged collections is some plugins, dlls, avs's are outdated, but some might not be. It's a surefire way to enter "DLL HELL"hahaha
It's tough organizing the plugins directory. Some people use LoadPlugin() for everything . Autoload slows avisynth initialization. The more junk you have in the directory, the slower it is to startup. I only keep the plugins directly autoload with a few things that I use often. The others are in subdirectories and don't autoload. Each directory is labelled so I know which versions are using on this particular install -
I'll look into that this weekend. But in the meantime, do you know how I would go about batch converting multiple TV episodes using the following script or any script for that matter creating in AVSPmod Will&GraceScriptEDITPERYOUTUBEinstructions.avs
I've been using a .bat file to convert everything within a follder. Makes things easier, videos to be converted in one folder, double click on .bat file and done.
Code:if not exist NewlyConvertedFilesDenoise md NewlyConvertedFilesDenoise for %%a in ("*.mkv") do ffmpeg -re -y -i "%%a" -c:v libx264 -preset veryslow -tune film -crf 24 -vf hqdn3d -c:a ac3 -ac 2 -b:a 128k "NewlyConvertedFilesDenoise\%%~na.mp4" pause
Conversion.bat, I tried sticking the .avs file anywhere, and doesn't seem to work. Theoretically it should right?
===========================================
if not exist NewlyConvertedFilesDenoise md NewlyConvertedFilesDenoise
for %%a in ("*.mkv") do ffmpeg -i Will&GraceScriptEDITPERYOUTUBEinstructions.avs
-re -y -i "%%a" -c:v libx264 -preset veryslow -tune film -crf 24 -vf hqdn3d -c:a ac3 -ac 2 -b:a 128k "NewlyConvertedFilesDenoise\%%~na.mp4"
pause
===========================================
if not exist NewlyConvertedFilesDenoise md NewlyConvertedFilesDenoise
for %%a in ("*.mkv") do ffmpeg -re -y -i "%%a" -i Will&GraceScriptEDITPERYOUTUBEinstructions.avs
-c:v libx264 -preset veryslow -tune film -crf 24 -vf hqdn3d -c:a ac3 -ac 2 -b:a 128k "NewlyConvertedFilesDenoise\%%~na.mp4"
pause
=========================================== -
Each script reference a single video. So you would need a script for each episode. There are various avs batch scripters.
It would be *.avs as the input, not *.mkv. Because the avs is the actual direct input. You would need to include audio in the avs since you're encoding audio. I would use AAC instead of AC3 at 128kbps
Code:for %%a in ("*.avs") do ffmpeg -i "%%a" -re -y -c:v libx264 -preset veryslow -tune film -crf 24 -vf hqdn3d -c:a ac3 -ac 2 -b:a 128k "NewlyConvertedFilesDenoise\%%~na.mp4" pause
-
If it helps, I have a batch file that builds an AviSynth script given a filename:
Code:"G:\Program Files\DgIndex\DGIndex.exe" -i "%~1" -o "%~dpn1" -fo 0 -om 2 -exit echo Mpeg2Source("%~dpn1.d2v", CPU2="ooooxx", Info=3) >> "%~1.avs" echo TFM(d2v="%~d1%~p1%~n1.d2v") >> "%~1.avs" echo TDecimate() >> "%~1.avs"
DgIndex doesn't work well for MPEG 2 video in MKV files. If your sources are MKV (from MakeMKV?) it may be necessary to demux the video first. -
And for the ffmpeg command you need to add -vf setsar as in the other thread to signal aspect ratio. Because .avs scripts do not pass that info, but ffmpeg can read AR directly on most types of video files. The value will change between 4:3 and 16:9 sources. You would add it in the same linear chain of filters
so if you were using hqdn3d, just add it on
Code:-vf hqdn3d, setsar=sar=8/9
-
Per Poisondeathray request.
Uploading an undemuxed (original VOB cut sample) of Will and GraceLast edited by strawberryshortcake; 27th Apr 2018 at 23:22.
-
EDIT:
I tried it out, and it works, but I was hoping for a "real" batching process for all 200 plus TV episodes in my folder. I tried sending the entire folder to the .bat file and also tried dragging the entire folder onto the .bat file but that didn't work. It only converts one file at a time, and when done it stops. It doesn't start converting the second or subsequent files. Is it suppose to only do one file at a time? Meaning I have to drag one file to it, let it finish, then drag a second file, let it finished, and repeat the process until all 200 plus TV episodes are done? I was hoping that I could select all VOB files or all .mp4 files and drop it onto the .bat file.
I found this thread and it basically has sort of does what I want. I'm still testing it out, but I can't seem to get multiple .avs (created directly using a .vob file) to merge with multiple .ac3 files. If I recall correctly, if I created multiple .avs files using multiple .mp4 files, then it works.... I think.
https://forum.videohelp.com/threads/381345-(Help-Needed-with-ffmpeg)-how-do-i-batch-me...to-video-files
Last edited by strawberryshortcake; 27th Apr 2018 at 23:32.
-
You would combine poisondeathray's ffmpeg/for loop with my batch builder to process each mkv file.
-
Thanks for the VOB sample. Sorry, but can you cut a longer sample, say 2 min starting from the beginning?
Background info - this is for debugging ffmpeg IVTC.
The workaround is to use dejudder for mixed ntsc streams
eg.
Code:-vf "dejudder,fps=30000/1001,fieldmatch=combmatch=full,yadif=deint=interlaced,decimate,setsar=sar=8/9"
But but still not as good as avisynth. 2 issues remain -
1) which I remuxed the elementary video and audio from the other thread, it started dropping wrong frames again. So I wanted to check a native stream as-is in case ffmpeg was picking up some weirdness from timestamps. It doesn't seem as adaptive as TIVTC, and more prone to issues
2) the threshold for combing in fieldmatch is off. It's not as clean as avisynth TIVTC. It either deinterlaces too much (aliasing artifacts, resolution loss) , or too little (missing some combed frames) despite adjusting the cthresh value incrementally. But cthresh does work (you can see a difference from lower to higher values) , it's just that it's off there is no value that makes it as clean as avisynth's default "9" .
The bottom line is avisynth TIVTC and vapoursynth VIVTC can do it , and cleaner. So why can't ffmpeg do it ? Much of the code is ported from TIVTC and VIVTC.
For the IVTC part, and I alluded to this earlier, one difference is the indexing. DGIndex / dgdecode is super consistent for DVD/mpeg2 source. If you use other source filters, even indexed ones like ffms2 instead, then avisynth becomes less reliable as well.
For the marked as combed / comb detection part - not sure. It's passing which frames are combed to yadif. But there is no value that makes it as good as avisynth... I would haev expected matching values for everything should have given identical results... that' s not the case
I'm trying to look at dozens of examples from the past where ffmpeg IVTC has issues in more detail and eventually put together a bug report for the dev's . -
-
yes it does help, thanks for samples
I'm going to go through them (and a bunch of others) and try to figure out why ffmpeg isn't getting as clean results. It still has a few too many duplicates on some streams, even with the dejudder workaround, and the cthresh isn't working as well as it should be
ffmpeg IVTC is still too inconsistent right now IMO, but hopefully we can help improve it . It would be nice to not have to create avs or vpy scripts one day for a IVTC only -
-
I guess the edit button doesn't allow attachments.
Here's a few more ... Animations this time. -
Just in case, the more the merrier.
Four total, 3 live, 1 animation. -
Just give parameters for vapoursynth filters that make IVTC work as intended. Than I will compare with lavfi.
-
Here's a simple batch file combining my earlier AVS_Mpeg2Source.bat and ffmpeg to encode/mux all VOB files in a folder:
Code:for %%a in ("*.VOB") do ( AVS_Mpeg2Source "%%a" del audiofile.ac3 ren "%%~na*.ac3" audiofile.ac3 "g:\program files\ffmpeg\bin\ffmpeg.exe" -i "%%a.AVS" -i audiofile.ac3 -y -c:v libx264 -preset veryfast -tune film -crf 24 -vf hqdn3d -c:a copy "NewlyConvertedFilesDenoise\%%~na.mp4" del audiofile.AC3 del "%%a.AVS" del "%%~na.d2v" del "%%~na.d2v.bad" del "%%~na.fix.txt" )
Last edited by jagabo; 28th Apr 2018 at 16:23. Reason: added "-c:a copy" to ffmpeg command line to copy audio instead of encoding to aac
-
Thanks for your input.
In case others were not aware, richardpl is a ffmpeg developer
Just so we are on the same page, lets start with the same sample first.
"Will & Grace S1 D1 Ep2 - A New Lease on Life NEXTEST.demuxed.m2v" from post 34 in the other thread
https://forum.videohelp.com/threads/388818-What-is-the-proper-way-to-deinterlace-Sourc...e2#post2518254
1) avisynth output should be compared. Because it's the "gold standard", and everything was derived from TIVTC (Tritical, Kevin Stone).
2) It still gives better results than VIVTC; even in default mode TIVTC will sometimes find a match where VIVTC using the same settings will not - this results in more frames which are deinterlaced (artifacts, lower resolution)
3) But VIVTC still gives better results than ffmpeg, using same settings
4) For avisynth , to view the field match only, I would disable PP modes in TFM(PP=0), so you can "see" the combing. You can replace the comb fall back with better deinterlacers, like QTGMC for Clip2. This can be done in vapoursynth too with functools. But a standard/automatic IVTC in avisynth would just be TFM().TDecimate(). That's it. But I think (I know) a critical difference in the consistency is the d2v. If you replace that source filter with something else, avs becomes less reliable too
5) For vapoursynth, you would use d2vsource too. You can use what is suggested in the docs for VIVTC
http://www.vapoursynth.com/doc/plugins/vivtc.html , but some people use TDeintMod for the comb detection. Nnedi3/eedi3 or QTGMC are usually used for the combing fallback . Let me know if you want any variations posted
eg. vapoursynth default IVTC
Code:input_clip = core.d2v.Source(r'PATH\Will & Grace S1 D1 Ep2 - A New Lease on Life NEXTEST.demuxed.d2v') def postprocess(n, f, clip, deinterlaced): if f.props['_Combed'] > 0: return deinterlaced else: return clip matched_clip = core.vivtc.VFM(input_clip, 1, cthresh=9) deinterlaced_clip = core.eedi3.eedi3(matched_clip, field=1) postprocessed_clip = core.std.FrameEval(matched_clip, functools.partial(postprocess, clip=matched_clip, deinterlaced=deinterlaced_clip), prop_src=matched_clip) decimated_clip = core.vivtc.VDecimate(postprocessed_clip) decimated_clip.set_output()
6) Using ffmpeg default IVTC settings (including the dejudder workaround), many frames are deinterlaced. For example the entire sequence when will is walking in around 4-5sec is deinterlace. You can see the aliasing in brick wall in the background. cthresh can be adjusted and perhaps the default settings in ffmpeg should be because too many frames are deinterlaced
Despite deinterlacing too many "good" frames, it misses combed frames(!) . Right around the scene change , eg. 252 remains is combed . And some duplicates remain eg. 374/375, 434/435, 584/585
(Note the framecounts and frame numbering are slightly different - it partially has to do with how decoders handle open gop and leading B-frames) , but the description of the issues is accurate
In general, TIVTC is not "perfect" in auto mode either (sometimes there is no perfect solution with cadence breaks), but it's clearly better than the others
7) Why does ffmpeg mess up again (in terms of frame drops, despite dejudder) when video is remuxed with audio into a mpeg-ps? ImagoMPEG muxer was used, and this is DVD compliant. Attached "ImagoMPEG-Muxer.mpg" -
-
Similar Threads
-
Which Nnedi3.dll do I need for Avisynth?
By VideoFanatic in forum Video ConversionReplies: 16Last Post: 17th Apr 2018, 14:55 -
who use AVFS.dll/avisynth?
By marcorocchini in forum Newbie / General discussionsReplies: 0Last Post: 9th Mar 2017, 09:44 -
MSVCP60.dll MSVCRT.dll MFC42.dll: wich of this dll's do video deinterlace?
By marcorocchini in forum Newbie / General discussionsReplies: 1Last Post: 25th Sep 2016, 11:40 -
Problems loading plugins into AVISynth
By bvdd in forum Video ConversionReplies: 51Last Post: 20th Nov 2015, 07:15 -
HELP! MeGUI can't load certain avisynth plugins
By Throw_Hammer in forum Newbie / General discussionsReplies: 3Last Post: 22nd Feb 2014, 17:19