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 17th June 2022, 22:15   #41  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 6,748
I'm on Windows 11.
Quote:
Also, I seem to remember that no XBD file will be generated unless a complete scan is done {ie, it does not write a partially complete file}
I called my clip with "avs2yuv64.exe c:\Users\Selur\Desktop\test2.avs NUL" which runs through the whole thing.

I now opened the script in avsmod, changed the call to
Code:
Exblend(mode=1, ExBfile="e:\Exbfile", debug=true, lv=5, dv=5)
downloaded and started Debugview and scrolled through the clip in avspmod.

Tried to save the content of Debugview, but then Debugview, simple froze.
-> took a screenshot and killed Debugview.

Now E:\Exbfile_1.LOG was created, when I closed avspmod which contains:
Code:
ExBlend: INFO,    
ExBlend: INFO,    ExBlend() v1.04 - 18 Dec 2018 - (c) StainlessS.
ExBlend: INFO,    
ExBlend: DEBUG,   Limiting args to 'Mode 1'
ExBlend: DEBUG,   Checking Colorspace
ExBlend: DEBUG,   Checking valid 'mode'
ExBlend: DEBUG,   Checking valid 'pal' range
ExBlend: DEBUG,   Allocating fdat[]
ExBlend: DEBUG,   Allocating MetricsDat[]
ExBlend: INFO,    ------------------------------------
ExBlend: INFO,    MODE                    = 1
ExBlend: INFO,    PAL                     = 0
ExBlend: INFO,    LOCKTHRESH              = 1,00
ExBlend: INFO,    ITHRESH                 = 3,00
ExBlend: INFO,    SHOW                    = 5 
ExBlend: INFO,    EXBFILE                 = 'e:\Exbfile'
ExBlend: INFO,    VER                     = False
ExBlend: INFO,    REVIP                   = False
ExBlend: INFO,    OVERRIDE                = NOT SET
ExBlend: INFO,    LV                      = 5 DEBUG
ExBlend: INFO,    DV                      = 5 DEBUG
ExBlend: INFO,    DISP                    = 1 EXBLEND [Default]
ExBlend: INFO,    DCLIP                   = NO
ExBlend: INFO,    COMPUB                  = 2 0=SSSS, 1=SDDS 2=DDDD [S=Source,D=DClip]
ExBlend: INFO,    DECIMATE                = False
ExBlend: INFO,    DECOMPIX                = 1 UNUSED
ExBlend: INFO,    DecClpIx                = 1 
ExBlend: INFO,    DEBUG                   = True
ExBlend: INFO,    ------------------------------------
ExBlend: DEBUG,   LOG Filename            = e:\Exbfile_1.LOG
ExBlend: DEBUG,   LOG file Verbosity      = 5
ExBlend: DEBUG,   LOG DebugView Verbosity = 5
ExBlend: DEBUG,   XBD Filename            = e:\Exbfile.XBD
ExBlend: DEBUG,   FRAMES Filename         = e:\Exbfile_Decimated.TXT
ExBlend: DEBUG,   ------------------------------------
ExBlend: DEBUG,   Constructor, no Errors encountered.
ExBlend: DEBUG,   Constructor OUT  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
ExBlend: INFO,    [569] Lost Sequence: Detected=2
ExBlend: DEBUG,   Destructor IN    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
ExBlend: DEBUG,   Mode 1, checking if clip fully scanned.
ExBlend: DEBUG,   Mode 1, Buffer Incomplete ( 0,3 Percent)
ExBlend: DEBUG,   delete[] MetricsDat
ExBlend: DEBUG,   delete[] fdat
ExBlend: DEBUG,   Destructor OUT (CLOSING LOG) >>>>>>>>>>>>>>>>>>>>
>>>
No e:\Exbfile.XBD or e:\Exbfile_Decimated.TXT file was created.

Cu Selur
__________________
Hybrid here in the forum, homepage
Notice: Since email notifications do not work here any more, it might take me quite some time to notice a reply to a thread,..

Last edited by Selur; 18th June 2022 at 00:02.
Selur is offline   Reply With Quote
Old 18th June 2022, 00:11   #42  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,228
OK, I think I twigged whats happening,
Quote:
I called my clip with "avs2yuv64.exe c:\Users\Selur\Desktop\test2.avs NUL" which runs through the whole thing.
think that avs2yuv64 is returning to frame 0 after scan, which I've a sneaky feeling will start afresh ie reset, as if nothing has been scanned.
I'm not on my compiler machine, and not even on windows at present, I'll see what I can do when I can.

EDIT: I've never actually used avs2yuv. [or cant remember it if I have done]

EDIT:
I still doubt that it would do any good if it is to follow this
Code:
TFM() # field match back to a film frames
TDecimate() #remove duplicates
but that's a different matter.
__________________
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; 18th June 2022 at 00:18.
StainlessS is offline   Reply With Quote
Old 18th June 2022, 00:42   #43  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,228
Selur,
https://forum.doom9.org/showthread.p...53#post1846853
above linked RT_ForceProcess() will scan entire file and NOT return to frame 0 on completion. [if that is any good]
__________________
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 18th June 2022, 06:56   #44  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 6,748
Thanks will look whether I get RT_ForceProcess working.
a. Okay, the link in that thread doesn't work, but I got the RT_Stats_25&26_x86_x64_dll_v2.00Beta13_20201229.zip from your MediaFire site.
b. Looked at the source the TFM&Decimate isn't needed, source is wrongly flagged as interlaced while it's progressive (+ blended fields).
-> okay, I got no idea how to use that properly.
using:
Code:
ClearAutoloadDirs()
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
LoadPlugin("I:\Hybrid\64bit\Avisynth\AVISYN~1\LSMASHSource.dll")
Import("I:\Hybrid\64bit\Avisynth\avisynthPlugins\mtmodes.avsi")
LoadPlugin("C:\Users\Selur\Desktop\ExBlend_x64.dll")
LoadPlugin("C:\Users\Selur\Desktop\RT_Stats_x64.dll")
LWLibavVideoSource("e:\clips\Courage the Cowardly Dog S02E17E18 SOURCE.mkv",cache=false,dr=true,format="YUV420P8", prefer_hw=0)
org=last
#Exblend(mode=1, ExBfile="e:\Exbfile", debug=true, lv=5, dv=5)
RT_ForceProcess()
#Exblend(mode=0,revip=true, show=0)
#StackHorizontal(last, org)
PreFetch(16)
#  output: color sampling YV12@10, matrix: bt709, scantyp: progressive, luminance scale: limited
return last
also doesn't output a file (I could find), but it shows some stuff in the debugviewer.


Cu Selur
Ps.: Also uploaded the source to my GoogleDrive
__________________
Hybrid here in the forum, homepage
Notice: Since email notifications do not work here any more, it might take me quite some time to notice a reply to a thread,..

Last edited by Selur; 18th June 2022 at 07:20.
Selur is offline   Reply With Quote
Old 18th June 2022, 14:25   #45  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,228
Selur,
OK, Exblend only writes XBD file on exblend input clip [EDIT: ExBlend Filter] destructor, so we need to do a little hack for RT_ForceProcess thingy to work.

Code:
VideoFileName   ="E:\SELUR\Courage the Cowardly Dog S02E17E18 SOURCE.dgi"
DGSource(VideoFileName)
ORG=Last

TMP=ORG
TMP.Exblend(mode=1, ExBfile=".\Exbfile", debug=true, lv=5, dv=5)
RT_ForceProcess()  # Force PASS1
TMP=0               # Force Close ExBlend I/P clip [and so also destroy ExBlend Filter clip]. XBD file NOT written until ExBlend destructor is called.

ORG
Exblend(mode=2,ExBfile=".\Exbfile")  # PASS2

Return last
EDIT: Above we had a bit of an 'Interoperability' style problem, as RT_ForceProcess returns only a 0 [TwriteAVI::ForceProcess() does return a clip and would probably be more suitable].
So, we had to kill input clip to Exblend instead of output clip. Making Last=0 [instead of "TMP=0"] after RT_ForceProcess() does not work, not sure why.

EDIT: Above PASS2 is decimated result, so any StackHorizontal whatsit will be out-of-sync frames.

