Log in

View Full Version : Subtitle Conversion Help...


EpheMeroN
16th September 2005, 00:10
I have a .IDX & .SUB subtitle file that I need to convert so I can import it into MuxMan for authoring. I have 3 questions about this:

1) MuxMan requires the subs to be in either .SST or .SUP format. Is one better than the other in terms of quality?

2) Which tools can I use for this conversion?

3) The original video was 23.976fps. It was an XviD AVI that I re-encoded to an MPEG-2 DVD video. I ran DGPulldown on it to make it 29.970fps. Do I need to change the fps of the subs somehow as well?

Matthew
16th September 2005, 00:52
1) SUP will mux faster in MuxMan and is preferable IMO. The downside is that you may have to specify the palette in the project file. The palette is included in the idx, but needs to be converted from hexadecimal to decimal.

If you use sst, you shouldn't have any palette issues.

2) You can extract SUPs from sub/idx using D3s7's updated vsconv.exe (likely included with ScenAid). I use gabest's old vsconv.exe for sst. You can also use subresync or subrip for sst.

3) No, 23.976 is the (sort of) 'real' fps of the DVD. The rest is just padding (repeated video). The resolution of the sub/idx is the same (720x480) and the length is the same too.

EpheMeroN
16th September 2005, 03:49
SubResync worked for the .SUB to .SST conversion, but it saved 1 single .SST file and about 600 .BMP files. Is that normal? It ended up totalling 154mb. That didn't seem correct to me but I don't know much about this.

SubRip didn't work at all. It says it can open .SUB files, but it failed when I tried. It gave me the error "unrecognized format".

I did install ScenAid, and it did put a copy of vsconv.exe in its install dir, but the app is command-line driven. What are the proper commands for .SUB to .SUP conversion?

Matthew
16th September 2005, 05:10
The bitmaps are uncompressed and uncropped, so yeah that's correct.

With SubRip you need to open the idx, it does work. But you'll still end up with loads of bitmaps.

I suggest you stick with sup if you aren't doing NTSC<->PAL. This batch file will extract all the sups:

SET DIR=H:\test
SET NAME=whatever
SET STREAMNUM=0
:START
vsconv_dest.exe -f sup -i %DIR%\%NAME%.idx -o %DIR%\sub%STREAMNUM% -id %STREAMNUM%
IF %STREAMNUM% LSS 31 (SET /A STREAMNUM=%STREAMNUM%+1
GOTO START)

EpheMeroN
16th September 2005, 06:31
Thank you for making that batch, but I still need help with it. I really am clueless when it comes to hand-editing things. To simplify things, I put vsconv.exe, the sub.idx & sub.sub, and the sub.bat ALL in the same dir.

My batch ended up looking like this:
SET DIR=C:\SubTest
SET NAME=SubTest
SET STREAMNUM=0
:START
VSConv.exe -f sup -i C:\SubTest\sub.idx -o C:\SubTest\sub.sup%STREAMNUM% -id %STREAMNUM%
IF %STREAMNUM% LSS 31 (SET /A STREAMNUM=%STREAMNUM%+1
GOTO START)

That gave me this error: "Unrecognized conversion format"

Matthew
16th September 2005, 06:58
I get that message when using an old version of vsconv, I would have thought the one from ScenAid should be fine. Anyway, the version I'm using is here:

http://forum.doom9.org/attachment.php?attachmentid=4097

That doesn't give the error.

You should remove those subs, as they are copyrighted material and you're not supposed to post them :)

EpheMeroN
16th September 2005, 08:21
Ok, that worked. But why did it output 31 different .sup files? ..and only the first 2 of them actually have any filesize (around 2.3mb each). I don't know which of the 2 to use. Finally, if that batch works now, how come a simple vsconv -f sup -i sub.idx -o sub doesn't work if everything is in the same dir? I can't figure that out.

Btw, I removed the link. I completely forgot about subtitle legalities! Sorry.

Matthew
16th September 2005, 08:33
It should have outputted 32 files (0->31). That's one for each subtitle stream (DVD spec supports 32). Sometimes a sub/idx may be missing streams so 0 and 3 could be the only ones with content. Delete the 0 byte files.

You can check out the languages by loading the idx in notepad and looking for index: 0, index: 1, etc. Sometimes the subs will be the same except one will be widescreen and the other letterbox (slightly different positioning on screen), in such cases the widescreen subs will look just fine even in letterbox mode.

