VideoHelp Forum




+ Reply to Thread
Results 1 to 10 of 10
  1. Member
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    Hi

    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 what it should.

    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,10 0,"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
    Quote Quote  
  2. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Subtitle() doesn't support Unicode, ANSI only.

    Use Textsub instead of Subtitle :
    http://avisynth.org.ru/docs/english/externalfilters/vsfilter.htm
    Quote Quote  
  3. Member
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    Ok. So I gotta have an external file with the text ?

    I wanna use the text in conjuntion with the 'Animate()' function to make it zoom or scroll.

    How would I do that ?
    Quote Quote  
  4. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by spanky123
    Ok. So I gotta have an external file with the text ?
    Yes. It accepts several popular subtitle text formats.
    Use a subtitle editor like Subtitle Workshop to make your file.
    Some formats use frames, some time.

    Originally Posted by spanky123
    I wanna use the text in conjuntion with the 'Animate()' function to make it zoom or scroll. How would I do that ?
    I'd guess you can apply other filters after Textsub, but haven't done it myself.
    Make a new post on that if you have any problems.
    The Doom9 forum is the main place to discuss Avisynth coding.
    Quote Quote  
  5. Member
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    Ok. Thanks. I'm kinda familiar with Subtitle Workshop. So I've made some text/subs in there.
    When I playback with VobSub, it plays fine and uses the correct characters (I had to go into the VobSub settings and change the text settings from ANSI to the Language I want to use)

    However, using TextSub in the script plays back the subtitles/text in Kinda jibberish again:
    H???o
    Quote Quote  
  6. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    I've only used English subs, so I'm out of my depth.

    So I can only guess.
    But you should be using Unicode.

    The syntax is
    TextSub ("path\filename.ext" [, charset [, fps]])

    So have you set the "charset" parameter appropriately?

    And perhaps try SSA format rather than SRT. SSA has a much richer formatting and seems to be favoured by many non-English subbers.

    This looks interesting: http://members.shaw.ca/tragd/textsub_plugin_faq_by_morphinex.txt
    Lots of text effects you can do.
    Quote Quote  
  7. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    Yeah ssa supports scrolling, etc. so no need to use animate. The most powerful format supported by VSFilter would be Gabest's own ssf format though.
    Quote Quote  
  8. Member
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    Thanks for the help.

    The TextSub() with .ssa ain't working for me though

    In the avisynth script I've got this:
    TextSub("C:\video\text.ssa")
    I tried this too:
    TextSub("C:\video\text.ssa")[,Unicode[,25)

    I know I'm doing something stupid somewhere, but I don't get the syntax you posted before:
    TextSub ("path\filename.ext" [, charset [, fps]])


    What's charset ? Is that like 'unicode' or something ? Or the language I'm using ?
    The fps is 25.

    Could you please post an example. Sorry

    Attached is the .ssa aswell. I made it with Subtitle Workshop, then opened it in Wordpad, changed the text a bit and the font size. Then saved as .ssa selecting 'Unicode' in the Save Dialog Box
    http://www.yourfilehost.com/media.php?cat=other&file=1934text.ssa


    Thanks
    Quote Quote  
  9. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    I only do English subs myself, so I'm just going from the docs.

    However, in the notation
    TextSub ("path\filename.ext" [, charset [, fps]])
    the square brackets indicate an optional parameter.

    So, the simplest form is
    TextSub("C:\video\text.ssa")
    I expect the charset should default to Unicode. But if it doesn't, you may need to tell it the character set and fps
    Perhaps
    TextSub("C:\video\text.ssa", Unicode, 25)

    But I'm not really sure that "unicode" means "unicode" It may have a code number, for instance.

    And looking at your SSA file, I see:

    [V4 Styles]
    Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding
    Style: Default,Tahoma,100,16777215,16777215,16777215,1263 2256,-1,0,1,1,1,6,30,30,415,0,0


    Note you have defined "Encoding": as 0, which I think is ANSI.

    I'll experiment later to see if I can do better if no one else chips in.
    Quote Quote  
  10. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    charset would only matter for ANSI where you are using different encoding than default (can't remember if VSFilter goes by the system default or not). For unicode; the charset shouldn't matter. VSFilter should detect that it is unicode.
    Quote Quote  



Similar Threads

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