PDA

View Full Version : "advanced" showSMPTE filter?


DaveF71
6th April 2003, 22:05
I need to add some SMPTE timecode onto a video file, but the showSMPTE filter included with AVIsynth doesn't quite cut the mustard. Basically, I'd need something that would be closer in functionality to the subtitle filter -- the ability to select font, size, color, screen position, and above all, starting SMPTE value (ie. initial offset that the filter would begin counting from). the ability to add a black box around the text would also be nice.

I realize that this isn't something that a lot of folks would use, but hey, the ability to do esoteric stuff to video is what makes Avisynth so damn fun.

Any suggestions would be appreciated. Thanks.

sh0dan
6th April 2003, 22:21
On the To-Do list (http://sourceforge.net/tracker/index.php?func=detail&aid=711988&group_id=57023&atid=482676). And as discussed here (http://forum.doom9.org/showthread.php?s=&threadid=49849).

I have used the excellent Vdub Addframenumber (http://toonarchive.com/addframenumbers/) - it works nicely with AviSynth, but it requires RGB32 (as all Vdub filters).

DaveF71
6th April 2003, 22:34
Originally posted by sh0dan
On the To-Do list (http://sourceforge.net/tracker/index.php?func=detail&aid=711988&group_id=57023&atid=482676). And as discussed here (http://forum.doom9.org/showthread.php?s=&threadid=49849).

Yeah, I had seen that post, but it doesn't address the "initial time value" issue. Great idea to use Layer for positioning, though.

I have used the excellent Vdub Addframenumber (http://toonarchive.com/addframenumbers/) - it works nicely with AviSynth, but it requires RGB32 (as all Vdub filters).

Similar problem here -- it's still using the start of the AVI file as its zero point.

I guess the esoteric nature of the filter isn't exaclty pushing it to the head of the "to-do" line...

sh0dan
6th April 2003, 22:46
No it actually let's you specify a start offset - isn't that what you're looking for.

Btw - you could just make the layered timecode longer than your source, and trim it before adding it with layer - same thing as offsetting the timecode.

DaveF71
6th April 2003, 23:53
Originally posted by sh0dan
No it actually let's you specify a start offset - isn't that what you're looking for.

Btw - you could just make the layered timecode longer than your source, and trim it before adding it with layer - same thing as offsetting the timecode.

Okay, just loaded it. Closer. It's got the offset function, but this one doesn't do actual SMPTE.

As for the offset layer idea, I'm a little fuzzy on how my trim command would be set up to provide a positive offset. Say I want a start time 01:00:00:00 and assuming 107892 frames in an hour at 29.97fps, what would my trim command be? I've been trying different trim values before the layer command, but it always produces the same default start value.

hanfrunz
5th March 2004, 00:38
Hello sh0dan,

do you think you could add an "offset"-option to showSMPTE() and showframenumber() in the near future, i could realy need it right now.

example:
showSMPTE(fps=25, offset=25*60*60*10) -> first frame 10:00:00:00

thanks
hanfrunz

stickboy
5th March 2004, 12:31
Originally posted by sh0dan
Btw - you could just make the layered timecode longer than your source, and trim it before adding it with layer - same thing as offsetting the timecode.Better yet, use a combination of BlankClip, AlignedSplice, and Trim. No layering necessary.

(Note: this isn't tested)
function ShowSMPTEWrapper(clip c, int "frameOffset")
{
frameOffset = Default(frameOffset, 0)

c = c.BlankClip(frameOffset) ++ c

# Why does ShowSMPTE require you to specify the framerate anyway?
# Can't it get the framerate from the clip's properties?
c = c.ShowSMPTE(c.FrameRate())

return c.Trim(frameOffset, 0)
}It should be trivial to write equivalent functions for ShowFrameNumber/Info.