And that command may not work because of how the app is coded - a full path can be required for some apps.

EpheMeroN
16th September 2005, 09:27
--------------------------
# Language index in use
langidx: 0

# English
id: en, index: 0
--------------------------

So if there's only 1 single language in this subtitle file, I'll assume the 2 .sup files outputted by vsconv.exe were WS and LB versions, and since the .idx file states index 0 (and the movie is widescreen), I'll use that one.

I just noticed that the 2 outputted .sup files are different in filesize. Would this be normal if one was WS and the other LB? sup0.sup is 2.13mb, while sup1.sup is 2.17mb in size.

Abond
16th September 2005, 09:36
Hmm, there is small utility called sub2sup (search in videohelp.com tools) which converts idx/sub to sup...

Matthew
16th September 2005, 11:12
Abond's right, I used that tool the other day but promptly forgot about it ;o It's GUI and I wanted cli, but in this case it is probably more appropriate :)

There should be another subtitle listed in the idx. Look for index: 1, index: 2, etc.

EpheMeroN
17th September 2005, 03:59
I used SubToSup just now. It's really fast. Is that normal? It converted my subs to SUP format in about 2 seconds.

The outputted files were:
SubTitle-ID_en_0x20.sup
SubTitle-ID_es_0x21.sup

...and I'm still boggled as to why there's 2 subs files. I'm pretty certain in that IDX file I only saw 1 index listed. If it's my eyes please correct me where. Here's a small portion of the IDX file:
-------------------------------------------------------------------------
# VobSub index file, v7 (do not modify this line!)
#
# To repair desyncronization, you can insert gaps this way:
# (it usually happens after vob id changes)
#
# delay: [sign]hh:mm:ss:ms
#
# Where:
# [sign]: +, - (optional)
# hh: hours (0 <= hh)
# mm/ss: minutes/seconds (0 <= mm/ss <= 59)
# ms: milliseconds (0 <= ms <= 999)
#
# Note: You can't position a sub before the previous with a negative value.
#
# You can also modify timestamps or delete a few subs you don't like.
# Just make sure they stay in increasing order.


# Settings

# Original frame size
size: 720x480

# Origin, relative to the upper-left corner, can be overloaded by aligment
org: 0, 0

# Image scaling (hor,ver), origin is at the upper-left corner or at the alignment coord (x, y)
scale: 100%, 100%

# Alpha blending
alpha: 100%

# Smoothing for very blocky images (use OLD for no filtering)
smooth: OFF

# In millisecs
fadein/out: 50, 50

# Force subtitle placement relative to (org.x, org.y)
align: OFF at LEFT TOP

# For correcting non-progressive desync. (in millisecs or hh:mm:ss:ms)
# Note: Not effective in DirectVobSub, use "delay: ... " instead.
time offset: 0

# ON: displays only forced subtitles, OFF: shows everything
forced subs: OFF

# The original palette of the DVD
palette: 0000e1, 060606, eaeae8, e5ff16, 11eb10, ea12eb, 053d4e, be9039, 7c7c7c, e0e0e0, c43708, 077307, 5d2211, 2b8709, 433aaa, 730972

# Custom colors (transp idxs and the four colors)
custom colors: OFF, tridx: 1000, colors: e5ff16, e5ff16, 060606, e5ff16

# Language index in use
langidx: 0

# English
id: en, index: 0
# Decomment next line to activate alternative name in DirectVobSub / Windows Media Player 6.x
# alt: English
# Vob/Cell ID: 1, 2 (PTS: 35535)

Matthew
17th September 2005, 04:37
idx/sub->sup is like a demux so it should be fast.

The other language will be further down, after the listing of timecodes for the first stream.

Use notepad's find feature to search for "index: 1"

EpheMeroN
17th September 2005, 05:17
Aha! I did that. Index: 1 is Spanish subs :-)

SubTitle-ID_en_0x20.sup = Index: 0
SubTitle-ID_es_0x21.sup = Index: 1

That correct?

Matthew
17th September 2005, 05:32
Yeah that sounds right. Spanish=espanol=es :)


The only other thing is the palette:

