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 > General > Subtitles

Reply
 
Thread Tools Search this Thread Display Modes
Old 8th March 2006, 09:49   #1  |  Link
Liisachan
李姗倩 Lǐ Shān Qiàn
 
Liisachan's Avatar
 
Join Date: Nov 2002
Posts: 1,340
Gabest's new textsub formats: SSF 1.0 & ASS2 (SSA 4.00++)

I've just found that recent MPC (Media Player Classic) supports Sub Station Alpha v4.00++, an extended format of the Advanced SSA, which itself is an extended format of SSA 4.00.

I don't think this is well known yet, so I'll post a quick (unofficial) memo here to share the info, espeically with softsubbers, multisubbers. I'd like to hear from someone who knows more.

Sub Station Alpha v4.00++ Script Format

General: For MPC, keywords are not case-sensitive.

Script Type: Use v4.00++

The Style section header is [v4++ Styles] and there are 2 addional style params:

SSA/SSA+ has MarginL, MarginR, MarginV, whereas SSA++ has MarginL, MarginR, MarginT, MarginB. Test these new params by setting different MarginTop/Bottom and applying {\an*}

Yet another param is after Encoding, which controls "RelativeTo". I'm not very sure but in my tests, if RelativeTo=0, the result is relative-to-screen (traditional MPC coordinates), and if RelativeTo=1 (or non-zero), the result is relative-to-frame (VSFilter coordinates). 2 coordinate systems are switchable just like in the USF format. (You might want to put Editors Notes in the letterbox while signs logos etc should be absolutely positioned, so... RelativeTo params are useful.)

Each event (Dialogue) under the Events section has MarginL/R/T/B too. Test these new fields by giving them non-default values and using {\an*}

So a sample script looks like:


ScriptType: v4.00++
PlayResX: ...
PlayResY: ...

