Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 11th February 2007, 02:32   #1  |  Link
photoguy123
the batteram battery
 
Join Date: Nov 2005
Posts: 38
Any way to wrap text?

Is there any to add text to a video and have it autowrap to a given area?

This is pretty simple in a desktop app, but I can't seem to find it in SubTitle, SubTitleEx, or in searches I've done.

Thanks for any ideas...

pg
photoguy123 is offline   Reply With Quote
Old 11th February 2007, 09:11   #2  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,171
Sorry no autowrap.

From 2.5.7 SubTitle(..., lsp=0) will enable the manual multiline facility, i.e. by defining the lsp parameter. To cause text to wrap include "\n" in your text where you want a line break. lsp values other than 0 increase (+) or decrease (-) the line spacing in approx 12% (font dependant) of line height units.
IanB is offline   Reply With Quote
Old 11th February 2007, 19:46   #3  |  Link
photoguy123
the batteram battery
 
Join Date: Nov 2005
Posts: 38
Quote:
Originally Posted by IanB View Post
Sorry no autowrap.

From 2.5.7 SubTitle(..., lsp=0) will enable the manual multiline facility, i.e. by defining the lsp parameter. To cause text to wrap include "\n" in your text where you want a line break. lsp values other than 0 increase (+) or decrease (-) the line spacing in approx 12% (font dependant) of line height units.
That's unfortunate, but thanks your reply Ian.

I have found the simplest way to to create tiny title utility that saves out the frame as desired, then it can be manipulated in avisynth in anyway you like.

It's a bit of a hassle to have to run a separate app, but GDI+ text support is actually pretty powerful and with just a few lines of code does many more tricks.

Regards,
PG
photoguy123 is offline   Reply With Quote
Old 12th February 2007, 00:20   #4  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,413
Quote:
Originally Posted by IanB View Post
Sorry no autowrap.

From 2.5.7 SubTitle(..., lsp=0) will enable the manual multiline facility, i.e. by defining the lsp parameter. To cause text to wrap include "\n" in your text where you want a line break. lsp values other than 0 increase (+) or decrease (-) the line spacing in approx 12% (font dependant) of line height units.
Oh, so that's what does it. Here I thought I was just mistaken about thinking it had been included in the avisynth core.
__________________
There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order.
foxyshadis is offline   Reply With Quote
Old 12th February 2007, 23:46   #5  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,171
@foxyshadis, I really do try to not change the expected behaviour of Avisynth across versions. Generally to get access to a new feature you will have to explicitly script for it. Old scripts should continue to function as expected.
IanB is offline   Reply With Quote
Old 16th May 2019, 13:23   #6  |  Link
Dreamject
Registered User
 
Join Date: Dec 2018
Posts: 139
I searched for it but did not find, now you can use avs+ http://avisynth.nl/index.php/Internal_functions#LeftStr
to divide in 2 string string you need to use LeftStr, RightStr and StrLen(string)/2 or limit one part to some number

Str="AyeZabivЪуъСъука"
Length=StrLen(Str)
MaxStrWidth=Ceil(float(Length)/2)
wtf1=LeftStr(Str,MaxStrWidth)
wtf2=RightStr(Str,Length-MaxStrWidth)

then subtitle wtf1 and wtf2

Last edited by Dreamject; 16th May 2019 at 13:42.
Dreamject is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:30.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.