IsaacZ 发表于 2020-8-27 01:08:13

SupViewer【SUP字幕预览及更改调色板颜色】

SupViewer is a simple small program to show SUP subtitle files on either a checkered background or a (selectable) graphic.
It also allows you to change the colors of the palette and save the new palette as a dvdauthor compatible palette file.
Within the SUP file you may change the mapping of subtitle colors to the colors of the palette and also change the opacity/transparency of individual subtitles or for the whole SUP file. The changed SUP file can then be saved with a new filename.

SupViewer是一个简单的小程序,可以将SUP字幕文件显示在方格背景或(可选)图形背景上。它还允许您更改调色板的颜色,并将新调色板保存为一个dvdauthor兼容的调色板文件。在SUP文件中,你可以改变字幕颜色到调色板的颜色的映射,也可以改变个别字幕或整个SUP文件的不透明度。修改后的SUP文件可以用一个新的文件名保存。

The functionality is pretty much like SupRemap or the SUP manipulation tools inside SubtitleCreator, but SupViewer supports variable opacities (or transparencies).
它的功能很像SupRemap 或者 SubtitleCreator中的SUP操作工具,但是SupViewer支持可变的透明度。



The program requires GDI+, which is already included in Windows XP, for other Windows versions the necessary DLL may be downloaded from Microsoft.

该程序需要GDI+,它已经包含在Windows XP中,对于其他Windows版本,必要的DLL可以从微软下载。



I have tested SUP files from projectx and vobedit.
我测试了来自projectx和vobedit的SUP文件。

A palette may be loaded from an IFO file or a dvdauthor compatible palette file, otherwise a default palette is used.
You can save the palette (if changed in SupViewer) again as dvdauthor compatible palette file.
调色板可以从IFO文件或dvdauthor兼容的调色板文件中加载,否则使用默认的调色板。您可以将调色板(如果在SupViewer中更改)再次保存为dvdauthor兼容的调色板文件。
The new version ofSupViewer (0.2) can 'combine' two SUP files to create one 'two language' SUP file which can be used for 'language learning' purposes (usually one language is shown as normal subtitle and the other as 'toptitle'). There are some limitations for this functionality, see below.
新版本的SupViewer(0.2)可以“合并”两个SUP文件,创建一个“两种语言”的SUP文件,用于“语言学习”的目的(通常一种语言显示为正常的字幕,另一种显示为“toptitle”)。这个功能有一些限制,请参阅下面。
Download:(97kB; GDI+ and VB Runtime necessary))

Screenie:


As you can see on the screenie, the semitransparent color1 is correctly shown. If you change the color mapping or the opacity of the currently shown subtitle the result can be seen immediately in the preview. To save the current mapping / opacity, click on 'Set for actual'. To use the same mappings / opacities for all subtitles in the SUP file, click on 'Set for all'. With the 'Save' button right next to the open button you may save the changed SUP file on your hard disk.

正如你在上面截图上看到的,半透明的颜色1显示正确。如果你改变当前字幕的颜色映射或不透明度,结果可以立即在预览中看到。要保存当前的映射/不透明度,点击'Set for actual'“设置为实际”。要对SUP文件中的所有字幕使用相同的映射/不透明度,请单击'Set for all'“设置为所有”。用打开按钮(open)旁边的“保存”(Save)按钮,您可以将更改的SUP文件保存在硬盘上。

If you would like to see the subtitles on a more 'real' background, select a graphics file (like a screenie of the movie - supported formats are BMP/GIF/JPG/PNG) and switch to 'Graph. File' in the background frame:
如果你想在更“真实”的背景上看到字幕,选择一个图形文件(比如电影的屏幕,支持的格式是BMP/GIF/JPG/PNG),然后切换到background 框里的 'Graph. File':




Then the preview uses the chosen graphics as background:
然后预览就会使用选择的图形作为背景:


Combining SUP files:
Some soft players (like PowerDVD, mplayer...) can show a secondary subtitle stream i.e. to show subtitles in two different languages. Unfortunately this is not possible on a normal stand alone 'hardware' DVD player. But if some conditions are fulfilled, you can create a new (additional) subtitle stream which includes the subtitles from two different languages. During my tests these problems occurred:
1. The subtitles in different languages differ in both number and timing
2. The colors do not fit
合并SUP文件:一些软播放器(如PowerDVD, mplayer…)可以显示二级字幕流,即以两种不同语言显示字幕。可惜在单独的“硬件”DVD播放器上不可能实现。但是如果满足了某些条件,则可以创建一个新的(附加的)字幕流,其中包括来自两种不同语言的字幕。在我的测试中出现了这些问题:1. 不同语言的字幕在数量和时间上都不同2. 颜色不合适
解决方案:
For the first problem, a general solution is to use the subtitle stream with the higher number of subtitles as 'leading' (first stream) and the subtitle stream with less subtitles as secondary. In this case the SupViewer algorithm will start with the timing informations from the first subtitle stream and search for a 'fitting' subtitle in the secondary stream by optimizing for maximum overlapping. Usually this approach gives reasonable results.

For the second problem I don't have a solution... If the first subtitle stream uses 'Color1' as transparent background and 'Color2' for the visible text and the secondary subtitle stream uses 'Color1' as visible text and 'Color2' as transparent background, this doesn't work. Fortunately most subtitle stream use 'Color1' as transparent background...

Another problem (which is connected but 'solvable') are multicolor subtitle streams: Subtitle 1 uses palette colors 0, 2, 4, 6 and the next subtitle uses palette colors 0, 1, 3, 5. This is not possible with the current algorithm for combining SUP files (simply to much work to check if the number of used colors within one combined subtitle is always smaller or equal to 4). If you have such subtitle streams (quite often for DVB or 'teletext' based streams), you have to reduce the colors. This can be done for each SUP file separately with SupViewer by using the 'Set for all' button with a given combination of colors and opacities and saving each SUP file with a new name.

If the conditions are fulfilled, the 'procedure' is very simple:
(Remark: If you are working with NTSC material, set the 'Size' to 720x480 as 'Step 0').
1. Load the first SUP file with the 'Open' icon right next to 'Sup File:' (you may also load a palette, this is not necessary, but useful to check the 'combined' subtitles in the preview window).
2. Load the secondary SUP file with the 'Open' icon in the '2nd' frame
3. Set up the Y-Offset for the secondary stream (default= -400 pixel)
3a Check some 'combined' subtitles with the Next/Prev buttons.
4. Save the 'combined' SUP file with the 'Save' icon in the '2nd' frame with a new name.



Some additional remarks:
- If a secondary SUP file is loaded, all other 'change' buttons (colors, opacities...) are disabled
- The 'new' SUP file isn't 'optimized'. Always the maximum allowed area: X,Y=0,2 to 720,574 (or X,Y=0,2 to 720,478) is used.

The new SUP file can be used with all authoring programs which support subtitles in the SUP format (ifoedit, MuxMan, GfD...)

Have fun,
Borax




skycharlene 发表于 2020-8-27 09:56:52

这个不错。试一下。

cw1190 发表于 2020-8-27 20:27:08

本帖最后由 cw1190 于 2020-8-27 20:28 编辑

厉害,学习了
页: [1]
查看完整版本: SupViewer【SUP字幕预览及更改调色板颜色】