INDEX  F.A.Q.  SEARCH  LATEST POSTS     Rules  Register  Profile  Private messages  Login


Login:   Username:  Password:   Log me on automatically    
Register I forgot my password I forgot my username Resend the activation key

Overlay text at various positions via avisynth subtitle() function ?

Forum Index -> Video -> Editing Printer-friendly version
Reply to topic
Author Message
vhelp
..Semi Neutral..


Joined: 31 Mar 2001
Location: New York

Post Posted: Jul 10, 2009 20:36 Posts Comp View users profile Send private message Reply with quote

Hey everyone, TGIF wave.gif

The purpose of this request is for testing and reviewing Digital Picture Frames (DPF) and their:

1. Photo and Video features
2. But these DPF's do not aid to your advantage by letting you know what Photo or Video is currently used. So, the only other way around this is to overlay a subtitle (text) onto the photo/image/video. I can prob create a quick n dirty tool for the picture aspects, but for video would best be served via scripting..which leads to my questions..

In avisynth scripting, using the subtitl() function, is there any way to freely move the text anywhere inside the image or it is hard-coded to always display at the top ? I might want to put some text and the top, and some at the bottom, etc.

Currently, this is what I use in my text overlay routine:

scriptClip( """ subtitle("TV: LAVERNE AND SHIRLEY " + string(current_frame) + " - " + string(framecount))""")

Also: change size; and font; etc.

What I would like to do is lable-ize some of my xvid and h264 encoded videos with one or more lines of text.
And, I'd like add in the addtion, if tv series for instance, or codec used, or param string used in video encode, etc.

..or do you have to write your own subtitler plugin ?

Thanks..

-vhelp 5156
_________________

VHELP's - Sample Clips [last: 12.29.06],
my YouTube videos


manono
Member


Joined: 28 Aug 2003

Post Posted: Jul 10, 2009 20:58 Posts View users profile Send private message Reply with quote

You can do whatever you like - change the position, font, size, color, length of time on the video, etc. All it takes is a quick stop at AviSynth.org and there's no need for this thread at all:

http://avisynth.org/mediawiki/Subtitle


vhelp
..Semi Neutral..


Joined: 31 Mar 2001
Location: New York

Post Posted: Jul 10, 2009 21:22 Posts Comp View users profile Send private message Reply with quote

although manono pointed the way, I had already figured it out..but thanks just the same smile.gif

Here's what I used, in case others get stuck in this area:

scriptClip( """ subtitle("TV: LAVERNE AND SHIRLEY " + string(current_frame) + " - " + string(framecount), align=8,8,8 )""")

the align=x has 9 options, and they basically position the text

TOP: left, center, right
CENTER: left, center, right
BOTTOM: left, center, right

the other params, [ie, 8,8] (I was balancing within 8 pixels) are used for row/column position with the align=x scopy.

Unfortunately, I could not figure out how to split text (as in word-wrap) to the next line--even tried \%n etc, to no avail.
I guess I'll have to suffer the trial n error of calculating the pixels from the above param [ie, 8,8] and add based on font size and/or other aspect.

EDIT: I don't need the % char, that's what was causing me the trouble in wrapping text to next line.
its suppose to be, \n

-vhelp 5157
_________________

VHELP's - Sample Clips [last: 12.29.06],
my YouTube videos


Gavino
Member


Joined: 10 Jul 2009
Location: Spain

Post Posted: Jul 11, 2009 03:29 Posts Comp View users profile Send private message Reply with quote

To split lines, you need to add the lsp parameter, as well as using \n. For example,

Subtitle("First line\nSecond line", lsp=0)


Reply to topic All times are GMT - 6 Hours
Forum Index -> Video -> Editing Page 1 of 1





You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Jump to:  
Display:   
DVDFab DVD to DVD and Blu-ray to Blu-ray offers a 20% discount until Nov 22, 2009. More info or download trial!
About   Advertise   Forum Archive   RSS Feeds   Statistics