Hey!
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!
Trying to black out a portion of my video with avisynth
- EnQuatre
- Joined: Sun Nov 23, 2014 10:59 am
- Location: Fuyuki City, Japan
Trying to black out a portion of my video with avisynth
AMVs: ---- ---- ---- ---- ---- ---- ---- ----
Software: Cyberlink Powerdirector 12, Sony Vegas Pro 13
Software: Cyberlink Powerdirector 12, Sony Vegas Pro 13
- Enigmo
- Joined: Fri Oct 29, 2010 5:34 am
- Location: London, United Kingdom
- Contact:
Re: Trying to black out a portion of my video with avisynth
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.
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.
- Qyot27
- Surreptitious fluffy bunny
- Joined: Fri Aug 30, 2002 12:08 pm
- Status: Creepin' between the bullfrogs
- Location: St. Pete, FL
- Contact:
Re: Trying to black out a portion of my video with avisynth
As mentioned, ApplyRange. But instead of Tweak, I'd do it using BlankClip and Overlay:
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
FFmpegSource2("input.mkv",atrack=-1)
blank=BlankClip(last)
ApplyRange(100,500, "Overlay", blank)
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=FFmpegSource2("input.mkv",atrack=-1)
blank=BlankClip(v1)
v1.ApplyRange(100,500, "Overlay", blank)
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog