Hello friends.
I am trying to merge two videos, one old with uncensored scenes and the other new, but censored. Both videos have the same resolution, number of frames and fps.
Well, my test worked well until I got to moving scenes.
Script:
Mask:Code:video1 =FFvideoSource() video2 =FFvideoSource() # MASK1=CoronaSequence(file="C:\code\01.png").ConvertToYV12(matrix="pc.601") MASK2=CoronaSequence(file="C:\code\02.png").ConvertToYV12(matrix="pc.601") # CLIP_MASK1=Overlay(video2, video1, mask=MASK1).Subtitle("merge+mask > test") CLIP_MASK2=Overlay(video2, video1, mask=MASK2).Subtitle("merge+mask > test") # R1=ReplaceFramesSimple(video2, CLIP_MASK1, mappings="[9565 9627]") R2=ReplaceFramesSimple(R1, CLIP_MASK2, mappings="[10588 10604]") return R2
[Attachment 57038 - Click to enlarge]
In this test, the mask goes from 9565 to 9627, but the scene moves, I would like to know if there is any way to move the white part to avoid making multiple duplicates of the filters, as I already have many lines of them, aside from the fact that it would make the process easier, as I have other masquerade models to add.
Thank you in advance for any ideas.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 6 of 6
Thread
-
-
Stack your videos side-by-side and see if the frames really match.
Code:video1 =FFvideoSource() video2 =FFvideoSource() return(StackHorizontal(video1, video2))
-
Yes, I need to make this white area go from top to bottom in a straight line, it does not increase. I had looked at Animate yesterday, but I couldn't fit it into this script.
I will try again.
Thanks. -
I don't know exactly what your requirements are but here's an example of moving your mask over frames 100 to 199:
Code:function MoveBlob(clip c, int xpos, int ypos) { BlankClip(c, color=$000000) Overlay(last, c, x=xpos, y=ypos) } video1 = BlankClip(width=720, height=576, color=$ff0000) # a red video, just so we can see the results video2 = BlankClip(width=720, height=576, color=$00ff00) # a green video, just so we can see the results blob = ImageSource("blob.png").BilinearResize(video1.width, video1.height) blob = Animate(100,199, "MoveBlob", blob,0,-300, blob,0,50) # move the blob over frames 100 to 199 Overlay(video1, video2, mask=blob)
-
Thanks for the help, Jagabo.
I was able to do it by your method and I also got another one even more practical using blackness() and motion with Mocha pro.
Unfortunately the color is very different and makes the project unfeasible, it is difficult to mix DVDPAL with NTSC.
Thank you -
You can probably adjust the colors with Tweak(), ColorYUV(), etc. to get them close before the overlay. There's also a filter called ColourLike() that is designed for this.
http://avisynth.nl/index.php?title=ColourLike
Similar Threads
-
Help with My Scriot Motion Mask for two videos
By Kuronoe in forum Newbie / General discussionsReplies: 0Last Post: 28th Jan 2021, 09:46 -
need help with a script for Avidemux to convert many videos
By comet424 in forum Newbie / General discussionsReplies: 0Last Post: 27th May 2020, 10:20 -
Rotate videos from script and Mux video+ audio!!
By Cauptain in forum Video ConversionReplies: 5Last Post: 7th Nov 2019, 17:00 -
Script to scale videos with waifu2x (AviSynth)
By EsteveJohnson in forum Video ConversionReplies: 2Last Post: 4th Nov 2019, 18:02 -
Convert Videos for Playing on Chromecast - PowerShell script
By V1de0Luvr in forum Video ConversionReplies: 2Last Post: 30th Jun 2016, 09:37