Posts: 84
Threads: 1
Joined: 2020 Dec
Thanks: 87
Given 268 thank(s) in 49 post(s)
Country:
2021-08-31, 10:12 PM
(This post was last modified: 2021-08-31, 10:17 PM by Klexos.)
(2021-08-31, 03:55 PM)random.next Wrote: Pls upload screenshots of that frame from two sources.
Here's an 11 frame sample sequence from both sources.
I suspect the script actually thinks the alignment is correct.
https://mega.nz/file/NoJjCQQT#Ai1CVAYZkc...Z0KALKNaZ4
Posts: 191
Threads: 2
Joined: 2017 Dec
Thanks: 12
Given 234 thank(s) in 86 post(s)
Country:
You need to match luma level of your clips. Easiest way is a static ColorAdjust but it may produce invalid result if sources have very different framing. In this case it is possible to use another engine to adjust luma level of one from the sources (commented lines in the sample).
Code: DVD=ImageSource("DVD\F%06d.png", end=10).ConvertToYV12(matrix="Rec709")
OM=ImageSource("OM\F%06d.png", end=10).ConvertToYV12(matrix="Rec709")
OMtest=OM.ExtractY()
OMtest=OMtest.ColorAdjust(OMtest, DVD.ExtractY())
#tempConfig=OverlayConfig(subpixel=-1, branches=1, minSourceArea=80, minOverlayArea=80, minSampleArea=1000, requiredSampleArea=2000, aspectratio1=1.38, aspectratio2=1.42)
#tempEngine=OverlayEngine(OMtest, DVD, editor=false, maxDiff=8, maxDiffIncrease=1.5, maxDeviation=0.4, backwardFrames=2, forwardFrames=3, panScanDistance=1, presize="BilinearResizeMT", resize="BilinearResizeMT", configs = tempConfig)
#OMtest=tempEngine.OverlayRender(OM.ExtractY(), DVD.ExtractY(), debug=false, colorAdjust=1, opacity=0, upsize="BilinearResizeMT", downsize="BilinearResizeMT")
config=OverlayConfig(subpixel=2, branches=3, minSourceArea=70, minOverlayArea=70, minSampleArea=2000, requiredSampleArea=4000, aspectratio1=1.38, aspectratio2=1.42)
engine=OverlayEngine(OMtest, DVD, editor=false, maxDiff=8, maxDiffIncrease=1.5, maxDeviation=0.4, backwardFrames=2, forwardFrames=5, panScanDistance=2, presize="BilinearResizeMT", resize="Spline16ResizeMT", configs = config)
engine.OverlayRender(OM, DVD, debug=true, noise=80, gradient=80, colorAdjust=0, opacity=0, mode=4, upsize="Spline64ResizeMT", downsize="Spline64ResizeMT")
Posts: 84
Threads: 1
Joined: 2020 Dec
Thanks: 87
Given 268 thank(s) in 49 post(s)
Country:
2021-09-01, 05:27 AM
(This post was last modified: 2021-09-01, 06:35 AM by Klexos.)
(2021-08-31, 11:28 PM)random.next Wrote: You need to match luma level of your clips. Easiest way is a static ColorAdjust but it may produce invalid result if sources have very different framing. In this case it is possible to use another engine to adjust luma level of one from the sources (commented lines in the sample).
Code: DVD=ImageSource("DVD\F%06d.png", end=10).ConvertToYV12(matrix="Rec709")
OM=ImageSource("OM\F%06d.png", end=10).ConvertToYV12(matrix="Rec709")
OMtest=OM.ExtractY()
OMtest=OMtest.ColorAdjust(OMtest, DVD.ExtractY())
#tempConfig=OverlayConfig(subpixel=-1, branches=1, minSourceArea=80, minOverlayArea=80, minSampleArea=1000, requiredSampleArea=2000, aspectratio1=1.38, aspectratio2=1.42)
#tempEngine=OverlayEngine(OMtest, DVD, editor=false, maxDiff=8, maxDiffIncrease=1.5, maxDeviation=0.4, backwardFrames=2, forwardFrames=3, panScanDistance=1, presize="BilinearResizeMT", resize="BilinearResizeMT", configs = tempConfig)
#OMtest=tempEngine.OverlayRender(OM.ExtractY(), DVD.ExtractY(), debug=false, colorAdjust=1, opacity=0, upsize="BilinearResizeMT", downsize="BilinearResizeMT")
config=OverlayConfig(subpixel=2, branches=3, minSourceArea=70, minOverlayArea=70, minSampleArea=2000, requiredSampleArea=4000, aspectratio1=1.38, aspectratio2=1.42)
engine=OverlayEngine(OMtest, DVD, editor=false, maxDiff=8, maxDiffIncrease=1.5, maxDeviation=0.4, backwardFrames=2, forwardFrames=5, panScanDistance=2, presize="BilinearResizeMT", resize="Spline16ResizeMT", configs = config)
engine.OverlayRender(OM, DVD, debug=true, noise=80, gradient=80, colorAdjust=0, opacity=0, mode=4, upsize="Spline64ResizeMT", downsize="Spline64ResizeMT")
I tried the code but no matter what it keeps getting me an error that says "failed to request frame 0"
Even just running it like this without the commented part. I feel like I'm messing up something basic.
Edit: After many tests I am not sure why but it appears removing
Code: upsize="BilinearResizeMT", downsize="BilinearResizeMT"
everywhere made it work.
Thank you so much, you're a life saver!
Posts: 191
Threads: 2
Joined: 2017 Dec
Thanks: 12
Given 234 thank(s) in 86 post(s)
Country:
2021-09-01, 08:19 AM
(This post was last modified: 2021-09-01, 08:24 AM by random.next.)
I recommend to use resampleMT - fast multithreading resize filters to speed up auto align https://github.com/jpsdr/ResampleMT
It contains resize functions with MT at the end.
Posts: 84
Threads: 1
Joined: 2020 Dec
Thanks: 87
Given 268 thank(s) in 49 post(s)
Country:
2021-09-01, 09:52 AM
(This post was last modified: 2021-09-01, 10:02 AM by Klexos.)
I got another perhaps silly question. But how do I actually fix the few bunch of frames that still misalign, considering I have the right values from a further frame
Is there a way to apply the values automatically from one frame to the rest?
https://i.imgur.com/fQE7FsW.jpg
For example I want frames 1-21 to have the same alignment as #22. Do I have to change them all one by one manually inputting the values?
I tried selecting the faulty frames and attempted to input the values while they were selected hoping it would change all the frames within the selection but didn't work.
Posts: 191
Threads: 2
Joined: 2017 Dec
Thanks: 12
Given 234 thank(s) in 86 post(s)
Country:
1. Select frame 22
2. Join button
3. Input 1
4. OK/Enter
5. If sources unstablizied to each other then press Adjust Scene or Scan scene.
Posts: 191
Threads: 2
Joined: 2017 Dec
Thanks: 12
Given 234 thank(s) in 86 post(s)
Country:
2021-09-04, 08:14 PM
(This post was last modified: 2021-09-04, 08:19 PM by random.next.)
v0.5 released: https://github.com/introspected/AutoOver.../tag/0.5.0
Many user functions added. Most interesting one is for color level fixing at frame borders:
Code: aoBorders(6, 1, segments = 10, blur = 0.5)
Posts: 84
Threads: 1
Joined: 2020 Dec
Thanks: 87
Given 268 thank(s) in 49 post(s)
Country:
2021-09-18, 11:07 AM
(This post was last modified: 2021-09-24, 07:40 AM by Klexos.
Edit Reason: Added mask image link
)
Hello again.
I've been reading through the thread but I can't seem to figure out/handle a whole bunch of issues.
Edit: Actually I wanna change my question.
I am overlaying 3 sources. 4:3 DVD, 16:9 Open Matte and Widescreen.
I generated the mask upon overlaying 4:3 and 16:9
Code: SOMconfig=OverlayConfig(subpixel=3, branches=2, minSourceArea=50, minOverlayArea=50, minSampleArea=2000, requiredSampleArea=4000,scaleBase=3)
SOMengine=OverlayEngine(OMluma.ConvertToY8(), DVD.ConvertToY8(), editor=false, maxDiff=8, maxDiffIncrease=1.5, maxDeviation=1, backwardFrames=8, forwardFrames=8, panScanDistance=2, configs = SOMconfig, statFile="C:\Users\Jarvis\Desktop\OverlaySOM.stat", presize="BilinearResizeMT", resize="Spline16ResizeMT")
SOM=SOMengine.OverlayRender(OM.ConvertToYV24(), DVD.ConvertToYV24(), debug=false, noise=80, width=2560, height=1440, gradient=25, colorAdjust=0, opacity=0, mode=4, upsize="Spline64ResizeMT", downsize="Spline64ResizeMT")
SOMLEV=SOM.Levels(0, 1.3, 255, 0, 255).Levels(0, 1.3, 255, 0, 255)
SOMMask=SOMengine.OverlayRender(OM.ConvertToYV24(), DVD.ConvertToYV24(), debug=false, noise=0, width=2560, height=1440, gradient=0, colorAdjust=0, opacity=0, mode=6, upsize="Spline64ResizeMT", downsize="Spline64ResizeMT")
However upon calling it in the final render ambilight won't cover the last bit of corners created by the WS version:
https://imgsli.com/NzIzNjU
The mask appears correctly when isolated/viewed at the first overlay and then when viewed at the last one too, so I'm really confused. Whatever I set the last mode to it does absolutely nothing besides 6 which gives me the mask itself:
https://i.imgur.com/Eps8uDZ.jpg
https://i.imgur.com/2JGmQz7.jpg
Code: Finalconfig=OverlayConfig(subpixel=3, branches=2, minSourceArea=40, minOverlayArea=40, minSampleArea=3000, requiredSampleArea=5000,scaleBase=3)
FinalEngine=OverlayEngine(SOM.ConvertToY8(), WS.ConvertToY8(), editor=false, sourceMask=SOMMask, maxDiff=3, maxDiffIncrease=1.5, maxDeviation=1, backwardFrames=8, forwardFrames=8, panScanDistance=0, configs = Finalconfig, statFile="C:\Users\Jarvis\Desktop\OverlayFinal.stat", presize="BilinearResizeMT", resize="Spline16ResizeMT")
FinalEngine.OverlayRender(SOM.ConvertToYV24(), WS.ConvertToYV24(), debug=false, noise=0, width=2560, height=1440, gradient=20, sourceMask=SOMMask, colorAdjust=1, opacity=1, mode=4, upsize="Spline64ResizeMT", downsize="Spline64ResizeMT")
Also side question:
Is there a way to make the two sources blend/match better in terms of colors? The WS and OMs sadly are graded quite differently It does mostly a good job but on some hues it creates artefacts/banding I noticed. Example:
https://imgur.com/iwBXzD8
Edit: Nevermind, I managed to get around these issues after all.
Posts: 315
Threads: 33
Joined: 2017 Oct
Thanks: 73
Given 149 thank(s) in 86 post(s)
Country:
Just a question.
I'm a complete newbie to AVISynth and Autooverlay. I would like to use AutoUverlay to overlay two sources. A 4:3 DVD and a 16:9 HDTV rip.
The HDTV source has a few logos and burnt in subtitles that I'd like to remove. Should I take care of this before overlaying? And regardless of the order I do these in, would it be likely that AutoOverlay would register them as being from the same master. To my eyes they definitely are from the same master.
Thanks.
Posts: 7,153
Threads: 601
Joined: 2015 Jan
Thanks: 1081
Given 1466 thank(s) in 963 post(s)
Country:
While the subtitles may "fall" inside the 1.33:1 frame, the logos would most likely not...
Hint: try to find a second HDTV from another source, to get rid of all logos and subs; then use the clean result as input.
|