PDA

View Full Version : How to make AVS script to combining parts of a film mpg2 and and uncompresed RGB24


budinst
24th March 2009, 14:58
How to make AVS script to combining parts of a film mpg2 and and uncompresed RGB24 slides (RGB24)?.

movie one (mpg2):

#START AVS script
LoadPlugin("C:\Program Files\GordianKnot\DGMPGDec\DGDecode.dll")
LoadVirtualDubPlugin("E:\instalki_\VirtualDub-1.7.1\plugins\logo17b2\Logo.vdf", "Logo", 0)
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\decomb.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\UnDot.dll")

a=MPEG2Source("G:\jkm_23_03_2009.d2v").LanczosResize(1280,720).FieldDeinterlace(blend=false).Undot() # Lanczos (Sharp)

audio1 = WAVSource("G:\jkm_23_03_2009_1.wav")
audio2 =WAVSource("G:\jkm_23_03_2009_2.wav")
stereo1 = MergeChannels(audio1,audio2) # STEREO!

AudioDub(a, stereo1)
Trim(50,6521,false)

FadeIn(30)

#Dissove clips, add subtitle
clip1=Trim(0, 110)
clip2=Trim(61, 250).Subtitle("23 marca 2009", font="Verdana", size=32, text_color=$FFE87C, x=120, y=650)
clip3=Trim(201, 999999999)
Dissolve(clip1, clip2, clip3, 50)
FadeOut(60)

and movie Nr 2 (dissolved photo) :

b=imagesource("G:\PLANSZE\hdtv-apel01.jpg")
b=Trim(b,1,135)
c=imagesource("G:\PLANSZE\hdtv-apel02.jpg")
c=Trim(c,1,135)
d=imagesource("G:\PLANSZE\hdtv-apel03.jpg")
d=Trim(d,1,135)
e=imagesource("G:\PLANSZE\hdtv-apel04.jpg")
e=Trim(e,1,135)
f=imagesource("G:\PLANSZE\hdtv-apel05.jpg")
f=Trim(f,1,135)



clip= Dissolve( b, c, d, e ,f , 30)
clip = ChangeFPS(clip, 25)
audio3 = WAVSource("G:\jkm_24_03_2009_1.wav")
audio4 = WAVSource("G:\jkm_24_03_2009_1.wav")
stereo2 = MergeChannels(audio3,audio4) # STEREO!
clip=AudioDub(clip, stereo2)
return clip.FadeIn(10).FadeOut(30)

budinst
24th March 2009, 23:05
here need:
ImageSource("G:\PLANSZE\hdtv-apel01.jpg").AssumeFPS(25).ConvertToYV12()

budinst
25th March 2009, 12:41
#START AVS script
LoadPlugin("C:\Program Files\GordianKnot\DGMPGDec\DGDecode.dll")
LoadVirtualDubPlugin("E:\instalki_\VirtualDub-1.7.1\plugins\logo17b2\Logo.vdf", "Logo", 0)
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\decomb.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\UnDot.dll")

a=MPEG2Source("G:\jkm_23_03_2009.d2v").LanczosResize(1280,720).FieldDeinterlace(blend=false).Undot() # Lanczos (Sharp)
#a=Trim(a,50,6521,false)

b=imagesource("G:\PLANSZE\hdtv-apel01.jpg")
b=Trim(b,1,135)
c=imagesource("G:\PLANSZE\hdtv-apel02.jpg")
c=Trim(c,1,135)
d=imagesource("G:\PLANSZE\hdtv-apel03.jpg")
d=Trim(d,1,135)
e=imagesource("G:\PLANSZE\hdtv-apel04.jpg")
e=Trim(e,1,135)
f=imagesource("G:\PLANSZE\hdtv-apel05.jpg")
f=Trim(f,1,135)

clipS= Dissolve( b, c, d, e ,f , 30).AssumeFPS(25).ConvertToYV12() # dissolve photo
clip=Dissolve(a , clipS, 20) # dissolve movie and photo

audio1 = WAVSource("G:\jkm_23_03_2009_1.wav")
audio2 =WAVSource("G:\jkm_23_03_2009_2.wav")
stereo1 = MergeChannels(audio1,audio2) # STEREO!

audio3 = WAVSource("G:\jkm_24_03_2009_1.wav")
audio4 = WAVSource("G:\jkm_24_03_2009_1.wav")
stereo2 = MergeChannels(audio3,audio4) # STEREO!

stereo=stereo1++stereo2

clip=AudioDub(clip, stereo)
#Trim(50,6521,false)



#Dissove clips, add subtitle
#clipA=Trim(0, 110)
#clipB=Trim(61, 250).Subtitle("23 marca 2009", font="Verdana", size=32, text_color=$FFE87C, x=120, y=650)
#clipC=Trim(201, 999999999)
#Dissolve(clipA, clipB, clipC, 50)



return clip.FadeIn(10).FadeOut(30)

here trouble: 1) not work dissolved subtitle
2) I don't know how to trimm movie a and corresponding to his soundtrack stereo1

regards

budinst
26th March 2009, 12:43
#START AVS script
LoadPlugin("C:\Program Files\GordianKnot\DGMPGDec\DGDecode.dll")
LoadVirtualDubPlugin("E:\instalki_\VirtualDub-1.7.1\plugins\logo17b2\Logo.vdf", "Logo", 0)
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\decomb.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\UnDot.dll")

a=MPEG2Source("G:\jkm_26_03_2009.d2v").LanczosResize(1280,720).FieldDeinterlace(blend=false).Undot() # Lanczos (Sharp)


b=imagesource("G:\PLANSZE\hdtv-apel01.jpg")
b=Trim(b,1,135)
c=imagesource("G:\PLANSZE\hdtv-apel02.jpg")
c=Trim(c,1,135)
d=imagesource("G:\PLANSZE\hdtv-apel03.jpg")
d=Trim(d,1,135)
e=imagesource("G:\PLANSZE\hdtv-apel04.jpg")
e=Trim(e,1,135)
f=imagesource("G:\PLANSZE\hdtv-apel05.jpg")
f=Trim(f,1,135)

clipS= Dissolve( b, c, d, e ,f , 30).AssumeFPS(25).ConvertToYV12() # dissolve photo
clip=Dissolve(a , clipS, 20) # dissolve movie and photo

audio1 = WAVSource("G:\jkm_26_03_2009_1.wav")
audio2 =WAVSource("G:\jkm_26_03_2009_2.wav")
stereo1 = MergeChannels(audio1,audio2) # STEREO!

audio3 = WAVSource("G:\jkm_spot_net_25sec 3_1.wav")
audio4 = WAVSource("G:\jkm_spot_net_25sec 3_2.wav")
stereo2 = MergeChannels(audio3,audio4) # STEREO!

stereo=stereo1++stereo2

clip=AudioDub(clip, stereo)
clip=Trim(clip,20,4885)++Trim(clip,4975,6000)


return clip.FadeIn(60).Animate(40,48,"Subtitle", "26 marca 2009",160,650,0,9999,"Arial",0,
\ "26 marca 2009",25,650,0,300,"Arial", 32).ConvertToRGB().Logo(1180, 50, 95, 1, 0, 0, 0, 0, "E:\logo_przezr_rozmiar4.BMP", 0, 125,

4000, 0, 0, 9400, 130).ConvertToYV12().FadeOut(30)


Here you can see the final result

http://www.youtube.com/watch?v=bP0Nr4xRco4 (http://www.youtube.com/watch?v=bP0Nr4xRco4)