PDA

View Full Version : Which 4 colors are used by a subtitle stream - and how to change?


marsoupilami
24th March 2006, 17:08
Hi there!

To clarify the question - that's what i like to do:

I have 2 subtitle streams from 2 different editions of the same DVD (in different languages) and one self generated - and i would like to combine all of them them into one DVD.

The problem is:
1.) the subtitle stream generated by DVDSupEncode uses Colors 0,1,2,3
2.) the subtitle stream extracted with VobSub and Sub2Sup from the first DVD uses a color set which i don't know (How can i determine which?)
3.) the stream extracted from the second DVD uses definitely a different color set.

How can i determine which color index is used for what purpose?
How can i change the used color in an existing *.sup stream?

Many thanks for your answers!
Any suggestions welcome!

jeanl
24th March 2006, 18:01
marsoupilami, subtitles use 4 colors that are taken from the Color Lookup Table (CLUT), which is itself located in the IFO. You have 1 CLUT per PGC, and you can look at it using PgcEdit (double click on any PGC and the new dialog will show you the CLUT - among other things). This would be 1 way to find out which colors were used in the originals.
Because all 3 streams use different colors, you'll have to change them so stream 0 uses colors 0,1,2,3, stream 1 uses 4,5,6,7 etc. You can do that easily with DVDSubEdit.
Then, you'll need to create the CLUT on your target DVD so all 3 sets of 4 colors are present in the new CLUT. If you have the originals, it's easy to see what these colors are (DVDSubEdit for example tells you which index is used for each pixel, and PGCEdit tells you which colors correspond to each index). Simply make sure colors 0,1,2,3 in the CLUT correspond to the original colors in the first stream, 4,5,6,7 correspond to the original colors in the second stream etc... PgcEdit is the tool of choice for this.

In short, a combination of PgcEdit and DVDSubEdit should solve your problem. I'm sure other tools will allow you to do the same thing though...

Jeanl

marsoupilami
24th March 2006, 19:08
Wow! Many thanks!

I'll try it soon - it seems to be much more comfortable than hacking around inside the tables with IfoEdit ...

Thank's again!

jeanl
24th March 2006, 19:26
Some of the stuff needs to be done in the IFOs (the CLUT stuff) but some of it need to be done in the VOB or the SUP files (changing the color indexes for each pixel type), and IFOEdit (or PGCEdit) can't do that for you.
Jeanl

CoNS
24th March 2006, 20:51
I think SupRemap by Gandalf is currently the only all-in-one freeware tool for this purpose. You can find it on the AfterDawn page. It's a nice, small tool, but unfortunately it's not supported anymore by the author.

Maybe one day it will be possible to change the IFO CLUT colours in DVDSubEdit, so that it can all be done in this nice tool, too? (not "only" reasign the colours in the CLUT, but also change some of the colours in the CLUT and save it again)

EDIT: DVDSubEdit v1.3 has now been released, and in the new version you can pick new colours from the standard Windows palette. DVDSubEdit can remap or change the colours in both VOB files in connection with a DVD, and SUP files. See further down in this thread for details...

Also, I forgot to mention that SubtitleCreator's "Manipulate SUP" tool is capable of remapping the colours in SUP files, just like SupRemap.

jeanl
25th March 2006, 09:02
Maybe one day it will be possible to change the IFO CLUT colours in DVDSubEdit, so that it can all be done in this nice tool, too? (not "only" reasign the colours in the CLUT, but also change some of the colours in the CLUT and save it again)
I'm working on it! :)
jeanl

zion302
28th March 2006, 04:44
I'm working on it! :)
jeanl

will it be capable of doing the same for .idx/.sub file? :thanks:

jeanl
28th March 2006, 08:16
no, just vobs and .sup... Sorry...
jeanl

marsoupilami
28th March 2006, 14:29
@jeanl & @CoNS
Thanks again to both of You...

To remap the colors inside the VOBs i didn't manage - but at least with editing the SUPs i saved the work to OCR and reencode.

...sorry about my bad english :(

zion302
3rd April 2006, 12:16
have made a small program which is able to:
1/ merge two idx/sub files into one which contains all subtitle steams.
2/ detect palette mapped by each subtitle steam before merging, so that original palette is reserved and REMAPPED in merged subtitle file, which means all subtitle streams will be displayed exactly the same colors as it before.

will try to convert the code to Delphi. currently just used VBA for trial. Now it works fine for me.

cheers...

castellanos
3rd April 2006, 12:41
Hi there:.
I red the whole thread and I'd like to ask something:
All the times I make my backups I change the subtitle colors (generally yellow letters, grey antialias and black outline), not allways (on comercila DVDs) the colors are 0, 1, 2, and 4; and to change them (IfoEdit) I have to gess where the colors are.
Can somebody tell me how to change the colors in a faster way... PGCEdt, may be?
If PGCEdit is a better choice, how to do it?
Thanks in advance! :)

CoNS
3rd April 2006, 13:20
castellanos, the best application for this is DVDSubEdit. With this app you're able to see which four colours of the 16 colours in the CLUT are used for the subtitles.

Also, with DVDSubEdit you're able to see how the change of colours affect the subtitles right away.

jeanl recently released v1.3 of DVDSubEdit where you can not only remap the colours (i.e. re-assign which four colours are used from the CLUT), but also change the colours in the CLUT by picking new colours from the standard Windows colour palette.

castellanos
3rd April 2006, 13:42
Thanks CoNS!
That was a good one! :cool:

CoNS
3rd April 2006, 16:02
Yeah it's a great app indeed! :)

About remapping colours:

AFAIK DVDSubEdit is the only tool that lets you remap the subtitle colours directly inside the VOB files. You can also use it for remapping subtitle colours in SUP files, just like in SupRemap and SubtitleCreator.

To remap the colours in DVDSubEdit, simply click one of the four colours in the "Subpic Color/Transparency" section in the main window. This brings up a window with the 16 CLUT colours. Choose another colour and click "OK".

The remapping feature changes the colours in the current subpic only. If you want to apply the remapping changes to all (selected) subpics, use the "Apply last modifications to all" function in the Edit menu.

About changing colours in the CLUT:

You can easily do this with PgcEdit and SupRemap, too. And with IfoEdit. However, the cool thing about DVDSubEdit is that you can immediately see the changes in the subtitle preview in the app.

To change a colour in the CLUT in DVDSubEdit, click one of the four colours in the "Subpic Color/Transparency" section in the main window. This brings up a window with the 16 CLUT colours. Shift-click on a colour to bring up the standard Windows colour selection window and pick a new colour. Click "OK" twice and you're done!

Please notice that changing a CLUT colour will affect all the subpics immediately (or at least all subpics that use the current CLUT. However, in most cases the same CLUT is used throughout the loaded VOBs).

A couple of tips & tricks:

When changing subtitle colours, you often need to change the anti-aliasing colour, too (if anti-aliasing is used in the subtitles). It can sometimes be hard to see the anti-aliasing pixels in the shrinked subpics in the preview area in DVDSubEdit. Check the "Show bitmap zoom" option (or hit CTRL+D) to see the subtitles in 1:1.

Also, due to the default dark background colour in the preview area when the "Show Video Frame" option is disabled, it can often be difficult to see the black outline of the subtitles. It may help to change the default video background colour in the Preferences window (File -> Preferences) to a different colour.

castellanos
3rd April 2006, 16:57
Thanks CoNS!!
That was another good one!
:goodpost: