Log in

View Full Version : Problems with KillAudio


bwlonsdale
27th March 2005, 20:46
I have the following script:
----------------------------
loadplugin ("E:\dgmpgdec121\DGDecode.dll")
loadplugin ("E:\decomb521\Decomb521.dll")
mpeg2source ("C:\source.d2v")
Seg1=BlankClip(length=11, width=1280, height=720, pixel_type="YV12", fps=23.976, color=$000000)
Seg2=Telecide(order=1,guide=1,post=2,back=1,hints=true).Decimate(Cycle=5,Quality=3).BilinearResize(1280,720).Trim(12,0)
KillAudio(Seg1)
KillAudio(Seg2)
Seg1+Seg2
-----------------------------

When I load this into VirtualDub I get an avisynth error saying:-

Splice:One clip has audio and the other doesn't (not allowed)

I kinda thought I was killing the audio...!?

All I'm trying to do is remove the first 12 frames from the video and adding those 12 frames back in as blank frames (The first 12 frames of the video have a lot of useless noise on them so I just want to repalce them with blank ones.)

Avisynth 2.55, virtualdub 1.6.4 (older versions do the same)

thanks...

bwlonsdale
27th March 2005, 21:14
Never mind, I used this:-
-----------------------------------
loadplugin ("E:\dgmpgdec121\DGDecode.dll")
loadplugin ("E:\decomb521\Decomb521.dll")
mpeg2source ("C:\source.d2v")
Seg1=Telecide(order=1,guide=1,post=2,back=1,hints=true).Decimate(Cycle=5,Quality=3).BilinearResize(1280,720).Trim(0,19).Tweak(Bright=-255)
Seg2=Telecide(order=1,guide=1,post=2,back=1,hints=true).Decimate(Cycle=5,Quality=3).BilinearResize(1280,720).Trim(20,0)
Seg1+Seg2
-----------------------------------

If anyone can answer the KillAudio question, I'd be grateful to know where I was going wrong still.

stickboy
28th March 2005, 09:14
Originally posted by bwlonsdale
KillAudio(Seg1)
KillAudio(Seg2)
Seg1+Seg2You applied a KillAudio filter to Seg1, but you didn't do anything with the result.

You applied a KillAudio filter to Seg2, but you didn't do anything to the result.

Then you spliced together the original Seg1 and Seg2.

What you meant:
Seg1 = KillAudio(Seg1)
Seg2 = KillAudio(Seg2)Also, instead of manually matching the clip properties for BlankClip, just pass the original clip as an argument:
loadplugin ("E:\dgmpgdec121\DGDecode.dll")
loadplugin ("E:\decomb521\Decomb521.dll")
mpeg2source ("C:\source.d2v")
Seg2=Telecide(order=1,guide=1,post=2,back=1,hints=true)
\ .Decimate(Cycle=5,Quality=3).BilinearResize(1280,720).Trim(12,0)
Seg1=BlankClip(Seg2, length=11, color=$000000)
Seg1+Seg2
KillAudio()Alternatively, you could use my JDL_Blackout (http://www.avisynth.org/stickboy/) function:
ApplyRange(0, 11, "JDL_Blackout")which is intended for this purpose.

bwlonsdale
28th March 2005, 11:22
Thanks for the reply, I see what the problem was now!

And thanks for the link to your ready written functions, they're going to save me a lot of time !