Log in

View Full Version : Replace frames with black


srfscenar
26th June 2015, 11:34
Hi all,
Newbie in avisynth.

I have a video which is 271200frames.
I want to replace the part of my video between 800-950 frames
with total black.
How can I do that?

Thank you,

poisondeathray
26th June 2015, 15:57
Here is one way to do it



orig=last

bl=blankclip(orig)

orig.trim(0,799) ++ bl.trim(800,950) ++ orig.trim(951,0)

srfscenar
26th June 2015, 16:30
Thanks! Seems logical. But Avspmod says 'Splince: one clip has audio and the other doesn't (not allowed)' got any ideas?

poisondeathray
26th June 2015, 16:32
killaudio()



orig=last

bl=blankclip(orig).killaudio()

orig.trim(0,799) ++ bl.trim(800,950) ++ orig.trim(951,0)

srfscenar
26th June 2015, 16:43
That did it! Now it says Frame sizes doesn't match. Any idea about this?

poisondeathray
26th June 2015, 16:54
Are you sure ?

Blankclip(orig) will take on the dimensions , fps, and colorspace of "orig" (or whatever clip you specify)

What are your video characteristics (eg. use mediainfo), and source filter - post your full script

srfscenar
26th June 2015, 17:00
Sorry my bad! Worked perfectly!!!

Gavino
26th June 2015, 22:53
Blankclip(orig) will take on the dimensions , fps, and colorspace of "orig" (or whatever clip you specify)
It will also take on the presence or absence of an audio track - eg, if "orig" is video only, you get a blank video only clip - so the KillAudio() should not be necessary either. I suspect user error here too.