Trying to black out a portion of my video with avisynth

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
User avatar
Joined: Sun Nov 23, 2014 10:59 am
Location: Fuyuki City, Japan
Org Profile

Trying to black out a portion of my video with avisynth

Postby EnQuatre » Mon Jan 05, 2015 3:01 pm


So I'm trying to generate an avisynth script that, when read, will eliminate the video for a portion of my AMV while maintaining the audio. (Essentially I'm removing a credit title sequence I inserted while maintaining the music track). I'm looking for ideas!

I've searched around and the closest thing I can find to what I'm looking for is the tweak function, where I can darken the video completely using the brightness settings, but that affects my entire video as opposed to just the portion of it I want blacked out. I'd appreciate any help you guys have to offer!

User avatar
Joined: Fri Oct 29, 2010 5:34 am
Location: London, United Kingdom
Org Profile

Re: Trying to black out a portion of my video with avisynth

Postby Enigmo » Mon Jan 05, 2015 5:05 pm

Use applyrange() to use tweak for a particular bracket of frames.

another method (but this time for real blank space) would be to use splicing in your script to cut the first part of the amv before you want the black screen and then adding the black screen and then adding in the rest of the amv. then at the very end you could use audiodub to add in audio without being affected by the splicing and stuff. or for the audio, you could just render the scripted video and then mux the vid with the original audio. BUT yeah, just learn applyrange and use your tweak thing.
Image Image

User avatar
Surreptitious fluffy bunny
Joined: Fri Aug 30, 2002 12:08 pm
Status: Creepin' between the bullfrogs
Location: St. Pete, FL
Org Profile

Re: Trying to black out a portion of my video with avisynth

Postby Qyot27 » Tue Jan 06, 2015 9:51 pm

As mentioned, ApplyRange. But instead of Tweak, I'd do it using BlankClip and Overlay:

Code: Select all

ApplyRange(100,500, "Overlay", blank)

There might be a minor chance that this could be faster than using Tweak, since BlankClip just generates a black video stream (although this can be changed with the color= parameter), but I've not performed any kind of speed tests.

Passing 'last'* to BlankClip makes it adjust its parameters (length, resolution, etc.) to match those of the regular clip*. This is loaded into the 'blank' variable. ApplyRange specifies that Overlay should overlay the content of 'blank' onto the regular clip for frames 100-500. Overlay defaults to using Blend mode and an opacity of 1.0, which means that by default, Overlay just shows the overlaid video rather than doing any other sort of in-between processing of the video layers.

*'last' being the variable that the regular clip is implicitly referred to as if the user doesn't explicitly define a variable to put it in. You could also write it this way:

Code: Select all

v1.ApplyRange(100,500, "Overlay", blank)
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog

Return to “AviSynth Help”

Who is online

Users browsing this forum: No registered users and 2 guests