EDIT: Metrics on last frame [single pass only] show 92.53% of maximum possible blend pair detections,
I would only use ExBlend() if above about 95% or 96%. [EDIT: Although it is a short clip and does fluctuate about 92% -> 96%, longer clip would be better accuracy %]
__________________
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; 18th June 2022 at 15:58.
StainlessS is offline   Reply With Quote
Old 18th June 2022, 15:38   #46  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,228
With stackhorizontal

Code:
VideoFileName   ="E:\SELUR\Courage the Cowardly Dog S02E17E18 SOURCE.dgi"
DGSource(VideoFileName)
ORG=Last

TMP=ORG
TMP.Exblend(mode=1, ExBfile=".\Exbfile", debug=true, lv=5, dv=5)
#return last Return Pass 1

RT_ForceProcess()
TMP=0 # kill TMP clip and call ExBlend filter destructor

ORG

SHOW=1
Exblend(mode=2,ExBfile=".\Exbfile",Decimate=False,Disp=1,Show=SHOW)  # Non decimated, Blend pair replaced with 2 x copies of ex-blended frame. Little colored block flags ex-Blended frame pair.
#Exblend(mode=2,ExBfile=".\Exbfile")                                 # Deblended & Decimated

# Both below lines for Non Decimated ONLY.
StackHorizontal(ORG,Last)
#Subtract(ORG,Last)

Return last
__________________
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; 18th June 2022 at 16:02.
StainlessS is offline   Reply With Quote
Old 20th June 2022, 14:27   #47  |  Link
Julek
Registered User
 
Julek's Avatar
 
Join Date: Dec 2020
Posts: 65
Quote:
Originally Posted by Selur View Post
Ps.: Also uploaded the source to my GoogleDrive
In this case there is no new information in the combed frame, it's just the prev blended with the next, the correct way here is to just drop it like this:

Code:
import vapoursynth as vs
core = vs.core

src = core.lsmas.LWLibavSource(r"C:\Users\conta\Videos\src\dog.mkv")
decimate = src.std.SelectEvery(cycle=5, offsets=[0, 1, 2, 4])
decimate.set_output()
But since the pattern is not fixed, you would have to adjust the offsets for each scene.
__________________
CPU: AMD 3700X | GPU: RTX 3070Ti | RAM: 32GB 3200MHz
Discord: @Julek#9391 || GitHub
Julek is offline   Reply With Quote
Old 20th June 2022, 16:58   #48  |  Link
Julek
Registered User
 
Julek's Avatar
 
Join Date: Dec 2020
Posts: 65
Quote:
Originally Posted by Julek View Post
In this case there is no new information in the combed frame, it's just the prev blended with the next, the correct way here is to just drop it like this:

Code:
import vapoursynth as vs
core = vs.core

src = core.lsmas.LWLibavSource(r"C:\Users\conta\Videos\src\dog.mkv")
decimate = src.std.SelectEvery(cycle=5, offsets=[0, 1, 2, 4])
decimate.set_output()
But since the pattern is not fixed, you would have to adjust the offsets for each scene.
I just noticed that the background is true 30 fps, so decimate would not be ideal.
I will try to make a script to replace the damaged part using a mask.
__________________
CPU: AMD 3700X | GPU: RTX 3070Ti | RAM: 32GB 3200MHz
Discord: @Julek#9391 || GitHub
Julek is offline   Reply With Quote
Old 20th June 2022, 17:12   #49  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 6,748
Quote:
But since the pattern is not fixed, you would have to adjust the offsets for each scene.
I know I could go scene by scene and manually drop fields, but that really is a pain to do for a whole file and not just a snipped.
I'm looking for some way to automate this.
__________________
Hybrid here in the forum, homepage
Notice: Since email notifications do not work here any more, it might take me quite some time to notice a reply to a thread,..
Selur is offline   Reply With Quote
Old 21st June 2022, 18:32   #50  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 6,748
@StainLess: Finally found the time to test it, and with this 2pass works fine: Thanks for the help!
__________________
Hybrid here in the forum, homepage
Notice: Since email notifications do not work here any more, it might take me quite some time to notice a reply to a thread,..
Selur is offline   Reply With Quote
Reply

Tags
blending, unblending

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 01:42.


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