PDA

View Full Version : Japanese subtitles in SSA?


AchtungAffen
11th June 2003, 03:00
Hi, I was working on an SSA script wich I wanted to hardsub via virtualdub into an avi, when I found the following problem.

I was doing the karaoke part and decided to put not only the lyrics of this anime opening in romaji but also in japanese, but I found that Substation alpha can handle only ANSI but not Unicode, wich is required for the japanese characters to stay in the text file. But worst! I found the subtitle filter I'm using (subtitler 4.2 or something) in virtualdub (AC3) also can't handle unicode!!

So, what should I do to perform this? Do I need to use another program wich isn't Substation alpha and the subtitler filter? Isn't there any other chance?

BTW: Since this is my first post and couldn't find any info like this on these forums or on the net (perhaps I don't know how to search for it), I'll ask 3 more questions:
1.- How can I do more effects in substation alpha, like fades?
2.- How do I use the 'code' tag in substation alpha? What does it do?
3.- What is 'Advanced Substation Alpha'? Where can I get it?

Thx!

Schultz
11th June 2003, 03:18
I don't know much about the Program Substation Alpha but i do know that you can use textsub from the vobsub package at http://www.gabest.org/ And use Either SubResync to edit your subs or Gabest has integrated subResync into MPC which you can get at http://www.sf.net/projects/guliverkli which allows you to work with the subs while the video is playing.. and they all support Unicode if you are on Win2k/Xp

AchtungAffen
11th June 2003, 03:31
Ok, then I'll use those progs to work with unicode (still, I can do that with notepad too! I have win2k). But tell me, wich filters do I need then to add the subs with virtualdub, if the subtitler filter I use can't deal with unicode?

Schultz
11th June 2003, 11:35
The TextSub filter in the VobSub package at www.gabest.org will add the Subtitles into VirtualDub you will see it after you install the VobSub package.. Also it comes with docs on Advanced SSA for the new commands etc. in the docs dir of the install.

AchtungAffen
11th June 2003, 20:09
Oh great! I just downloaded the full vobsub package. I'll let you know when I try it out. Thanks a lot!

TexBill
11th June 2003, 22:48
in order to enter japanese text in an ssa script, you have to enter it in Shift-JIS and select the correct font encoding.
ex: {\fe128}だ。。。大丈夫?

hope this help
Tex Bill

AchtungAffen
12th June 2003, 00:45
Is it always {\fe128}? I'm really not sure how to work with this Japanese IME. How do I know if I'm using Shift-jis or EUC?

Ghim
12th June 2003, 10:59
You can try JWPce (http://www.physics.ucla.edu/~grosenth/jwpce.html) to edit/copy/past your japanese text...
It's really easy to use and you can easily select your output format when you copy text and then paste it in SSA...
{\fe128} is used to tell SSA to use Japanese Subset Font. So IMHO, it's always {\fe128}.

Liisachan
12th June 2003, 15:10
Originally posted by AchtungAffen
Hi, I was working on an SSA script wich I wanted to hardsub via virtualdub into an avi, when I found the following problem.

I was doing the karaoke part and decided to put not only the lyrics of this anime opening in romaji but also in japanese, but I found that Substation alpha can handle only ANSI but not Unicode, wich is required for the japanese characters to stay in the text file. But worst! I found the subtitle filter I'm using (subtitler 4.2 or something) in virtualdub (AC3) also can't handle unicode!!

So, what should I do to perform this? Do I need to use another program wich isn't Substation alpha and the subtitler filter? Isn't there any other chance?

BTW: Since this is my first post and couldn't find any info like this on these forums or on the net (perhaps I don't know how to search for it), I'll ask 3 more questions:
1.- How can I do more effects in substation alpha, like fades?
2.- How do I use the 'code' tag in substation alpha? What does it do?
3.- What is 'Advanced Substation Alpha'? Where can I get it?

Thx!

textsub filter which comes with VobSub can handle Unicode.
You can just type everything in UTF-16 with BOM in SSA
OR-type it in Shift_JIS and use {\fe128}--but in this way
you cannot use, say Friench and Japanese at the same time.
So, if you want to use Shift_JIS , you may want to make 2 SSAs,
one for French and the other for Japanese in the above example, and use a subbing filter doubly.

As for Karaoke, I would time with romaji then edit SSA with a plain editor so I can change Romaji into Kanji, because SubStationAlpha is likely to destroy Double-byte chars, (Mojibake) ^^;

oh BTW: you could even use "RUBY" in Karaoke kanji...


1 test something like {\fad(300,200)}
2/3 read doc in the folder "Gabest"

esby
14th June 2003, 00:59
Of course you can find a way to do japanese subtitle with textsub,
but i'm more wondering about the point in doing that,
because unless you are able to read japanese fluently,
the karaoke 'in jap' in the text is just candy for the eyes
And will add no more...
(I'm thinking to the typical exemple of fansubbing group putting kanji/romaji and western letters...)
Of course, if you are japanese and feel to do a true karaoke,
that's another story... :)
esby

PS: of course if you are aware of this, disregard what i said...

Liisachan
14th June 2003, 02:24
Originally posted by esby
Of course you can find a way to do japanese subtitle with textsub,
but i'm more wondering about the point in doing that,
because unless you are able to read japanese fluently,
the karaoke 'in jap' in the text is just candy for the eyes
And will add no more...
Yes. I know how you feel... Not only Karaoke...Most (not all) fansub translators don't know Japanese things so well, and mistranslate at least 2 or 3 lines par each ep, which sometimes makes me sad.

Regardless, what's wrong with having "eye candies"?

(I'm thinking to the typical exemple of fansubbing group putting kanji/romaji and western letters...)
Of course, if you are japanese and feel to do a true karaoke,
that's another story... :)
My 1st language is japanese, but I dont usually put Karaoke in Japanese, only in Romaji. Maybe, those who do _not_ know Japanese are likely to feel Japanese letters to be somthing wonderful. for me, it s nothing but boring, daily things. :)

...anyways, the original question was technical: "Is it possible to use JA in SSA?" this is a good question to ask, right?
and the answer is YES: not only Japanese, but Korean, Polish, Hungarian... whichever, as mentioned in previous replies by a few ppl.

multisub note in 8 languages (http://ld-anime.faireal.net/guide/matroska)

AchtungAffen
14th June 2003, 17:33
Yes, it's a total eye-candy. But also can perform several other functions.

For example, I've been studying japanese for over 2 years. Although I still don't know enough as to handle myself completely without any help, like subs, one help the eye-candy rendered me was in memorizing kanjis. I've learnt up to 500 of them, still I remember less than 50. But with eye candy I can excercise (because I'm still not ready for newspapers or books...couldn't find many beginners books also).

And sometimes, it lets you know if they translated the song right, or at least if the romaji is done right.

Nyways, its just something nice to see, and also means you put more effort in the fansub process, and perhaps a little o' love too.

unmei
16th June 2003, 07:06
lo
@lisa-chan : the "multisub note in 8 languages" is wonderful :D
i think i need to talk to you once about UTF8 and USF (need help :)
where can i reach you ?


back on topic:
USF might be interesting for you guys. "unicode" and layout possibilities. Sadly you cannot currently import it into matroska but it will be a matroska native subtitle format makeing your subs look like ASS and soft subbed at the same time.

Liisachan
16th June 2003, 08:12
Well, of course Matroska will be nice in itself,
but since Karaoke is CPU-intensive, hard-subbing has its forte too,
and hence, AVI and/or OGM are still usable (and more stable atm)
anyhow, Japanese in SSA is possible, and the windows code page for Japanese is Shift_JIS, not EUC-JP nor ISO.
Though, probably using Unicode (UTF-16) will be the safest.

Originally posted by unmei
lo
@lisa-chan : the "multisub note in 8 languages" is wonderful :D
i think i need to talk to you once about UTF8 and USF (need help :)
where can i reach you ?


umm i m no expert^^; that note is multilingual just because my friends in various language areas kindly translated it. if you need help on USF, how about visiting USF - Universal Subtitle Format (http://corecodec.com/modules.php?op=modload&name=PNphpBB2&file=viewforum&f=12) ? There are quite a few experts there. (I sometimes make a post there too, but not so often. )

unmei
16th June 2003, 13:13
hmm yeah,
thing is this place is rather dead and all the people there i can reach directly on #matroska channel - except you (why aren't you there?? :), and ChristianHJW told me you were sure a reference when it comes to japanese with subs (jap. as the interesting special case for the general "need MBCS":)

UTF-16 ? AFAIK USF is only UTF-8 and nothing else, therefore i have to deal with those freaking "is it one or two byte for this char?"

i would already be glad if you could put the release (i'm going to commit soon) thru a intensive test
(i have asian support and some sort of IME, but im not convinced this makes my comp behave like a vanilla asian comp :s)

Liisachan
17th June 2003, 01:16
Originally posted by unmei
all the people there i can reach directly on #matroska channel - except you (why aren't you there?? :)
I was in that chan once or twice, and I'm going to be there again when I have time. But I am not a real developer, I am just a subber and that's why i m interested in new subbing possibilities--S_TEXT/UTF8, USF, etc.

UTF-16 ? AFAIK USF is only UTF-8 and nothing else, therefore i have to deal with those freaking "is it one or two byte for this char?"
AchtungAffen asked about SSA, not USF.
And I answered "You can just type everything in UTF-16 with BOM in SSA" etc. I was not talking about USF.
IMO, to make multilingual subs in SSA, UTF-16 LE BOM is the safest encoding to use. btw: UTF-8 is not one-or-two byte... it s 3-byte chars especially for Japanese.

i would already be glad if you could put the release (i'm going to commit soon) thru a intensive test
(i have asian support and some sort of IME, but im not convinced this makes my comp behave like a vanilla asian comp :s)
Excuse me, but what do you mean "the release"? As for USF...I once made a feedback, Explanation for Arabic Fix for USFV100_sample.usf (http://www.faireal.net/matroska/usf-arabic-fix)
I had also made Unicode Hebrew Click Keyboard (http://www.faireal.net/matroska/unicode/hebrew) and Unicode Thaana Click Keyboard (http://www.faireal.net/matroska/unicode/thaana) to test R-to-L languages in USF. But these are too off-topic here. I hope we can talk in a proper place, like USF - Universal Subtitle Format (http://corecodec.com/modules.php?op=modload&name=PNphpBB2&file=viewforum&f=12) .

Needless to say, I'd like to see Japanese subs correctly (as that is my first language) and I m going to help anyone with subbing in Japanese, as long as I have time, like in this thread. Thank you.:)

unmei
18th June 2003, 06:33
-i'm sorry i misunderstood you concerning the UTF-16, i was probably reading from bottom to top or something :)
-"The release" i was talking about is my own program and therefore i didn't realize no-one would know what i'm talking about as my head is truely stuffed ith it atm.
-kay, this really off topic - i'll try to remember the address of the usf forum ;)

Rasqual
20th June 2003, 01:26
Originally posted by Liisachan
oh BTW: you could even use "RUBY" in Karaoke kanji...
oh really? is it a manual method or some kind of technique (double filter, etc.), or is it using a built-in filter?

Liisachan
20th June 2003, 02:13
Originally posted by Rasqual
oh really? is it a manual method or some kind of technique (double filter, etc.), or is it using a built-in filter?
In SSA, it s manual and physical

Dialogue: Marked=0,0:00:00.52,0:00:07.53,Kanji,,0000,0000,0000,Karaoke,{\K20}FOO{\K23}BAR{\K25}BAZ{\K25}QUX{\K0}
Dialogue: Marked=0,0:00:00.52,0:00:07.53,Ruby,,0000,0000,0000,Karaoke,{\K93} {\fs20}{\pos(370,570)}{\K74}ruby{\K19}

* The line for Ruby Base is a common karaoke line. The line for Ruby texts is fontset by using \fs (for smaller fontsize) and \pos (physical positioning)

I hope USF, which is XML, will support RUBY structurally, like in XHTML 1.1 or CSS3
It'd be cool if you could write in this way :cool:

<karaoke><k t="2000"/>
FOO BAR <ruby><rb>BAZ</rb><rt>baz</rt></ruby> QUX QUUX!
</karaoke>


RUBY-structure is not only for Karaoke but more general.
For more information, could you check this memo (http://corecodec.com/modules.php?op=modload&name=PNphpBB2&file=viewtopic&p=1843&highlight=#1843)?
If you can read Japanese, there's a small guide for rubied Karaoke in SSA (http://www.faireal.net/articles/7/08/#d30301a) in my site.

ChristianHJW
20th June 2003, 23:01
Originally posted by unmei
-"The release" i was talking about is my own program and therefore i didn't realize no-one would know what i'm talking about as my head is truely stuffed ith it atm.

unmei,

lets test the tool inside the matroska team first and then start a new thread about it here in this forum if we feel it could be presented to public ... just my 2 cents, its your tool and you're the boss ... ;) ...

EDIT :

Liisachan, i am very sad you dont find the time to join us in our channel more often, there was much better behaviour there usually if a real Lady like you was present ;) ...

Rasqual
21st June 2003, 20:14
Liisachan, I read your contribution at the cc forums and with my little knowledge of Japanese, skimmed through your article on ruby ssa.

Originally posted by Liisachan
I hope USF, which is XML, will support RUBY structurally, like in XHTML 1.1 or CSS3
It'd be cool if you could write in this way :cool:

<karaoke><k t="2000"/>
FOO BAR <ruby><rb>BAZ</rb><rt>baz</rt></ruby> QUX QUUX!
</karaoke>



For the sake of "eye-candies" fans, I hope so too. This way, the steps of
defining the ruby text positioning/alignment (relative, not absolute)
setting the overhang type (instead of the {\k0}\h technique) - as defined in JIS specs?
defining the rt font size/style
could be defered to the subtitle processor and make the sub script less confusing.
Regarding your sample above, it would be good also if we had the possibility to highlite the kanji completely while the furigana stops in the middle (by inserting <k />s into the <rt>?)

I have another question, will it be possible to write text vertically with usf?

It's getting off-topic, bah.

unmei
22nd June 2003, 20:38
vertically, like this :

<text>
s<br/>o<br/>m<br/>e<br/><br/>t<br/>e<br/>x<br/>t
</text>

or like this:

<text rotate-z="90">
some text
</text>

? (both supported, altho the first is sort of pain to write :)

@ChrisHJW: you're sorta right..

Liisachan
23rd June 2003, 00:11
Originally posted by Rasqual
For the sake of "eye-candies" fans, I hope so too.
NO, ruby is not just a candy for eyes, but a part of Japanese writing systems, and used commonly in daily life too (like in mangas , books etc). There should be "serious" requests for ruby in the ja area.

Plus, as MediaPlayerClassic parses USF using msxml.dll, <ruby> might be already working in USF (unofficially)

I have another question, will it be possible to write text vertically with usf?
maybe in "USF Level 3" ^^;(if you know CSS3) MSIE6 can do this already and MPC uses the same DLL for USF

Originally posted by unmei
vertically, like this :
That is not structural, just physical and superficial.
Top-to-Bottom direction should be much more complicated in essense than you might expect. Just think about "text-justify" In case you didn't read it yet, please read UAX9The Bidirectional Algorithm (http://www.unicode.org/reports/tr9/tr9-11.html) before thinking about "tb-lr" which will make it multidirectional. multidi will be even more complicated than bidi, and might require much more new ControlChars like &amp;lrm; etc.
(check http://www.w3.org/TR/css3-text/#TextLayout tho)

Maybe we should go on this topic, if needed, in that USF forum, because, even tho this is something to do with the first post "Japaense subs in SSA," it s getting off-topic...

AchtungAffen
23rd June 2003, 18:16
Ruby? What's ruby?

about the vertical text, does that apply to subtitle filters also?

kaitsuburi
25th June 2003, 21:37
@Liisachan

I am trying to hardsub a vertical line of (completely static) Japanese text in .ssa, top-bottom with (naturally) vertical glyph orientation.

How could this be achieved? The way I usually hardsub is grab timings in SSAlpha then fill in the Japanese text in SubResync (I hate that clipping thing in SSAlpha), manually adjust formatting in Notepad and save to Unicode in the end. Would it be possible to do vertical text using timings from SSA?

TIA. And please excuse my ignorance :o

-kaitsuburi

Liisachan
25th June 2003, 23:26
Originally posted by kaitsuburi
@Liisachan

I am trying to hardsub a vertical line of (completely static) Japanese text in .ssa, top-bottom with (naturally) vertical glyph orientation.

How could this be achieved?

I'm not sure if it is the best way, but do you like this idea?
(Note that Alignment = 7 in SSA, or {\an9} in ASS)

Style: vertical subs,Mikachan-PB,40,16777215,0,0,0, 0,0,1, 1,1,7, 20,20,20,0,128

Dialogue: Marked=0,0:00:00.70,0:00:03.11,vertical subs,,0000,0000,0000,,##\N##\N##\N@@\N\N##\N##\N##\N##\N##

Where ## = Kanji, Kana; @@ = Kuten or Touten: they are double-byte in Shift_JIS (Encoding=128), or you can use UTF-16 (recommended)

If you dont want to put \n tags manually, you may want to write a small Perl script or something for that...:)

demo clips:
http://ld-anime.faireal.net/tmp/vertical-subs

kaitsuburi
26th June 2003, 00:19
Wow, you rock!! Stack one glyph opon the other; it's brilliant!

Thank you! :cool:

-kaitsuburi

AchtungAffen
12th September 2003, 01:54
Sorry to bring back the dead, but I found myself with one more question.

If I edit my ssa file with subresync, when I save it as Ass, will it update the styles, or will it mixup the style parameters, because as I've been seeing, the style parameters change from ssa to ass.

Thanks.

Liisachan
27th January 2004, 18:11
Let me humbly update this old thread for those who might be interested, as I now know that there's another method to make vertical subs for japanese, which may be easier in some cases:

The idea is, to use an @-marked font, such as "@MS UI Gothic" "@Arial Unicode MS" etc. Glyphs in those fonts are displayed in a rectangular direction (90 degrees different from other "normal" fonts) probably for vertical Japanese writing.

So something like this will work:

Style: Default,@Mikachan-PB,30,&H00ffff,0,0,&H333333,-1,0,1,1,1,5,30,30,30,0,128

[Events]
Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: Marked=0,0:00:00.00,0:00:10.00,*Default,,0000,0000,0000,,{\pos(610,30)\frz270}Here goes the 1st line...
Dialogue: Marked=0,0:00:00.00,0:00:10.00,*Default,,0000,0000,0000,,{\pos(560,30)\frz270}and here 2nd...

Check "method 2" in this page (http://ld-anime.faireal.net/tmp/vertical-subs) for a real sample with pic
I didnt know this method before... A japanese subber gave me this tip like 30 miniutes ago.

@AchtungAffen Yes, SSA should be converted into ASS without any problems.

AchtungAffen
28th January 2004, 14:19
One last question... where can I get a font like that one? I mean a japanese font wich looks more like hand-written (at least more than the fonts windows has)??

Liisachan
28th January 2004, 14:39
mikachan-PB
http://mikachan.sourceforge.jp/win.html <-- sourceforge :)
(author's page http://mikachan-font.com/ )

TheLittleBirdFont
http://www.vector.co.jp/soft/dl/data/writing/se269670.html
(author's page http://www5d.biglobe.ne.jp/~konpeito/kotori/ )

aqua_pfont
http://aquablue.milkcafe.to/fnt/dl.htm#win
(author's page http://aquablue.milkcafe.to/ )

AchtungAffen
28th January 2004, 16:24
Thanks a lot!!!:)

Rasqual
6th February 2004, 03:37
Using the @ variant... Geez, it was simple as that.. <.<;
Well, good job.

Liisachan
6th February 2004, 04:48
Yeah, but @-font + {\pos} + {\frz} technique is a hack, after all, and not modern... The way to go is a modern, structural, more simple and flexible way as in CSS3 ;)
http://www.w3.org/TR/css3-text/#TextLayout
Check this example --> http://www.w3.org/TR/css3-text/#writing-mode

Plus, any advanced subtitlers for Japanese will need RUBY too!

SOOOooo GO! USF team!

Rasqual
6th February 2004, 15:58
As for people say, 'You want your cake and eat it too!'
It's not too bad you can add vertical text in Ass without too much of a hack, is it?

Well, I hope USF guys are thinking about this...

Sylf
6th February 2004, 18:06
Oooo, I haven't seen the CSS3 before. Now, that looks very promising, and if USF can handle CSS3, that may make the textpositioning in subs much easier than now. Indeed, that would be much more elegant than @font hack...

* influenced by faireal *

Liisachan
10th February 2004, 22:03
@Rasqual Yes, @font+frz+...are practically OK, tho not very elegant.
You must type {\frz} and {\pos} -- they are ASS(Advanced SSA) tags -- for eaah line, again and again, which is a pain in the a*s (sorry, a bad pan ) But obviously less painful than typing a lot of \N

@Sylf CSS3-like function is not just sophisticated, but realistically practical, RUBY support will be great for Japanese, and better support for BiDi should be good news for subbers subbing in Arabic/Hebrew etc

USF should be able to do something that SSA/ASS cannot. Otherwise, most subbers wont be motivated to migrate to USF, even tho sub data in XML is theoretically ideal.

BTW, that @-font technique is not my invention; like i said, a japanese subber gave me that tip. so thanks should go to him/her :)

Sylf
19th February 2004, 03:58
And while on this topic, you don't have to use {\frz} for every single line, if you use full ASS spec : You can specify the frz value within the [V4+ Styles] section : use the "Angle". You still need position, so the hackish style still remains.

[V4+ Styles]
Style: letter,@MS Gothic,100,&H00191919&,&H00000000&,&H00000000&,&H00000000&,0,0,0,0,100,100,0,-90,0,0.3,0,2,30,30,30,0

Liisachan
19th February 2004, 07:23
Originally posted by Sylf
And while on this topic, you don't have to use {\frz} for every single line, if you use full ASS spec : You can specify the frz value within the [V4+ Styles] section : use the "Angle". You still need position, so the hackish style still remains.

[V4+ Styles]
Style: letter,@MS Gothic,100,&H00191919&,&H00000000&,&H00000000&,&H00000000&,0,0,0,0,100,100,0,-90,0,0.3,0,2,30,30,30,0
VERY cool idea :) ii kangae