palette: 0000e1, 060606, eaeae8, e5ff16, 11eb10, ea12eb, 053d4e, be9039, 7c7c7c, e0e0e0, c43708, 077307, 5d2211, 2b8709, 433aaa, 730972

These are colours 0-15, and can be placed in the MuxMan mxp in the palette section, if you get colour issues.

You need to convert from hex to decimal though, as MuxMan uses the latter.
This site may help:
http://www.ascii.cl/conversion.htm

EpheMeroN
17th September 2005, 05:43
I didn't even see that ES part of the name! That makes sense lol.

I'm gonna try a new author in MuxMan with these SUP subs as soon as the new encode finishes. I hope there's no color issues. That conversion and entering in the MuxMan profile file looks timely!

Thanks a ton you guys :D

EpheMeroN
24th September 2005, 03:57
The color palette did indeed end up being incorrect. The original subs are yellow with black border. After muxing in MuxMan, they're white with a thick bright red border. Is there an easier way to correct this?

Matthew
24th September 2005, 04:09
You can try a tool like SupRemap to get custom colours.

But the palette is right there in the idx if you want to convert it to decimal and pop it in the mxp.

EpheMeroN
24th September 2005, 05:18
I went to that conversion table website. It still didn't make a lot of sense to me. I wish it had a box and you could just enter the hexadecimal value and it would spit out the decimal value just like that. How do you read those tables? Do I have the proper parts of both files shown below? I want to ensure I am replacing the correct values from the .IDX into the proper place of the .MPX file.

PALETTE INFO FROM .IDX FILE:
--------------------------------------------------------------------------
# The original palette of the DVD
palette: 0000e1, 060606, eaeae8, e5ff16, 11eb10, ea12eb, 053d4e, be9039, 7c7c7c, e0e0e0, c43708, 077307, 5d2211, 2b8709, 433aaa, 730972
--------------------------------------------------------------------------



PALETTE INFO FROM .MPX FILE:
--------------------------------------------------------------------------
Section=Settings
{
Destination Folder=C:\Video\Infection DVD Files\DVD_VIDEO\VIDEO_TS
Item=Palette
{
Name=DefaultPalette
Color 0=0, 0, 255
Color 1=255, 0, 0
Color 2=0, 0, 0
Color 3=255, 255, 255
Color 4=0, 255, 0
Color 5=255, 0, 255
Color 6=255, 255, 0
Color 7=0, 125, 125
Color 8=125, 125, 125
Color 9=225, 225, 225
Color 10=125, 0, 0
Color 11=0, 125, 0
Color 12=0, 0, 125
Color 13=222, 0, 255
Color 14=222, 125, 0
Color 15=125, 0, 125
--------------------------------------------------------------------------

Matthew
24th September 2005, 05:42
I'm sure there is another site with automated conversion.

Anyway the conversion you are doing is Hex->Dec

e.g. the last line is:
73->115
09->9
72->114

So that line in the mxp should read
Color 15=115, 9, 114

EpheMeroN
24th September 2005, 06:42
Oh okay. It makes perfect sense now! But as a reference for others reading this, http://www.pocketnes.org/hexa.html has auto-conversion.

I am noticing now also, that the subs are displayed too far towards the middle of the screen, than the bottom. Not to mention when viewed on a monitor or 4:3 TV, they're not shown 1/2 on the black bars and 1/2 on the video like normally. Why is this? I picked both WIDE and LB in MuxMan.

Matthew
24th September 2005, 06:54
As an aside, wide and letterbox in MuxMan does not affect the positioning. Subtitles are overlayed after resizing so they will appear in the same area of the tv set regardless of the mode. Of course, the positioning relative to the 'action' will differ because the size of the black bars differs. This is why there are sometimes separate subtitles for wide mode and letterbox mode.

The SUP's positioning will be in line with that of the source. If the positioning is atypical, it's not you or MuxMan that have done anything wrong.

EpheMeroN
24th September 2005, 07:22
Good to know yet again :D

Are there any sub apps out there though that could override the default display location of the SUP subs?

Matthew
24th September 2005, 07:36
I've seen it mentioned that DVDFab will do this, but I've also seen it mentioned that the result is the subs tend not to display at all.

As you are authoring anyway, a surefire way to do this might be to say, rip from idx/sub to sst with subrip, and in the process change the positions (I think subrip allows this). Then load the ssts in MuxMan. Multiplexing will be much slower with ssts than sups though.