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 2nd April 2022, 11:43   #861  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Quote:
Originally Posted by StainlessS View Post
LeXXuz,
Ah, I remember scharfis excellent guide. Thanks for posting this.

I give Telecide() another try then which should do exactly what I'm looking for. But I think I messed up a parameter.

Quote:
Originally Posted by kedautinh12 View Post
You just say alone and don't have any helper when you don't share any samples
That is, of course, not my intention.
LeXXuz is offline   Reply With Quote
Old 2nd April 2022, 13:13   #862  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
If I don't look at a sample, I can only speculate without empirical proof. And is quite pointless. But let's speculate.

Try:
Code:
CTelecine() #field matching
CPostProcessing() #Deinterlace leftover combed
Ceppo is offline   Reply With Quote
Old 4th April 2022, 21:07   #863  |  Link
PoeBear
Registered User
 
Join Date: Jan 2017
Posts: 48
Quote:
Originally Posted by real.finder View Post
Works perfectly, thanks! It kills all traces of the added GrainFactory3 grain near any completely black areas. FYI for other users in my predicament: You'll definitely want to Trim() this out for end credits, as it will still apply near the scrolling text, giving you a grain fade out that will definitely cost in CRF over using without

Follow up (basic AviSynth usage) question, but I can't seem to insert AdaptiveGrain in the middle of a script with line breaks, I can only call it without line breaks (or at the end). I'm not sure of what script magic to fix it, it's a new error to me. Eg

Works:
Code:
MPEG2Source("D:\Edit\DVD\ntscDVD.d2v")
TFM()
TDecimate()
neo_f3kdb(y=64, cb=64, cr=64, grainy=0, grainc=0)
z_Spline36Resize(1440,1080)
AdaptiveGrain(grain=GrainFactory3(g1str=1, g2str=2, g3str=3))
z_Spline36Resize(640,480)
Fails ("Script error: invalid arguments to function 'GrainFactory3'"):
Code:
MPEG2Source("D:\Edit\DVD\ntscDVD.d2v").\
TFM().\
TDecimate().\
neo_f3kdb(y=64, cb=64, cr=64, grainy=0, grainc=0).\
z_Spline36Resize(1440,1080).\
AdaptiveGrain(grain=GrainFactory3(g1str=1, g2str=2, g3str=3)).\
z_Spline36Resize(640,480)
It works fine with line breaks with just GrainFactory3:
Code:
MPEG2Source("D:\Edit\DVD\ntscDVD.d2v").\
TFM().\
TDecimate().\
neo_f3kdb(y=64, cb=64, cr=64, grainy=0, grainc=0).\
z_Spline36Resize(1440,1080).\
GrainFactory3(g1str=1, g2str=2, g3str=3).\
z_Spline36Resize(640,480)
Ideally I need to use the line breaks so I can load the source once, but have separate filter areas for the main movie and the filter-less credits and make calls back-and-forth with Trim()s
PoeBear is offline   Reply With Quote
Old 5th April 2022, 07:40   #864  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
I don't see the advantage of explicitly chaining all the function calls instead of implicitly chaining them via the omittable "last" clip (which will fail if there is any assignment to variables in this sequence, not all function calls only) ... nevertheless, an interesting find. A fix will require some insight in the parser.

To provide different filter sequences for scenes, I would recommend declaring user functions. Their declaration may contain sequences without explicit chains. But I don't get your intent completely yet. You will know if that idea is feasible.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid

Last edited by LigH; 5th April 2022 at 07:43.
LigH is online now   Reply With Quote
Old 5th April 2022, 07:45   #865  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Quote:
Originally Posted by Ceppo View Post
If I don't look at a sample, I can only speculate without empirical proof. And is quite pointless. But let's speculate.

Try:
Code:
CTelecine() #field matching
CPostProcessing() #Deinterlace leftover combed
I don't know these two functions. To what plugin do they belong to?
LeXXuz is offline   Reply With Quote
Old 5th April 2022, 07:58   #866  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
See the CQTGMC thread => https://github.com/CeppoTools/CTools

@Ceppo: Add these to your signature?
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is online now   Reply With Quote
Old 5th April 2022, 09:48   #867  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
LigH

Downloaded latest package, but I can't get it to work. MeGUI crashes instantly (and sadly without an error message) upon loading this script:
Code:
#
LoadPlugin("c:\Video Editing\MeGUI (x64)\tools\avisynth_plugin\CTools v1.2.2 (x86_x64)\x64\CTools.dll")
Import("c:\Video Editing\MeGUI (x64)\tools\avisynth_plugin\CTools v1.2.2 (x86_x64)\CTools.avsi") 
Import("C:\Video Editing\MeGUI (x64)\tools\avisynth_plugin\QTGMC.avsi") #v3.33
#
LoadPlugin("C:\Video Editing\MeGUI (x64)\tools\lsmash\LSMASHSource.dll")
LWLibavVideoSource("G:\WORK\dvdsource.mkv")
#
CTelecine() #field matching
CPostProcessing() #Deinterlace leftover combed
Avisynth+ 3.7.2 x64 used. What do I miss?
LeXXuz is offline   Reply With Quote
Old 5th April 2022, 11:03   #868  |  Link
PoeBear
Registered User
 
