adding 2 seconds of black?
- Rider4Z
- The Machine
- Joined: Sun Dec 14, 2003 3:55 am
- Status: Larger than life.
- Contact:
adding 2 seconds of black?
i remember someone posting a long time ago that there was a script that would add 2 seconds (or so) of black before and after your video for convention purposes.
is that true and if so, any idea what it is? (i knew i should have written it down when i saw it)
is that true and if so, any idea what it is? (i knew i should have written it down when i saw it)
- LantisEscudo
- Joined: Thu Mar 08, 2001 5:21 pm
- Location: Eastern Massachusetts
- Contact:
adding 2 seconds of black?
Code: Select all
vid=avisource(file)
black=BlankClip(vid, 48)
black++vid++black
| | |
AMV Contest Coordinator: Anime Boston 2016-2024 | Bakuretsu Con 2014-2023
AMV Contest Coordinator: Anime Boston 2016-2024 | Bakuretsu Con 2014-2023
- Rider4Z
- The Machine
- Joined: Sun Dec 14, 2003 3:55 am
- Status: Larger than life.
- Contact:
- mirkosp
- The Absolute Mudman
- Joined: Mon Apr 24, 2006 6:24 am
- Status: (」・ワ・)」(⊃・ワ・)⊃
- Location: Gallarate (VA), Italy
- Contact:
Re: adding 2 seconds of black?
You can also do it like this, which might be slightly faster while encoding (though for something this small I doubt it's possible to notice the difference if there is any):
Code: Select all
avisource("file.avi")
blankclip(last,48)+last+blankclip(last,48)
- LantisEscudo
- Joined: Thu Mar 08, 2001 5:21 pm
- Location: Eastern Massachusetts
- Contact:
Re: adding 2 seconds of black?
That won't work; that'll give you two copies of the video with two seconds of black in the middle.mirkosp wrote:You can also do it like this, which might be slightly faster while encoding (though for something this small I doubt it's possible to notice the difference if there is any):Code: Select all
avisource("file.avi") last+blankclip(last,48)+last
| | |
AMV Contest Coordinator: Anime Boston 2016-2024 | Bakuretsu Con 2014-2023
AMV Contest Coordinator: Anime Boston 2016-2024 | Bakuretsu Con 2014-2023
- mirkosp
- The Absolute Mudman
- Joined: Mon Apr 24, 2006 6:24 am
- Status: (」・ワ・)」(⊃・ワ・)⊃
- Location: Gallarate (VA), Italy
- Contact:
- Phantasmagoriat
- Joined: Mon Feb 06, 2006 11:26 pm
- Status: ☁SteamPunked≈☂
- Contact:
Re: adding 2 seconds of black?
I actually wrote a simple function for this a while back: pad()
Save, and put it in your AviSynth plugins folder. Call it like this:
~Phan
Save, and put it in your AviSynth plugins folder. Call it like this:
Code: Select all
avisource("file.avi")
pad(2) # adds 2 seconds of black, regardless of framerate, rounded to the nearest frame
pad(frames=24) # adds exactly 24 frames of black
pad(3.5, color=$FFFFFF, end=true) # adds 3.5 seconds, white, to the end. Alternatively you can use pad_end()
~Phan
Org Profile | AMVGuide | Phan Picks! | THE424SHOW | YouTube | "Painkiller"
"Effort to Understand; Effort to be Understood; to See through Different Eyes."