Log in

View Full Version : What is proper syntax for BlankClip()?


FredThompson
21st May 2003, 11:39
The manual at avisynth.org says this (formatting added, well, it's there in the edit screen, spaces are being removed by the forum server):

BlankClip(clip template,
int length,
int width,
int height,
string pixel_type,
int fps,
int fps_denominator,
int audio_rate,
bool stereo,
bool sixteen_bit,
int color)

What do "pixel_type", "fps", "fps_denominator" and "sixteen_bit" mean?

I suspect "sixteen_bit" means 12/16 bit sound resolution.

I want to make a 2-second all-black 720x480x29.97 32000 stereo clip (for insertion before DV where the operator didn't start with some "blank" tape.)

Here's what I think I should do. The "?" means I don't know what to put in that position:

BlackClip(?,60,720,480,?,?,?,32000,Y,Y,?)

Wilbert
21st May 2003, 12:19
"pixel_type"
YUY2, YV12, RGB24 or RGB32

"fps"
Framerate of the new cilp.

"fps_denominator"
Can be used if "fps" is not accurate enough, by default 1.

"sixteen_bit"
True by default (=16). Dunno what happens, when set to false.

"stereo"
True by default, otherwise mono.

template
Uses the properties of the clip clip, when provided.

"color"
By default black.

So, your clip becomes:

BlankClip(length=60, width=720, height=480, fps=29.97, audio_rate=32000)

FredThompson
21st May 2003, 12:37
oh, I see. Thanks.

FredThompson
21st May 2003, 14:20
nope, doesn't quite work. There's another argument called stereo that's supposed to be a boolean. Well, setting it =True is parsed properly but the resultant clip reports as mono. At least, so says VirtualDub. This also yields a different framerate than my NTSC camcorder.

Maybe it's a bug in the 2.5.1 beta.

Wilbert
21st May 2003, 14:40
Well, setting it =True is parsed properly but the resultant clip reports as mono. At least, so says VirtualDub. This also yields a different framerate than my NTSC camcorder.

Maybe it's a bug in the 2.5.1 beta.
Yes, more people reported this. Maybe Sh0dan can have a look at it before releasing v2.52?

sh0dan
21st May 2003, 14:53
Oh I finally found this one - it has been rumbling around for ages. When implementing the new 2.5 audio, I must have intended to make the number of channels variable, so any number of channels could be created.

I'll just revert it to previous functionality for now.

FredThompson
21st May 2003, 14:54
Wow, ASCII and ye shall receive...

sh0dan
21st May 2003, 15:26
New CVS binary up - it seems to work as intended here.

zettai
21st May 2003, 16:37
Actually, whilst we are on the subject of generating blank clips for use in scripts, can I suggest a feature/extension of current blankclip features?

BlankAudio(etc) aka Silence(etc)

This would be really useful in situations where you want to use a blank wavsource. I can't remember the circumstance where I wanted this feature (I think I was doing a whole series of video appends and one was a title section without an audio track) but it would be really useful.

Similarly an ForceBlankAudio(etc) where it would add silent audio (with certain samplerate, stereo etc) to fit the current (or filter defined) video-only stream. I can imagine that being similarly useful when producing video to fit certain requirements.

Wilbert
21st May 2003, 16:42
This might do what you want:

video = ...
audio = BlankClip(video, samplerate = ...)
AudioDub(video,audio)

zettai
21st May 2003, 16:48
Originally posted by Wilbert
[B]This might do what you want:

and it does... which is strange because I'm certian I couldnt use blankclip as an audio source last week. Oh well, don't mind me.