Log in

View Full Version : Insert one video into other video.


raiden1988
13th September 2010, 23:01
Hello!

I have two files .dv2 and I would like to know since I can replace a part of one with her of other one.

For example:

-Two *.dv2 of the same duration (example 600) frames.

-The video 1 begins in the frame 1.
-In the frame 100, would be inserted the frame to 300 at 500 of the video 2
-Continue in the frame 300 with video1

Thanks!

ajp_anton
13th September 2010, 23:06
Very weirdly written post... I get the basic idea of what you're saying, but I can't follow your example. Anyway...

video1.trim(0,99) + video2.trim(100,199) + video1.trim(200,600)

If you want the audio to be from video1 only, add
audiodub(joinedvideo, video1)

raiden1988
13th September 2010, 23:16
sorry for my english...

Very weirdly written post... I get the basic idea of what you're saying, but I can't follow your example. Anyway...

video1.trim(0,99) + video2.trim(100,199) + video1.trim(200,600)

If you want the audio to be from video1 only, add
audiodub(joinedvideo, video1)

thanks!

For to charge the videos i use this:

video1 = "c:\video1.dv2"
video2 = "c:\video2.dv2"

#rest of scrip

video1.Trim(0,2726)+video2.Trim(2727,17741)+video1.Trim(17742,18304)+video2.Trim(18305,0)

but i have error: invalid arguments tu function "XXX" in all filters of script :S

Guest
13th September 2010, 23:22
Should be:

video1 = mpeg2source("c:\video1.d2v")
video2 = mpeg2source("c:\video2.d2v")

Note the mpeg2source() and the fix to your extensions for the D2V files.

raiden1988
13th September 2010, 23:27
Should be:

video1 = mpeg2source("c:\video1.d2v")
video2 = mpeg2source("c:\video2.d2v")

Note the mpeg2source() and the fix to your extensions for the D2V files.

Sorry, i write the extension in the post bad but in the script are good.

I tried this:

video1 = mpeg2source ("C:\video1.d2v").Trim(0,2726)
video2 = mpeg2source ("C:\video2.d2v").Trim(1758,3000)

videof = video1++video2

#rest of script

but i have the same problem.

thanks for your help and sorry for the inconveniences!

Guest
13th September 2010, 23:45
Give the ENTIRE script. Use cut and paste on the whole thing.

raiden1988
13th September 2010, 23:51
Give the ENTIRE script. Use cut and paste on the whole thing.

This is:



LoadPlugin("C:\Users\Documents\Avisynth\DGDecode.dll")
LoadPlugin("C:\Users\Documents\Avisynth\TDeint\Tdeint.dll")
LoadPlugin("C:\Users\Documents\Avisynth\EEDI2\eedi2.dll")
LoadPlugin("C:\Users\Documents\Avisynth\TIVTC\TIVTC.dll")
LoadPlugin("C:\Users\Documents\Avisynth\Masktools-v2\mt_masktools.dll")
LoadPlugin("C:\Users\Documents\Avisynth\RemoveGrain\RemoveGrain.dll")
LoadPlugin("C:\Users\Documents\Avisynth\undot\undot.dll")
LoadPlugin("C:\Users\Documents\Avisynth\nnedi2\nnedi2.dll")
LoadPlugin("C:\Users\Documents\Avisynth\DeDot\De.dll")
LoadPlugin("C:\Users\Documents\plugins\BiFrost.dll")
LoadPlugin("C:\Users\Documents\Avisynth\MaskTools-v1.5.8\MaskTools.dll")
LoadPlugin("C:\Users\Documents\Avisynth\nuevos\mvtools2.dll")
LoadPlugin("C:\Users\Documents\Avisynth\nuevos\fft3dfilter.dll")
LoadPlugin("C:\Users\Documents\Avisynth\nuevos\dfttest.dll")
LoadPlugin("C:\Users\Documents\Avisynth\warpsharp\warpsharp.dll")

import("C:\Users\Documents\Avisynth\limitedsharpenfaster.avsi")

video1 = mpeg2source ("C:\video1.d2v").Trim(0,2726)
video2 = mpeg2source ("C:\video2.d2v").Trim(1758,3000)

videof = video1++video2

ConditionalFilter(last, last, last.DeDot(20,20,15,5), "YDifferenceFromPrevious()", ">", "5", false)
Bifrost(interlaced=true)
interp = separatefields().selecteven().eedi2()
deint = tdeint(edeint=interp)
tfm(d2v=videof,clip2=deint)
crop(10,2,-8,-0)
tdecimate(mode=1)
ConvertToYV12()

super = MSuper(pel=2)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, overlap=4)
backward_vec1 = MAnalyse(super, isb = true, delta = 1, overlap=4)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, overlap=4)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, overlap=4)
fft3dfilter(plane=3,bt=3,sigma=1.5,bw=32,bh=32,ow=16,oh=16)
dfttest(smode=0,sbsize=5,tbsize=3,sigma=.5,u=false,v=false)

Spline36Resize(720,576)
Limitedsharpenfaster(smode=5, strength=40)
tweak(hue=4,sat=1.22)

Is for anime

Guest
14th September 2010, 00:09
You've got nothing assigned to the variable last when you hit ConditionalFilter(). That is the cause of the errors.

I don't know what you are trying to do in that script and don't know TFM very well, so can't tell you what last should contain. Let's wait for a TFM user to come along.

Wild guess... Add last = videof just before ConditionalFilter().