Nuihc88 / SVPlite

SVPlite - Realtime-Optimized AviSynth+ Script-Templates for the SmoothVideo Project's SVPflow filters. Portable Low-Resource Motion Interpolation.
The Unlicense
37 stars 5 forks source link

There is no function named SetCacheMode and OnCPU #1

Closed Shnxxx closed 3 years ago

Shnxxx commented 4 years ago

At first, I'm having an error There is no function named "SetCacheMode". image Tried changing the value from 0 to 1, but nothing changed. Same error.

Also tried changing it to "CACHE_OPTIMAL_SIZE" but it showed me this. image

Then I tried commenting on it for now "#SetCacheMode(CACHE_OPTIMAL_SIZE)" but I received a new error. image

I've already stopped there and realized that maybe there's something wrong. I installed the latest AviSyth+ and using the latest PotPlayer 64bit. Also, I'm using the preset "SVPlite_Medium_Animated"

I also made sure that all files/scripts are together incased of dependencies.

EDIT: Also tried other scripts and I'm still getting errors. Here are my AviSynth Settings on PotPlayer. image

Also where could I get the latest SVPFlow Libraries? I only get mine from "Uplavnyalka Scripts"

Nuihc88 commented 4 years ago

All those errors are probably due to an outdated AviSynth+ version; minimum version requirement for SVPlite is AviSynth+ v3.5.2 r3218 or newer. However it is always possible, although not recommended, to use older versions by commenting out the lines pointed out by the errors. Also make sure that you have copied those files in the correct locations such as AviSynth.dll next to the player executable for portable installations.

Also where could I get the latest SVPFlow Libraries? I only get mine from "Uplavnyalka Scripts"

Newer SVPflow2.dll versions require official SVP to be running in the background, so i'm personally using older versions of that specific file. Below are links to archived copies of the files i'm currently using: SVPflow1.dll x32: 4.5.0.200 - SVPflow2.dll x32: 4.3.0.160 SVPflow1.dll x64: 4.5.0.200 - SVPflow2.dll x64: 4.3.0.161

Shnxxx commented 4 years ago

Thank you for your response!

I mentioned above that I already installed the latest AviSynth+. (Image from Control Panel) image

But anw, I still reinstalled it, but now I downloaded the "files only". I also downloaded the SVPFlow1.dll x64 4.50.200 from the link that you gave, and I got a compressed file that contains these: image I placed the svpflow1 and svpflow2 on the "PlugIns" folder under AviSynth that is located at the Potplayer's directory and in the System32 folder.

So I have two AviSynth.dll right now but I used the one that came from the AviSynth+. I placed it in the Potplayer's directory and in the System32 folder. I also copied the "plugins" folder that came with the AviSynth+, and placed it inside the AviSynth folder, in the directory of the Potplayer, and in the System32 folder.

After doing all of that, I received a new error: image

Nuihc88 commented 4 years ago

First try uncommenting third line of 'SVPlite_Processing.avsi', so that '#clip=last' becomes 'clip=last'.

If that doesn't work, make sure that either ' Add "potplayer_source()" ' box is ticked in PotPlayer or that the corresponding line is uncommented at the end of 'SVPlite_Environment.avsi'.

PS. Let me know which one, if either, solves the problem...

Shnxxx commented 3 years ago

The "potplyer_source()" did the trick! Thank you! EDIT: I tried returning the 'clip=last' to '#clip=last' and the scripts still worked.

But I just noticed something, while I am watching animation I only get ~50FPS. I tried other animation and I still get the same FPS. While watching live, I get 60FPS. The bitrate of the live and anime is around 8500 and 2000, respectively.

The only difference between the animation and the live is that the animation I'm watching is encoded at 23-25 FPS (stock), while the live ones are at 30FPS (stock), Is there a way where I could make them 60FPS?

Thank you again!

Nuihc88 commented 3 years ago

Framedoubling produces better visual quality while requiring less processing power so i've made it the default option.

To get 60fps you can edit this section: 'smoothfps_params="{rate:{num:2,den:1}' on line 10..... ...for ~60fps, you can use '{num:25,den:10}' with 24fps & '{num:24,den:10}' with 25fps... ...or '{num:60000,den:1001,abs:true}' to always get the common motion picture standard of ~59.940... ...or for a near absolute 60fps, you can use this: '{num:60,den:1,abs:true}'.

All of those require significant amounts of processing power, while making the output less sharp/clear in exchange for the extra smoothness. Personally i wouldn't recommend the trade-off for a measly 10-12fps.

I'm considering ways of making the configuring of frame rate easier in the future, but there are a lot of factors left to consider.

Shnxxx commented 3 years ago

Thank you again for your reply! I tried comparing the unchanged script and the edited one, and you're correct, no huge difference between the two. Also made my CPU hotter by 5ºC. So I'll stick with the unchanged one until, maybe, you update newer scripts.

One more thing, is it possible to make use of more of my GPU? When I'm playing some video using the script, my CPU usage is at ~77% while my GPU is only at ~20%. Or is it on the Potplayer already?

Thank you again!

Nuihc88 commented 3 years ago

I'm a a bit late to respond this time around as i've been having driver BSOD issues...

My scripts have SVPflow's GPU acceleration enabled; it could just be that your GPU is much more powerful than your CPU, which is the case for most people's computers.

You could perhaps move more of the decoding, deinterlacing & scaling tasks to GPU by using LAV Filters & MadVR Video Renderer, if you aren't already... Default settings for these will likely be better than relying on PotPlayer defaults, It will however require some trial and error to find the best possible settings for your computer and if you want to go for the maximum performance in exchange for reduced portability, switching from PotPlayer's internal AviSynth processing filter to CrendKing's AviSynth Filter should give you much more leeway. I don't get dropped frames with it until my CPU usage is well over 90%.

I've uploaded some screenshots to a 'ConfigRecommendations' folder for people looking for some tips on how to set things up. The 'OptionalTweaks' folder below it is for things more specific to my setup, but could still be useful. It's better to not just blindly copy everything from either folder though, as what works well for my system might not work well for yours and vice versa; it's just a place to start if you want to really push your configuration to it's limits.