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 9th May 2007, 15:31   #1  |  Link
Foofaraw
Registered User
 
Join Date: Apr 2004
Posts: 126
Format of .style file? (VSFilter)

I'm u sing VisualSubSync which seems to use a custom vsfilter, and apparently I must create a ".style" file to change the look of subtitles. But it has proven almost impossible to find out what such a style file is made up of (and don't say search place, that doesn't help)

So anybody know what to add in such a file?
Foofaraw is offline   Reply With Quote
Old 9th May 2007, 22:59   #2  |  Link
smiller667
Registered User
 
Join Date: Oct 2001
Posts: 1,125
Sorry, but using the search would have led you to this thread (it did for me): http://forum.doom9.org/showthread.php?t=98681

In the subresync edit window, make your choices, apply them & subresync will write the style file for you.

Steve
smiller667 is offline   Reply With Quote
Old 10th May 2007, 03:42   #3  |  Link
Foofaraw
Registered User
 
Join Date: Apr 2004
Posts: 126
Quote:
Originally Posted by smiller667 View Post
Sorry, but using the search would have led you to this thread (it did for me): http://forum.doom9.org/showthread.php?t=98681
It did for me too - the thread just didn't help.

Quote:
Originally Posted by smiller667 View Post
In the subresync edit window, make your choices, apply them & subresync will write the style file for you.
I have no file called subresync.
Foofaraw is offline   Reply With Quote
Old 10th May 2007, 14:42   #4  |  Link
MBoufleur
Registered User
 
Join Date: Sep 2006
Location: Brazil
Posts: 23
Here is an example of the subrip style file:

Code:
ScriptType: v4.00+
PlayResX: 720
PlayResY: 480

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,HelveticaRounded LT Bold,28,&H00E6E6E6,&H000CEEF1,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,0,2,72,72,48,0
I use it sometimes because it makes subtitles similar to the ones I see on TV shows.
The subrip style format is actually a subset of the Substation Alpha subtitle format, and comes with a lot of parameters such as font type, size, color, attributes, safe area for subtitles, etc.

To use this, write down the code above changing the parameters you want to a text file and use
the same name as the original srt plus the ".style" extension at the end of the file.

Example:

spider.srt
spider.srt.style

If you have the VobSub 2.23 pack version, you can also create the style file using subresync.
Just Right click on the SRT file and choose "Edit with Subresync".
Select the apropriate FPS for the SRT file and a window pops with the subtitles.
Just doubleclick on any of the subtitles and the Subtitle Style Editor pops.

Make all the changes you want and press apply.
Then all you have to do is save the subtitle (with another name if you want to keep the original as backup), and voilá!
The new SRT file comes with the style file.

hope it helps
MBoufleur is offline   Reply With Quote
Old 10th May 2007, 20:35   #5  |  Link
smiller667
Registered User
 
Join Date: Oct 2001
Posts: 1,125
Quote:
Originally Posted by Foofaraw View Post
I have no file called subresync.
Although MBoufleur kindly gave you an answer: the linked thread did contain the info that subresync is contained in the vobsub package. Once you install vobsub, there will even be an icon in your start menu.

Steve
smiller667 is offline   Reply With Quote
Old 10th May 2007, 23:13   #6  |  Link
Foofaraw
Registered User
 
Join Date: Apr 2004
Posts: 126
Quote:
Originally Posted by MBoufleur View Post
hope it helps
Thank you most kindly MBoufleur for answering my question.
Foofaraw is offline   Reply With Quote
Old 10th May 2007, 23:15   #7  |  Link
Foofaraw
Registered User
 
Join Date: Apr 2004
Posts: 126
Quote:
Originally Posted by smiller667 View Post
Although MBoufleur kindly gave you an answer: the linked thread did contain the info that subresync is contained in the vobsub package.
Which I don't care about. I asked about the format of the file.

Quote:
Originally Posted by smiller667 View Post
Once you install vobsub, there will even be an icon in your start menu.
I'm not installing vobsub, I don't want that junk installed.

If you had read my message you'd see i said vss uses a custom vsfilter. I have not, and don't plan to install anything.
Foofaraw is offline   Reply With Quote
Old 24th September 2015, 10:29   #8  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
Sorry to resurrect this old thread, but I wonder if it is possible to overwrite the default style with a custom style, rather than having to create a style file for each SRT. Perhaps it is sufficient to copy a style file somewhere?

VSFilterMod and XY-VSFilter have introduced support for UTF character encoding, but I don't know the value to use in the last field of the style file. Someone knows the values for UTF-8 and UTF-16? (It is not possible to use Subresync to define them.)

Also, I wonder what is the usage of these two parameters:
PlayResX: 720
PlayResY: 480
Apparently, they define the resolution of the video. But why is it necessary to specify them? The player knows the resolution anyway.

Thanks!
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 24th September 2015, 11:39   #9  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Quote:
Originally Posted by r0lZ View Post
VSFilterMod and XY-VSFilter have introduced support for UTF character encoding, but I don't know the value to use in the last field of the style file. Someone knows the values for UTF-8 and UTF-16? (It is not possible to use Subresync to define them.)
Quote:
Encoding
Controls which codepage is used to map codepoints to glyphs; it has nothing to do with the actual text encoding of the script. This is only meaningful on Windows using VSFilter, where it is used to get some old (particularly Japanese) fonts without proper Unicode mappings to render properly. On other systems and renderers, Freetype2 provides the proper mappings. If you didn't understand a word of the above, pretend this setting doesn't exist, as it is rarely important.
http://docs.aegisub.org/3.2/Styles/
If in doubt I'd simply do what Aegisub does: create UTF-8 with BOM and set encoding according to subtitle language (see drop-down list in Aegisub).

Quote:
Originally Posted by r0lZ View Post
Also, I wonder what is the usage of these two parameters:
PlayResX: 720
PlayResY: 480
Apparently, they define the resolution of the video. But why is it necessary to specify them? The player knows the resolution anyway.
The player, but not necessarily the subtitle editor. Or maybe you mux the script into videos of different resolutions and want the subtitle positioning to be preserved. I wouldn't think too hard about the sense behind ASS "specs". Just set them to video resolution and move on.
sneaker_ger is offline   Reply With Quote
Old 24th September 2015, 12:35   #10  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 705
Quote:
Originally Posted by r0lZ View Post
VSFilterMod and XY-VSFilter have introduced support for UTF character encoding, but I don't know the value to use in the last field of the style file. Someone knows the values for UTF-8 and UTF-16? (It is not possible to use Subresync to define them.)
A whole container ASS is saved in the specified encoding. There isn't such thing, that one verse has UTF-8 and second UTF-16. Encoding container ASS save eg. in a text editor. Then in muxer we use the specified encoding.
The same can be found contenery ASS for multi-languages. The players can't read.:!:
Encoding. This specifies the font character set or encoding and on multi-lingual Windows installations it provides access to characters used in multiple than one languages. It is usually 0 (zero) for English (Western, ANSI) Windows.
It is dead function.
Quote:
Originally Posted by r0lZ View Post
Also, I wonder what is the usage of these two parameters:
PlayResX: 720
PlayResY: 480
Apparently, they define the resolution of the video. But why is it necessary to specify them? The player knows the resolution anyway.
What's so strange about that? We are using, for ex. editor Sony Vegas. There, each layer has a specific resolution size in the preview that you can change. If you change, fonts will be stretched, smaller or larger.

Last edited by Jamaika; 24th September 2015 at 13:00.
Jamaika is offline   Reply With Quote
Old 24th September 2015, 13:45   #11  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
Thanks for the replies. I guess I haven't explained what I need correctly. I don't use ASS files. Only SRT files. (I know, that's stupid, but 99.99% of the time, you download a SRT file. I have never seen an ASS file in my life!) Anyway, my question about the encoding concerns the SRT file, and I don't know what is the "script" you are referring to. I forgot also to explain that I use VSFilter as an avisynth plugin. Perhaps that matters. My native language is French, and therefore most of the time there are accented characters in the SRT files. If I use a text editor to convert the SRT to ANSI, there is no problem and the file is rendered properly (with TextSub()), without any need for a style file. But if I leave it in UTF-8 format, TextSub() cannot render properly the accented characters. Obviously, by default, TextSub doesn't work as expected with UTF-8 SRT files.

I know what encoding means. But afaik, UTF-8 is a (relatively recent) encoding that can handle much more glyphes than what the "classic" encoding (or codepage) were able to do, because it encodes the non-standard characters on 2 bytes instead of 1, and the limit of a maximum of 256 characters (including the control chars) doesn't apply any more. And therefore there is normally no need to specify the language (or codepage). (UTF-16 can handle even more glyphes but it should not be necessary for French characters.) Am I right?

So, I reformulate my question. How can I obtain the correct rendering of the French accented characters in an UTF-8 file with VSFilterMod/XY's TextSub() avisynth function? Do I need to create a style file, and if it's the case, what should I specify?

Note that my UTF-8 SRT files do not have the BOM characters. Could it be the reason?

Thanks for the precision about the PlayRes parameters. It's what I suspected.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 24th September 2015, 14:08   #12  |  Link
MBoufleur
Registered User
 
Join Date: Sep 2006
Location: Brazil
Posts: 23
Encoding has nothing to do with style. You only use the style file for SRT content in order to choose font, position, size, etc.

I believe that if you really need to use UTF-8 for SRT files, the applications that load the SRT should be able to support that.

Edit: Oh, and forgot to mention: not all applications that support SRT files also support the SRT.Style files as well. When you add the complexity of encoding the files in an unusual cope page such as UTF-8, you narrow further the list of possible solutions that could work.

Last edited by MBoufleur; 24th September 2015 at 14:15.
MBoufleur is offline   Reply With Quote
Old 24th September 2015, 14:10   #13  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
OK, problem solved. Apparently, VSFilter is unable to recognise the UTF-8 file when it has not the BOM. IMO, it's a little bug, because there are other methods to recognise an UTF-8 file and the BOM is never mandatory. Most programs do not need the BOM to handle the UTF-8 format correctly. And it should not be the responsibility of the user to convert its UTS-8 SRT file w/o BOM to UTF-8 with BOM. Most users do not know that it's necessary and do not know how to do that conversion. (I have had to use an Hex editor!)

But the solution exists. At least, I understand now why my previous attempts did not work as expected. Thanks for the BOM pointer, guys!
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 24th September 2015, 14:14   #14  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
Quote:
Originally Posted by MBoufleur View Post
Encoding has nothing to do with style. You only use the style file for SRT content in order to choose font, position, size, etc.
But there IS an encoding parameter in the style file. I still don't understand why it is not possible to specify UTF-8 in that file. That will solve the issue of the missing BOM.

Quote:
Originally Posted by MBoufleur View Post
I believe that if you really need to use UTF-8 for SRT files, the applications that load the SRT should be able to support that.
The application is VSFilter itself. It doesn't support UTF-8 well, because it requires the presence of the BOM. Pity, but as I wrote in my previous post, the solution is to add the BOM manually.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ 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 14:27.


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