adding 2 seconds of black?

This forum is for questions and discussion of all the aspects of handling your footage. If you have questions about capturing/ripping footage, AviSynth, or compression/encoding/converting, look here.

adding 2 seconds of black?

Postby Rider4Z » Fri Jan 20, 2012 10:58 pm

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)
Image Image
Image Image
Anime Conji AMV Contest Coordinator
Anime Vegas AMV Contest Co-coordinator
User avatar
Rider4Z
Pirate King
 
Joined: 14 Dec 2003
Location: The tardis
Status: bronied

adding 2 seconds of black?

Postby LantisEscudo » Fri Jan 20, 2012 11:35 pm

Code: Select all
vid=avisource(file)
black=BlankClip(vid, 48)
black++vid++black


You can replace the 48 with 60 if your video is 29.97 instead of 23.976.
User avatar
LantisEscudo
 
Joined: 08 Mar 2001
Location: Vermont

Re: adding 2 seconds of black?

Postby Rider4Z » Fri Jan 20, 2012 11:54 pm

DUDE thanks! :awesome:
Image Image
Image Image
Anime Conji AMV Contest Coordinator
Anime Vegas AMV Contest Co-coordinator
User avatar
Rider4Z
Pirate King
 
Joined: 14 Dec 2003
Location: The tardis
Status: bronied

Re: adding 2 seconds of black?

Postby mirkosp » Sat Jan 21, 2012 9:22 am

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)
Image
User avatar
mirkosp
MODkip
 
Joined: 24 Apr 2006
Location: Gallarate (VA), Italy
Status: (」・ワ・)」(⊃・ワ・)⊃

Re: adding 2 seconds of black?

Postby LantisEscudo » Sat Jan 21, 2012 11:28 am

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


That won't work; that'll give you two copies of the video with two seconds of black in the middle.
User avatar
LantisEscudo
 
Joined: 08 Mar 2001
Location: Vermont

Re: adding 2 seconds of black?

Postby mirkosp » Sat Jan 21, 2012 11:31 am

Welp, yeah, brainfart. I humbly apologise. Fixed now.
Image
User avatar
mirkosp
MODkip
 
Joined: 24 Apr 2006
Location: Gallarate (VA), Italy
Status: (」・ワ・)」(⊃・ワ・)⊃

Re: adding 2 seconds of black?

Postby Phantasmagoriat » Sat Jan 21, 2012 6:58 pm

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:
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()

:bear:

~Phan
Image
Org Profile | AMVGuide | Phan Picks! | THE424SHOW | YouTube | "Galactic Escape"

"Effort to Understand; Effort to be Understood; to See through Different Eyes."
User avatar
Phantasmagoriat
 
Joined: 06 Feb 2006
Status: ☁SteamPunked≈☂


Return to Footage Help

Who is online

Users browsing this forum: No registered users and 1 guest