Log in

View Full Version : Track and merge two movies?


color
9th March 2018, 15:01
I don't know if this is possible in avisynth but I'll ask anyway, who knows.

I have the same movie in two medias, one from vhs (colorized) in bad quality and the other one on dvd (grayscale) in good quality. They are in the same fps but the image in the colorized one is not the same cut on the edges. Is it possible to make them fit over each other with an avisynt-script? I was thinking on deshaker, it does track somehow isnt there another way to do this with the videos? Or is there another program that will work that can do this? Or do I have to fix this manually?

I have search for motion tracking in different programs but I cant find how do to with another image over.

The movie has only shown colorized on tv and never released, so I really want to do this. :)

raffriff42
9th March 2018, 22:59
This job sounds perfect for a new plugin called AutoOverlay (http://avisynth.nl/index.php/AutoOverlay). The plugin is designed for auto-aligned optimal overlay of one video clip onto another.

color
10th March 2018, 10:11
I don't get it to work, it looks like this. Can it be "AvsFilterNet plugin https://github.com/mysteryx93/AvsFilterNet/ (included, previous versions do not work correctly)" I didn't thought it was needed? I also tried both version x64 and x86, one of them wants me to check the version of it so I guess thats the wrong one.

LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\AvsFilterNet.dll")
LoadNetPlugin("C:\Program Files (x86)\AviSynth\plugins\AutoOverlay_netautoload.dll")

OM=DirectShowSource("C:\Users\bob\Documents\1080p_no_color.mkv") # YV12 clip
WS=DirectShowSource("C:\Users\bob\Documents\576_color.mp4") # YV12 clip
OverlayEngine(OM.ConvertToY8(), WS.ConvertToY8(), configs=OverlayConfig(subpixel=2))
OverlayRender(OM.ConvertToYV24(), WS.ConvertToYV24(), debug=true)
ConvertToYV12()

color
10th March 2018, 10:31
BTW, releated, how do I delay the "color" video with 2 frames:

B=DirectShowSource("black and white.mp4")
C=DirectShowSource("color.mp4")
Overlay(B, C.BicubicResize(B.Width, B.Height), mode="chroma")

wonkey_monkey
10th March 2018, 13:15
The easiest way is to advance the black and white video by two frames, by trimming two frames from the start:

B=DirectShowSource("black and white.mp4").trim(2,0)

color
10th March 2018, 14:37
Thank you davidhorman. That works great. (I colorized another movie)

color
11th March 2018, 16:44
This is relative to this thread so I post the question here also. I have added the colorized image over the grayscale, but the colorized is smaller. Is there a way to take the edges of the colorized movie and pull it out or make it blur?

http://www.forumbilder.se/H68GC/chroma-join035523.bmp

TO THIS:

http://www.forumbilder.se/H68GD/namnlos.png

StainlessS
11th March 2018, 18:25
As answered in PM (prior to seeing this), for clue search "Padding".

EDIT: here:- https://forum.doom9.org/showthread.php?p=1596804#post1596804

color
11th March 2018, 18:39
Thank you. :) I did add picture also. I think I did explain a bit wierd. Thank you. I will search on Padding. My english is not the best and there is so many technical words that I don't know yet. :) But I'm learning. :)

StainlessS
11th March 2018, 18:47
Bump:

Just to save you searching (took me some time to find it), see previous post edit.

EDIT: Mobile:

color
11th March 2018, 19:05
DirectShowSource("my movie.mp4").ConvertToRGB().Crop(86, 16, -40, -60).Padding(86,16,40,60)

that fixed it. :D Thank you. :) What would I do without you guys? :D

StainlessS
11th March 2018, 20:05
Thanx for PM,ing me the images, nice job sir :)

color
3rd November 2018, 09:26
After changing folder with the files I got it to work...for a while, after a few minutes avspmod crashed and when starting it again, it did not work, I could even import and it worked in Virtualdub2. I tried to read as mutch as I can and it might be a problem with the .net-files. I tried the tool from windows to repair but It come up with errors, I don't know how to uninstall or reinstall it. When I try to download the installation from windows homepage it says its already installed.

Does anyone know how to fix this? I need to get a video done in 9 days, and doing it manually takes a bit longer (well to mutch time). And this might be off topic so sorry for that but, I can use Sony Vegas 15 for a few days. Is there a way to maybe do something similar there, auto-align? I tried searching but I only find how to auto-align by audio, not video.

EDIT: or in blender

EDIT 2: I tried to change to the 64-bit version on the plugin AutoOverlay. Now I get error it does not support 64-bit on 32-version av avisynth. Thats wierd, isn't the latest Avisynth+ 64-bit?

https://forum.doom9.org/showthread.php?t=175247&page=2

StainlessS
3rd November 2018, 11:48
32 bit Avisynth requires 32 bit dll's and 32 bit codecs, similar 64 bit requirement for avisynth 64 bit.
(same type thing goes for other software / dll,s etc).

EDIT:
Thats wierd, isn't the latest Avisynth+ 64-bit?
One of them is, the other one isn't.

color
3rd November 2018, 12:03
But 32 gives error "Unable to load plugin, make sure it is a valid .Net assembly.". I don't really know how to get it to work.