VideoHelp Forum
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    Hey everyone, TGIF

    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
    Quote Quote  
  2. 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
    Quote Quote  
  3. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    although manono pointed the way, I had already figured it out..but thanks just the same

    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
    Quote Quote  
  4. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    To split lines, you need to add the lsp parameter, as well as using \n. For example,

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



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!