[V4++ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginT, MarginB, Encoding, RelativeTo
Style: RelToScreen,Verdana,40,&H00ffffff,&H0000ffff,&H00000000,&H00000000,0,0,0,0,100,100,0,0.00,1,2,3,2,20,20,20,0,0,0
Style: RelToFrame,Verdana,40,&H00ffffff,&H0000ffff,&H00000000,&H00000000,0,0,0,0,100,100,0,0.00,1,2,3,2,20,20,20,0,0,1

[Events]
Format: Layer, Start, End, Style, Actor, MarginL, MarginR, MarginT, MarginB, Effect, Text
Dialogue: 0,0:00:01.00,0:00:06.00,RelToScreen,,0000,0000,0000,0000,,Relative to Screen
Dialogue: 1,0:00:01.00,0:00:06.00,RelToFrame,,0000,0000,0000,0000,,Relative to Frame


Observe that the 2 styles share the same params except RelativeTo, and the result in MPC (when letterboxed in the full-screen mode) is as you expect.



As of writing this, VSFilter can't handle the RelativeTo, which is maybe natural because VSFilter doesn't know if the video is fullscreened or not, to begin with.

Last edited by Liisachan; 23rd March 2006 at 10:34.
Liisachan is offline   Reply With Quote
Old 8th March 2006, 10:22   #2  |  Link
Liisachan
李姗倩 Lǐ Shān Qiàn
 
Liisachan's Avatar
 
Join Date: Nov 2002
Posts: 1,340
From MP4Splitter.cpp

Code:
mt.majortype = MEDIATYPE_Subtitle;
mt.subtype = MEDIASUBTYPE_ASS2;
mt.formattype = FORMAT_SubtitleInfo;
CStringA hdr;
hdr.Format(
	"[Script Info]\n"
	"ScriptType: v4.00++\n"
	"ScaledBorderAndShadow: yes\n"
	"PlayResX: %d\n"
	"PlayResY: %d\n"
	"[V4++ Styles]\n"
	"Style: Text,Arial,12,&H00ffffff,&H0000ffff,&H00000000,&H80000000,0,0,0,0,100,100,0,0.00,3,0,0,2,0,0,0,0,1,1\n",
	m_framesize.cx, 
	m_framesize.cy);

Last edited by Liisachan; 8th March 2006 at 11:42.
Liisachan is offline   Reply With Quote
Old 9th March 2006, 20:23   #3  |  Link
ArchMageZeratuL
Aegisub developer
 
ArchMageZeratuL's Avatar
 
Join Date: Nov 2005
Posts: 15
Yes, RaistlinMajere mentioned that to me a few days ago... I don't know if Gabest reads this, but there are two new override tags that I would LOVE to see:

\rect(x1,y2,x2,y2,x3,y3,x4,y4): Defines the coordinates of the bounding rectangle of the subtitle line, allowing you to deform it in any way you see fit. This is especially useful for isometric rotation.

\vc(c1,c2,c3,c4): Sets the color of each vertex, so that the colors are gauruad interpolated through the bounding box, and multiplied by each pixel. In essence, it behaves exactly like doing a glColor before drawing each vertex, if it were OpenGL direct mode.

Haali has also suggested something that would be really interesting, which would be to define a spline "baseline", and have the line follow it, though that would most likely be very difficult to implement.

Also, maybe \friz, \frix, \friy, so you can individually rotate each letter by the specified amount. So you could e.g. {\frz90\frzi-90} to do vertical text.
ArchMageZeratuL is offline   Reply With Quote
Old 10th March 2006, 13:07   #4  |  Link
lamer_de
Member
 
lamer_de's Avatar
 
Join Date: Dec 2001
Location: somewhere far beyond
Posts: 270
Where can I find the ++ specifications, or are the 2 tags liisachan mentioned all (Apparently not, see AMZs post)?

Who makes those specifications? Gabest? Avery Lee?

CU,
lamer_de
lamer_de is offline   Reply With Quote
Old 10th March 2006, 14:05   #5  |  Link
Liisachan
李姗倩 Lǐ Shān Qiàn
 
Liisachan's Avatar
 
Join Date: Nov 2002
Posts: 1,340
No official specs, only source code. The above memo is unofficial, written by guessing. But ASS2 samples already work with MPC. You can even mux it into MKV (but not into DSM), altho ASS2 in MKV is working just accidentally, without official support (mkvinfo thinks it is A_TEXT/SSA not /ASS). So... I think basically I'm guessing right.

Apparently Gabest added SSA ver.6 (ASS2) when MPC got a new checkbox "Position subtitles relative to the video frame" around November 2005. At the same time, one new tag {\kt} was introduced, which I didn't know about either.
ASS2 specs are not official, i.e. not yet finalized, so we could say ASS2 is still under construction, hence wish list...
I would say "millisec timing resolution" (a small wish isnt it?) or, more ideally, timing by frame number (maybe unrealistic).

ASS2 is not ASS with new tags, but a new file format. So far there are no new tags that only work in ASS2.

The difference between ASS and ASS2 is relatively small, but not backword compatible. Among other things, the sub text to be shown in a "Dialogue" line is after the 10th comma in ASS2, and after the 9th comma in SSA/ASS.
Liisachan is offline   Reply With Quote
Old 15th March 2006, 04:41   #6  |  Link
Liisachan
李姗倩 Lǐ Shān Qiàn
 
Liisachan's Avatar
 
Join Date: Nov 2002
Posts: 1,340
Quote:
Originally Posted by Liisachan
I'm not very sure but in my tests, if RelativeTo=0, the result is relative-to-screen (traditional MPC coordinates), and if RelativeTo=1 (or non-zero), the result is relative-to-frame (VSFilter coordinates).
It's like this in Gabest's code, STS.h:

Code:
int relativeTo; // 0: window, 1: video, 2: undefined (~window)
Liisachan is offline   Reply With Quote
Old 22nd March 2006, 18:14   #7  |  Link
Liisachan
李姗倩 Lǐ Shān Qiàn
 
Liisachan's Avatar
 
Join Date: Nov 2002
Posts: 1,340
Gabest's

Structured Subtitle Format (SSF) 1.0 Specs
http://svn.sourceforge.net/viewcvs.c...?view=annotate
Liisachan is offline   Reply With Quote
Old 28th March 2006, 07:54   #8  |  Link
Liisachan
李姗倩 Lǐ Shān Qiàn
 
Liisachan's Avatar
 
Join Date: Nov 2002
Posts: 1,340
Now mplayerc2006.03.28.2kxp can play external SSF files.
Altho SSF spec is getting deeper and deeper, here's a very simple SSF sample file for testing.
ssf_test.avi + ssf_test.1.ssf
Liisachan is offline   Reply With Quote
Old 28th March 2006, 19:59   #9  |  Link
ac-chan123
Registered User
 
Join Date: Jan 2004
Posts: 219
i can't find any new or spcial on this format. Why dos he not use a allready format like USF and extend them.
ac-chan123 is offline   Reply With Quote
Old 28th March 2006, 20:52   #10  |  Link
Liisachan
李姗倩 Lǐ Shān Qiàn
 
Liisachan's Avatar
 
Join Date: Nov 2002
Posts: 1,340
It's a bit like USF yes. SSF is growing now, and the result is anyone's guess. It already has some features that are near-impossible as SSA/ASS tho. A few random examples are: shadow blur, shadow angle, primary and secondary direction
Liisachan is offline   Reply With Quote
Old 2nd April 2006, 14:05   #11  |  Link
ArchMageZeratuL
Aegisub developer
 
ArchMageZeratuL's Avatar
 
Join Date: Nov 2005
Posts: 15
Just a small note, I have started a thread about the different subtitle formats on AnimeSuki a few days ago... you might be interested in seeing the fansubber's opinion on SSF and whatnot: http://forums.animesuki.com/showthread.php?t=30416

I suppose that it is somewhat expected that most of them seem to abhor the idea - they are not very fond of change, and I'm not sure if SSF is a very good one. Its extra features might not be worthy the cumbersome syntax
ArchMageZeratuL is offline   Reply With Quote
Old 2nd April 2006, 16:22   #12  |  Link
Liisachan
李姗倩 Lǐ Shān Qiàn
 
Liisachan's Avatar
 
Join Date: Nov 2002
Posts: 1,340
change? Um, no one is asking you nor forcing you to change anything... I myself didn't say Id migrate to this format.

Let's be rational. Just because ttxt/usf/ssf/dsm/rv/theora/dirac/snow/tta/wavpack/etc are totally useless for you doesn't mean you have a reason to abhor them or to suggest that Gabest should not develop/support them.

Like 3 or 4 years ago, I was told no fansubbers would go for softsub (because they dont want raws to be 'stolen') when we made lazy man's guide to ogm. No fansubbers were going to use mkv nor they even knew the name when we made mewmew-vorbis-ssa.mkv. On the other hand, mcf was a would-be new format that we were very interested in when softsubbing in ogm, but mcf was not successful after all.

Anyway, I think that an unmet need that is most important is not a new feature for Win but full ssa/ass support (or something similar) on Linux.
Liisachan is offline   Reply With Quote
Old 2nd April 2006, 22:11   #13  |  Link
ArchMageZeratuL
Aegisub developer
 
ArchMageZeratuL's Avatar
 
Join Date: Nov 2005
Posts: 15
Quote:
Originally Posted by Liisachan
change? Um, no one is asking you nor forcing you to change anything... I myself didn't say Id migrate to this format.

Let's be rational. Just because ttxt/usf/ssf/dsm/rv/theora/dirac/snow/tta/wavpack/etc are totally useless for you doesn't mean you have a reason to abhor them or to suggest that Gabest should not develop/support them.
I never implied that, at least, I never meant to.

Quote:
Originally Posted by Liisachan
Anyway, I think that an unmet need that is most important is not a new feature for Win but full ssa/ass support (or something similar) on Linux.
Indeed. To the best of my knowledge, there are two active projects that might go somewhere, libssa and ASA... not counting the dozens of attempts that became vaporware. I hope that one of them will be finished soon...
ArchMageZeratuL is offline   Reply With Quote
Old 9th April 2006, 00:59   #14  |  Link
Liisachan
李姗倩 Lǐ Shān Qiàn
 
Liisachan's Avatar
 
Join Date: Nov 2002
Posts: 1,340
Border And Shadow (BAS) in Softsubs for 200% Video Size

SSA (Default)


SSA (ScaledBorderAndShadow: Yes)


ASS (default): BAS is not scaled by default


ASS (ScaledBorderAndShadow: Yes)


SSF [rev.578]: BAS is scaled
Liisachan is offline   Reply With Quote
Old 13th April 2006, 14:36   #15  |  Link
Liisachan
李姗倩 Lǐ Shān Qiàn
 
Liisachan's Avatar
 
Join Date: Nov 2002
Posts: 1,340


Rev 581 "path"
Code:
	@ {
		[{placement.path: "0 0 0 240 320 240 320 0"; placement.align: bottomcenter;}]  Hello! Hello! Hello! Hello! Hello! :P
	};
Quote:
Originally Posted by Gabest
it could be even animated like the rest of the properties, ifthe number of points is the same in the destination style
Liisachan is offline   Reply With Quote
Old 14th April 2006, 16:05   #16  |  Link
Liisachan
李姗倩 Lǐ Shān Qiàn
 
Liisachan's Avatar
 
Join Date: Nov 2002
Posts: 1,340
ssf's path animation is working now

SSF_MixPath.avi 74KB
SSF_MixPath.ssf 1KB

Click to enlarge

Liisachan is offline   Reply With Quote
Old 14th April 2006, 20:00   #17  |  Link
unmei
frying subs
 
unmei's Avatar
 
Join Date: Jan 2003
Location: ch-2500
Posts: 891
Kudos to Gabest

(and thanks Liisa for keeping us updated on SSF)
__________________
-nyo
unmei is offline   Reply With Quote
Old 22nd April 2006, 02:15   #18  |  Link
bmfrosty
Registered User
 
Join Date: Apr 2006
Posts: 1
I spent some time chatting with the libssa people. They seem to be making some progress. I'll try to get a look at their code a bit later to see how they're designing internally. Hopefully they do something that is fairly extensible.
bmfrosty 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 19:09.


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