Join Date: Jan 2017
Posts: 48
Quote:
Originally Posted by LigH View Post
I don't see the advantage of explicitly chaining all the function calls instead of implicitly chaining them via the omittable "last" clip (which will fail if there is any assignment to variables in this sequence, not all function calls only) ... nevertheless, an interesting find. A fix will require some insight in the parser.
I wasn't looking for any advantage, I just wrote the script best I could, trying to keep it as readable and clean/low memory as possible. Maybe a non-sample script will help. Here's an HD script that I would ideally replace the one GrainFactory3 call with AdaptiveGrain+GrainFactory3 instead (if someone can help with a fix/replacement script):

Code:
BLU=LWLibavVideoSource("C:\Edit\Any\title01.mkv").\
bbmod(1,0,1,0)

MOVIE=BLU.\
z_Spline36Resize(1280,720).\
neo_f3kdb(y=64, cb=64, cr=64, grainy=0, grainc=0).\
z_Spline36Resize(1920,1080).\
GrainFactory3(g1str=8, g2str=12, g3str=18, g1size=1.8, g2size=1.6, g3size=1.4).\
z_Spline36Resize(1280,720)

CREDITS=BLU.\
z_Spline36Resize(1280,720).\
neo_f3kdb(y=64, cb=64, cr=64, grainy=0, grainc=0)

OUTPUT=\
BlankClip(length=24,width=1280,height=720,fps=24000,fps_denominator=1001,pixel_type="YV12").KillAudio+\
MOVIE.Trim(0,127475)+\
CREDITS.Trim(127476,0)+\
BlankClip(length=48,width=1280,height=720,fps=24000,fps_denominator=1001,pixel_type="YV12").KillAudio

OUTPUT
It's never given me any issues with the dozen or so other plugins from this page I also use. If I'm doing something wrong, or I can streamline it even more (while still making sense when looking at it lol), please let me know. I've just taken bits and pieces from what I've seen on here or the wiki, and breaking up all the functions helps me when I'm adding/removing/replacing/comparing to the same script but with 1 or 2 variables different. Or sometimes the second half of the movie has a different crop or some dirty lines, so I can make a MOVIE2 call with different crops/fixes, and just merge them at the end

Pay no attention to my many resizes. I find even GrainFactory3's softest grain is too sharp in certain instances, so I always apply it at a higher resolution than my output (and I resize it first because that deblocks better than QED Deblock_QED, a cleaner source I wouldn't resize first). The rest of the trims are 1) because I don't want to grain the credits 2.) I was making one of my Blu-rays frame accurate with my DVD that had 5.1 and needed blank frames

Quote:
Originally Posted by LigH View Post
But I don't get your intent completely yet.
When GrainFactory3 is left to its own devices, it ends up applying grain to fade-in and fade-outs, which ends up eating a lot of bitrate in x264/x265 CRF mode. But with AdaptiveGrain, it detects black areas and won't apply grain to them, so fade outs will cost next to nothing

It can also affect really dark movies (like the movie in my script example). If a scene takes place at night, and a lot of the image is dark and wouldn't normally have grain, AdaptiveGrain seems to help not apply it there, letting you use the bitrate for other areas of the image

My intent is to fix my script so it loads and I can make my encode smaller
PoeBear is offline   Reply With Quote
Old 5th April 2022, 12:14   #869  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,153
Quote:
Originally Posted by LeXXuz View Post
LigH

Downloaded latest package, but I can't get it to work. MeGUI crashes instantly (and sadly without an error message) upon loading this script:
Code:
#
LoadPlugin("c:\Video Editing\MeGUI (x64)\tools\avisynth_plugin\CTools v1.2.2 (x86_x64)\x64\CTools.dll")
Import("c:\Video Editing\MeGUI (x64)\tools\avisynth_plugin\CTools v1.2.2 (x86_x64)\CTools.avsi") 
Import("C:\Video Editing\MeGUI (x64)\tools\avisynth_plugin\QTGMC.avsi") #v3.33
#
LoadPlugin("C:\Video Editing\MeGUI (x64)\tools\lsmash\LSMASHSource.dll")
LWLibavVideoSource("G:\WORK\dvdsource.mkv")
#
CTelecine() #field matching
CPostProcessing() #Deinterlace leftover combed
Avisynth+ 3.7.2 x64 used. What do I miss?
You missing RgTools, MVTools2, MaskTools2
kedautinh12 is offline   Reply With Quote
Old 5th April 2022, 12:59   #870  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
That's what happens when you remove too much for visibility.

