Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 23rd January 2024, 15:39   #1481  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Avisynth Wiki:- http://avisynth.nl/index.php/Main_Page
External AviSynth+ x64 plugins:- http://avisynth.nl/index.php/AviSynth%2B_x64_plugins
External AviSynth+ x86 plugins:- http://avisynth.nl/index.php/External_filters
Internal filters:- http://avisynth.nl/index.php/Internal_filters

NOTE, Warpsharp is deprecated, use Warpsharp2.

EDIT:
Quote:
[Uncategorized files]
C:\Program Files (x86)\AviSynth+\plugins64+\colors_rgb.txt [2022-10-07]
Delete that.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 24th January 2024, 05:05   #1482  |  Link
BabaG
Registered User
 
Join Date: Dec 2003
Posts: 253
ok. so, i'm in the middle of, one-by-one, bringing filters and functions into my plugins64 folder and, sure enough, have hit a snag with this line (230):
Code:
denoised=stabcrop.MDegrain2(super, bvec1,fvec1,bvec2,fvec2,thSAD=denoising_strength).levels(0,gamma,255,0,255).tweak(sat=saturation).unsharpmask(PRE_sharp_ness,PRE_radi_us,0)
the error is:
Code:
Script error: There is no function named 'unsharpmask'.
not sure how to get past this as pdr has recommended to use another filter for this. do i have to change something in the line (230) to match the syntax of the substitute filter?

as i look into this, it's looking to me as if the warpsharp2 suggestion is what would address this? how woul the 230 line be changed?

edit:
thanks, stainlesss. i deleted the file you pointed out.

thanks,
babag
BabaG is offline   Reply With Quote
Old 24th January 2024, 05:16   #1483  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
You can replace unsharpmask with updated functions that support high bit depth, so you don't have to downgrade your prores. The original unsharpmask in warpsharp is a 2.5 plugin and does not support other avs+ pixel types like YUV422P10 . You can change the function name to UnsharpMask or change the script UnsharpMask calls to UnsharpMask_avsi
https://github.com/realfinder/AVS-St...Mask_avsi.avsi

Or dogway's sharpener's pack has a variation
https://github.com/Dogway/Avisynth-S...enersPack.avsi
poisondeathray is offline   Reply With Quote
Old 24th January 2024, 06:32   #1484  |  Link
BabaG
Registered User
 
Join Date: Dec 2003
Posts: 253
hey! that's awesome! it finally opens. very dark, though. will look into that later. thanks so much for all the help! (unfortunately, i'll probably be back soon.)

thanks again,
babag
BabaG is offline   Reply With Quote
Old 24th January 2024, 06:38   #1485  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
Quote:
Originally Posted by BabaG View Post
hey! that's awesome! it finally opens. very dark, though.
Levels filter. 10bit goes 0 to 1023. Edit all the lines with levels . There might be a few more

Quote:
black_level=0 white_level=255 output_black=0 output_white=255 #manual levels, when returning result2 & result4


denoised=stabcrop.MDegrain2(super, bvec1,fvec1,bvec2,fvec2,thSAD=denoising_strength).levels(0,gamma,255,0,255).tweak(sat=saturation).unsharpmask(PRE_sharp_ness,PRE_radi_us,0)


result2= PreBorderFrame.levels(black_level,gamma,white_level,0,255).coloryuv(autowhite=true).addborders(bord_left+in_bord_left, bord_top+in_bord_top, bord_right+in_bord_right, bord_bot+in_bord_bot)
poisondeathray is offline   Reply With Quote
Old 24th January 2024, 06:56   #1486  |  Link
BabaG
Registered User
 
Join Date: Dec 2003
Posts: 253
that's got it! thanks!
BabaG is offline   Reply With Quote
Old 24th January 2024, 20:14   #1487  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,691
Quote:
Originally Posted by BabaG View Post
hey! that's awesome! it finally opens. very dark, though. will look into that later.
If it is darker than the original, try one of the two settings that doesn't use autolevels. I usually see no change in gamma, but I almost always use the number 4 setting which doesn't touch either levels or color.
johnmeyer is offline   Reply With Quote
Old 24th January 2024, 20:20   #1488  |  Link
BabaG
Registered User
 
Join Date: Dec 2003
Posts: 253
thanks, johnmeyer! great tip. much appreciated. changing 255 to 1023 seems to have worked here.

i think the last thing i need to try in order to really test this on my materials is to get the change from setmtmode to setfiltermtmode working. for example, with this line:
Code:
setmtmode(5, threads)
what should the replacement setfiltermtmode line be? if i just say:
Code:
SetFilterMTMode(5, threads)
it throws an error. wrong syntax, i suppose. not sure what to put into it.

edit:
this seems to allow the clip to load:
Code:
SetFilterMTMode("source1", 2)
i only replaced the first instance of setmtmode with this and the clip does load. don't understand if i should replace the remaining instances of setmtmode with it. they are currently commented.

thanks again, all!
babag

Last edited by BabaG; 24th January 2024 at 21:55.
BabaG is offline   Reply With Quote
Old 24th January 2024, 23:14   #1489  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,691
Here is a link to my current script:

John Meyer Film Restoration Script 2024

It is designed for the more modern versions of AVISynth which no longer use the SetMTMode version of multithreading.

This version used GamMac for color, and provides the option of using SpotLess instead of RemoveDirt for getting rid of film dirt.

