Posts: 3
Threads: 0
Joined: 2018 Aug
Thanks: 6
Given 0 thank(s) in 0 post(s)
Country:
2018-09-19, 10:00 AM
(This post was last modified: 2018-09-19, 10:06 AM by iwil.)
(2018-02-05, 07:46 AM)random.next Wrote: >then change the resolution (vertical and/or horizontal) until they align perfectly (for example, 1924x1080, or 1916x1072 etc) - try also 1pixel variation, using YV24
Use aspectRatio params instead. And angle params for rotation (range -1 to 1 for beginning) . Aspect ratio is width divided to height.
If your over!ay resolution is 1920x800 then both aspectRatio params are equal to 2.4 by default. Set range instead of fixed default value: aspectRatio1=2.3 and aspectRatio2=2.5. Extend range if necessary. After testing leave minimal appropriate range. Hi random, I have studied and tested your magic script for a several days, you did a great job, thank you.
I'm going to merge 2 clips with your autooverlay tools, here is my working environment:
win7, avs+ r2728, autooverlay 2.5
video1:1920x1080, with logo
video2:1920x1080, no logo
now I plan to get video2 overlay on video1
but question is, although both clips have the same resolution, but infact, video2 (look like 1924x1084 content resized to 1920x1080) has little more larger picture than video1, it has screwed me for a long days for modifing and testing the avs script round and round, until saw your this post, the aspectratio params was very helpful, finally, I got them align perfectly, thanks for your guidance.
for now, I would like to ask 2 questions for my curiousness happen on trying this fantasy script:
1, how to set the minOverlayArea and minSourceArea properly in my situation(reference for info above)? what's the design purpose of these params?
2, to remove the logo, it seem to overlayrender function can't finish the job alone, still need overlay function assist, right? if so what's the best choice for overlay and mt_merge? overlay need to convert the 2 clips to yv24 internally, but mt_merge no need to do it.
Posts: 195
Threads: 2
Joined: 2017 Dec
Thanks: 12
Given 250 thank(s) in 89 post(s)
Country:
2018-09-19, 07:10 PM
(This post was last modified: 2018-09-19, 09:39 PM by random.next.)
First you need to make mask image for video1. It is black and white image where logo is poor black. It is good practice to add some gradient around the logo. You should use it as sourceMask in the OverlayEngine. Note that by default all YUV clips are in limited color range in Avisynth. So it must be converted to PC range. Example:
mask=ImageSource("M:\...\mask.png", pixel_type="Y8").ColorYUV(levels="TV->PC").Trim(999,999)
OverlayEngine(... sourceMask=mask...)
Mask clip tells OverlayEngine to exclude logo area from image comparison to provide better alignment.
After that if sources are stabilized to each other (have the same align settings for all frames) you should use StaticOverlayRender without OverlayEngine with align settings that you could take from your previous script with engine and OverlayRender(...debug=true). Or if they are not stablized then use OverlayRender.
As for your questions.
1. For your explanation overlayArea is about (1920x1080)/(1924x1084). I don't exatly know what videos are you use so try to set both params to 95.
2. To hide logo you should use your mask clip with internal Overlay filter after OverlayRender.
Posts: 3
Threads: 0
Joined: 2018 Aug
Thanks: 6
Given 0 thank(s) in 0 post(s)
Country:
2018-09-20, 03:39 AM
(This post was last modified: 2018-09-20, 04:04 AM by iwil.)
Posts: 195
Threads: 2
Joined: 2017 Dec
Thanks: 12
Given 250 thank(s) in 89 post(s)
Country:
>I assumed that lower diff value mean to better align result, is that right?
Did you read the readme?
Posts: 3
Threads: 0
Joined: 2018 Aug
Thanks: 6
Given 0 thank(s) in 0 post(s)
Country:
I may have a misunstanding about the diff value, would you explain it more here?
Posts: 195
Threads: 2
Joined: 2017 Dec
Thanks: 12
Given 250 thank(s) in 89 post(s)
Country:
Posts: 1
Threads: 0
Joined: 2018 Sep
Thanks: 0
Given 0 thank(s) in 0 post(s)
Country:
So, resizing in the automatic mode happend only with the save of the aspect of overlay source?
But In the editor I can change it without saving the aspect (uncheck box).
Posts: 195
Threads: 2
Joined: 2017 Dec
Thanks: 12
Given 250 thank(s) in 89 post(s)
Country:
Posts: 6
Threads: 0
Joined: 2017 Sep
Thanks: 1
Given 2 thank(s) in 2 post(s)
Country:
deleted user
Unregistered
Thanks:
Given thank(s) in post(s)
@random.next
I encounter a problem that when your plugin is loaded/in the plugin directory, I am unable to reload an avs file in VirtualDub. It hangs forever/freezes. Anything you can do about that? Only workaround at this moment is to close VirtualDub and open the avs file again.
|