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 8th January 2007, 03:38   #1  |  Link
spanky123
Registered User
 
Join Date: Oct 2006
Posts: 98
Text in Avisynth

I posted elsewhere, but was told I should post here. So here goes:

I'm trying add text to a video with the avisynth script.

So far I been using Subtitle and it works fine when I want to insert English text.

However, now I want to insert foreign text (ie. Swedish, Greek, Russian)
but it just comes up looking something like 'G?ia ?a?' instead of say, Γεια σας

I have the languages needed installed in xp (Control Panel > Regional and Language Settings > Languages > Details and then added the ones I want) and can type no problems in the other languages in just about any other program besides notepad.

Atm I'm using:
Subtitle("text_in_foreign_language_here",0,50,1,100,"Arial",100,$FF0000)
And it doesn't work for me. With English text it works.

*Note that I have to type the text in an external program first that accepts the foreign fonts/languages and then copy it into notepad. Notepad doesn't show the fonts though. It's kinda just blank there and it prompts me to save as some 'unicode' thing or something if i want. What is this ?

Some help please.
If there is some other feature that let's you add foreign language text to your avisynth video, that's fine too

Thanks
spanky123 is offline   Reply With Quote
Old 8th January 2007, 03:50   #2  |  Link
Velocity 7
Registered User
 
Join Date: May 2003
Posts: 88
Are you subbing? Might I suggest using Aegisub instead and use TextSub to subtitle in the resulting file?
Velocity 7 is offline   Reply With Quote
Old 8th January 2007, 03:55   #3  |  Link
spanky123
Registered User
 
Join Date: Oct 2006
Posts: 98
All I want to do is add text like titles. Very short. . . maybe a couple words

I would use Subtitle() in the script, but I've now been told that it doesn't support unicode, so I am not able to use it with Foreign Characters.

I can make the subtitle files (.srt) using Subtitle Workshop, but it still plays back all jiberrish - still 'G?ia ?a?' instead of say, Γεια σας
spanky123 is offline   Reply With Quote
Old 8th January 2007, 06:27   #4  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
Subtitle() internally use the Windows GDI function int TextOut(HDC hdc, int x, int y, char *text, int len) so you are constrained to the current Code Page of the host application.

Note the code page of your text editor used to enter your .AVS script will need to match the code page for your video encoding app.

Someone did a Unicode text plugin some time ago, I searched for it but could not find it, maybe someone else remembers it.
IanB is offline   Reply With Quote
Old 8th January 2007, 12:40   #5  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
http://forum.doom9.org/showthread.php?t=102124
Fizick is offline   Reply With Quote
Old 9th January 2007, 15:58   #6  |  Link
spanky123
Registered User
 
Join Date: Oct 2006
Posts: 98
Quote:
Originally Posted by IanB View Post
Subtitle() internally use the Windows GDI function int TextOut(HDC hdc, int x, int y, char *text, int len) so you are constrained to the current Code Page of the host application.
Sorry. I got no idea what any of that means. Could you please explain

Quote:
Originally Posted by Fizick View Post
Yes. So far I can only do it using VSfilter.dll and TextSub()

How do I adjust say the height, position and animate (ie. scrol or zoom) the text though ? Can I use TextSub() with Animate() somehow or do I have to do all this in the .ssa file ?
spanky123 is offline   Reply With Quote
Old 9th January 2007, 19:46   #7  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
Quote:
Originally Posted by spanky123 View Post
Sorry. I got no idea what any of that means. Could you please explain
It means that the only way to use foreign characters is to change the language of your windows, in regional/language options, or there's some utility I forgot the name of that Microsoft offers. Extended characters will look different when you're using a different code page. But you can't use unicode at all in Subtitle() yet, without switching it to use an entirely new API.

Quote:
How do I adjust say the height, position and animate (ie. scrol or zoom) the text though ? Can I use TextSub() with Animate() somehow or do I have to do all this in the .ssa file ?
SSA for everything, although you can manipulate some of it in avisynth. Tools like AegisSub help, but they still aren't pick-up-and-go. SSA/ASS is rather complex since it was designed to be a full typesetting language.
foxyshadis is offline   Reply With Quote
Old 10th January 2007, 01:22   #8  |  Link
matrix
Registered User
 
Join Date: Jan 2002
Location: ..north of Great Lakes
Posts: 263
If you can put your text on a bitmap, it's easy to do it using overlay.
Write your text on a black bmp.
clip=avisource("your source")
text=imagereader("your pic.bmp", 0, 1, 29.97)
overlay(clip, text, x=0, y=0, mask=text)
Or if the text is a different color.
overlay(clip, text, x=0, y=0, mask=text.tweak(0.0,0.0))
And use trim to place it at the position you want.
__________________
Welcome....to the real world.
matrix is offline   Reply With Quote
Old 10th January 2007, 07:59   #9  |  Link
spanky123
Registered User
 
Join Date: Oct 2006
Posts: 98
Is there some sort of GUI for creating .ssa ?

Or anything that'll make it easier to make one. Atm it's looking like a night-mare.

Sub Station Alpha seems to be no longer updated.
I'm familiar with Subtitle Workshop but only with .srt - not familiar with animating and all the features of .ssa

Any suggestions ?

Last edited by spanky123; 10th January 2007 at 08:02.
spanky123 is offline   Reply With Quote
Old 10th January 2007, 08:09   #10  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
Whole forum dedicated to it: http://forum.doom9.org/forumdisplay.php?f=12

AegiSub is the only tool that's still updated on a regular basis, afaik.
foxyshadis is offline   Reply With Quote
Old 19th May 2008, 17:39   #11  |  Link
tacman1123
Registered User
 
Join Date: Jun 2007
Location: Washington, DC
Posts: 130
SubtitleEx handles the foreign characters better, at least some of them (I think at least UTF-8).

Tac
tacman1123 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 03:18.


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