(Note: I added SpotLess only a few years ago but forgot to update my revision log at the beginning of the script.)

Last edited by johnmeyer; 24th January 2024 at 23:16. Reason: typo
johnmeyer is offline   Reply With Quote
Old 24th January 2024, 23:35   #1490  |  Link
BabaG
Registered User
 
Join Date: Dec 2003
Posts: 253
wow! thanks johnmeyer. just downloaded it. would like to get the version i've been currently working with fully functional before i jump into something new. guess i should study it while waiting for info on these last few questions about the version i've had up to now.

thanks again!
babag
BabaG is offline   Reply With Quote
Old 25th January 2024, 16:47   #1491  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,691
The main reason for making the script available was to answer your question about getting multithreading to work in more modern versions of AVISynth. These versions use the more modern version of multithreading so you should be able adapt whatever you almost have working. The "Prefetch(threads)" line is the main thing. It needs to be the very last statement in the main body of the script (the function calls, of course, can be put anywhere, so "last statement" doesn't apply to them).

I assume you have read this:

AVISynth+ Multithreading
johnmeyer is offline   Reply With Quote
Old 26th January 2024, 07:26   #1492  |  Link
BabaG
Registered User
 
Join Date: Dec 2003
Posts: 253
thanks again, johnmeyer.

sadly, it's all getting to be a bit more than i can handle. the differences between setmtmode and setfiltermtmode and avisynth 32 and 64. i'm terrible at anything like coding but keeping this all in line is just too much for me. i just can't figure it out. i don't know how you do it.

thanks,
babag
BabaG is offline   Reply With Quote
Old 26th January 2024, 17:12   #1493  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,691
You seem to have gotten pretty far, so I think you can do it. A few suggestions.

1. If you still have a computer using Windows 7, use that.

2. Don't use 64-bit. I still have yet to see any compelling reason why that would be better. You will find that the 32-bit version will have fewer compatibility problems.

3. Turn off all multi-threading options until you have it working. This means commenting out the "Prefetch" line (for the current versions of AVISynth).
johnmeyer is offline   Reply With Quote
Old 26th January 2024, 19:49   #1494  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Please forgive me if it looks like I want to highjack this discussion. I am asking about this film restauration script because a few days ago a good friend asked me if I had any ideas if this video from 1979 could be improved.

It is an amateur live recording from a band called "Jump Street" shot at the Catalyst in Santy Cruz, the quality is awful, but it does have a sentimental value for my friend (and for me).

Here is the link:
https://www.youtube.com/watch?v=NBxB...Y2F0YWx5c3Q%3D

I am not too optimistic if this is even worth the effort, but if you think that this clip could be improved using this script, please let me know...


Cheers
manolito
manolito is offline   Reply With Quote
Old 26th January 2024, 21:05   #1495  |  Link
BabaG
Registered User
 
Join Date: Dec 2003
Posts: 253
Quote:
Originally Posted by johnmeyer View Post
1. If you still have a computer using Windows 7, use that.
unfortunately, no windows 7 here.

Quote:
2. Don't use 64-bit. I still have yet to see any compelling reason why that would be better. You will find that the 32-bit version will have fewer compatibility problems.
this is one of the areas with which i have difficulty: distinguishing between things intended for either version. can they be run alongside each other? how would one make clear which is being called? pretty much everything in my system is 64 bit so i went with 64 bit avisynth+.

Quote:
3. Turn off all multi-threading options until you have it working. This means commenting out the "Prefetch" line (for the current versions of AVISynth).
i thought i'd pretty much gotten to that point. that's why i was trying to get the multithreading up now. setting the max memory made a huge difference, though. one thing i noted between your two scripts was that, i think it was for autolevels, the earlier version that used setmtmode had a comment about turning autolevels off and then back on. the newer version didn't seem to have any use of the replacement, setfiltermtmode, at all so i couldn't figure out how to update setmtmode in the earlier script.

@manolito, i think this script, and variants, are intended for captured film, in the case of the videofred version, film captured at good quality and, in the johnmeyer version, maybe more tolerant of source quality. obviously, i'm not someone to pay too much attention to but, in this case, i think i have it right.

thanks again,
babag

Last edited by BabaG; 26th January 2024 at 21:15.
BabaG is offline   Reply With Quote
Old 27th January 2024, 16:41   #1496  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
this is one of the areas with which i have difficulty: distinguishing between things intended for either version. can they be run alongside each other? how would one make clear which is being called? pretty much everything in my system is 64 bit so i went with 64 bit avisynth+.
If you load avs file with 64 bit MPC-HC/VirtualDub2/AvsPMod/etc, then it uses Avisynth 64 bit, which in turn uses (AND REQUIRES) 64 plugins in 64 bit plugins directory,
similarly, 32 bit players require 32 bit everything.
EDIT: Also, 64 bit MegUI (or other encoder), uses 64 bit Avisynth etc, and 32 bit ecoder uses 32 bit avisynth etc.
Above bittage requirements apply to all Windows executables and dll's, not just avisynth, n-bit executables require n-bit dll's.

Wiki:- http://avisynth.nl/index.php/Main_Page
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 27th January 2024 at 16:52.
StainlessS is offline   Reply With Quote
Old 28th January 2024, 00:51   #1497  |  Link
BabaG
Registered User
 
Join Date: Dec 2003
Posts: 253
thanks stainlesss. that's helpful.
BabaG is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:45.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.