They are present in the original script. Still crashes instantly with this script though:
Code:
#
LoadPlugin("c:\Video Editing\MeGUI (x64)\tools\avisynth_plugin\CTools v1.2.2 (x86_x64)\x64\CTools.dll")
LoadPlugin("c:\Video Editing\MeGUI (x64)\tools\avisynth_plugin\masktools2-v2.2.26\x64_clang\masktools2.dll")
LoadPlugin("c:\Video Editing\MeGUI (x64)\tools\avisynth_plugin\mvtools-2.7.44\x64\mvtools2.dll")
LoadPlugin("c:\Video Editing\MeGUI (x64)\tools\avisynth_plugin\RgTools-v1.1\x64_LLVM_build\RgTools.dll")
Import("c:\Video Editing\MeGUI (x64)\tools\avisynth_plugin\CTools v1.2.2 (x86_x64)\CTools.avsi") 
Import("C:\Video Editing\MeGUI (x64)\tools\avisynth_plugin\QTGMC.avsi") #v3.33
#
LoadPlugin("C:\Video Editing\MeGUI (x64)\tools\lsmash\LSMASHSource.dll")
LWLibavVideoSource("G:\WORK\source.mkv")
#
CTelecine() #field matching
CPostProcessing() #Deinterlace leftover combed
LeXXuz is offline   Reply With Quote
Old 5th April 2022, 16:06   #871  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
Quote:
@Ceppo: Add these to your signature?
I don't understand how to do that. I passed 2 minutes trying then I gave up

@LeXXuz
You lack vinverse.dll, https://github.com/Asd-g/vinverse/releases
Also, be sure to have all QTGMC stuff.

(It should give you an error saying that vinverse.dll was not found tho...)
EDIT:
Also, you should remove the filters one by one to understand which one makes you script crash, also see if it loads with AvspMod.

Last edited by Ceppo; 5th April 2022 at 16:15.
Ceppo is offline   Reply With Quote
Old 5th April 2022, 16:34   #872  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Quote:
Originally Posted by Ceppo View Post
@LeXXuz
You lack vinverse.dll, https://github.com/Asd-g/vinverse/releases
Also, be sure to have all QTGMC stuff.
That did it. Didn't know it was needed. Maybe add this to the docs of CTools? Or did I overlook it?

Sadly most of the time MeGUI prefers to crash instead of giving a useful error message...
LeXXuz is offline   Reply With Quote
Old 5th April 2022, 17:13   #873  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
The doc says that mode=5 (default) uses vinverse, and it should give you a error if you don't have it, never used MeGui so I don't know
Ceppo is offline   Reply With Quote
Old 5th April 2022, 17:19   #874  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Quote:
Originally Posted by Ceppo View Post
The doc says that mode=5 (default) uses vinverse, and it should give you a error if you don't have it, never used MeGui so I don't know
My bad. Must've overlooked it. Thanks for the help.
LeXXuz is offline   Reply With Quote
Old 6th April 2022, 07:50   #875  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
@Ceppo: Edit your signature to something like:

Code:
[url=https://forum.doom9.org/showthread.php?t=183823]CQTGMC thread[/url] / [url=https://github.com/CeppoTools/CTools]CeppoTools on github[/url]
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid

Last edited by LigH; 6th April 2022 at 07:52.
LigH is online now   Reply With Quote
Old 6th April 2022, 12:00   #876  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
Did it, thank you.
Ceppo is offline   Reply With Quote
Old 3rd May 2022, 18:49   #877  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Quote:
Originally Posted by real.finder View Post

NotSMDegrain my old SMDegrain mod

Is there a 'new' one?
LeXXuz is offline   Reply With Quote
Old 3rd May 2022, 18:52   #878  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Quote:
Originally Posted by Ceppo View Post
If I don't look at a sample, I can only speculate without empirical proof. And is quite pointless. But let's speculate.

Try:
Code:
CTelecine() #field matching
CPostProcessing() #Deinterlace leftover combed
Just to let you know; I did quite a few jobs with some very nasty PAL-DVDs in the meantime and your filters did a terrific job!
LeXXuz is offline   Reply With Quote
Old 4th May 2022, 06:15   #879  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,153
Quote:
Originally Posted by LeXXuz View Post
Is there a 'new' one?
New is Dogway's ver
kedautinh12 is offline   Reply With Quote
Old 3rd June 2022, 22:01   #880  |  Link
Blankmedia
Registered User
 
Join Date: Oct 2011
Location: Dans le nord
Posts: 65
Hi, thank you for your work.

I don't know if this have been discussed before, but do you think you could add an ID for feedback in Stab3, like the avs filename (RT_FilenameSplit(string filename,int "get"=4) I think*)

So if multiple script are in the same folder they can be run simultan... at the same time, without trouble.

I've just checked and since ID in feedback only use integer, maybe the time the script is started? I really don't have much suggestion, but I think it would be neat.

Maybe there's a function to convert string to binary. So when you run the same script it overwrite the file (like it's doing rigth now) and doesn't make more and more files.
Blankmedia is offline   Reply With Quote
Reply

Tags
avisynth, avs script, avs+, banding, generator, hbd, mod

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 20:13.


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