Log in

View Full Version : New SVCD subtitle multiplexer


new_age
18th April 2002, 22:28
Hello!

Here is the ChangeLog and the ReadMe for the new version.

ChangeLog:
----------

0.2.0.2
~~~~~~~

New functions:

+ New application icon


Fixed bugs:

+ Small GUI bugs
+ in some cases MPEG Analyse didn't recognize subtitles


0.2.0.1
~~~~~~~

New functions:

+ On "SVCD Info & Time to FileSize" tab the analyse function now gives you information
about subtitles in mpeg file (SVCD, CVD)


Fixed bugs:

+ Small GUI bugfixes


0.2.0.0
~~~~~~~

New functions:

+ multiplex all subtitle-streams in one step and also a command line
extension for it (see README for more info)

+ new tab: SVCD Info & Time to FileSize
gives you some information about a SVCD file and you can estime the
cutting point in movie time for any SVCD file size

+ write debug console to file (log file, see README for more info)


Fixed bugs:

+ Win9xMe incompatibilities (sometimes on NT/2000/XP not enough memory)

+ corrupted video/audio frames
when playing SVCD without the muxed CVD subtitles (changed to a non used
subtitle stream of turn off subtitles) some frames were corrupted sometimes
even the playback was freezed

+ overlapping subtitle problem (subtitle end-time = next subtitle start-time)
solved by decreasing subtitle end-time with 0.01 sec

+ D2V preview bug with NTSC movies
showed video frame was not the actual movie-time's video frame

+ vob2sub generated bmps have bad bitmap header and WinSubMux loaded these
files corrupted

+ TMPGEnc encoded mpeg files and mpeg files with RIFF header (CDXA) now works fine

+ small GUI bugfixes


0.1.0.1
~~~~~~~

First public release.


----------------------------------------------------------------------

ReadMe:
-------

WinSubMux 0.2.0.2
by New Age
May 21st, 2002

Please _READ_ this file before sending me any questions!

WinSubMux@mailbox.hu

This program is freeware. Use at your own risk.

Source code is NOT available.


Benefits
~~~~~~~~

* it has a GUI however it can be started with command line parameters (WinXP Themes support!)

* multiplex all streams in one step

* it is fast!
(on a Celeron 900, 512MB ram, with very old Quantum HDDs it takes about
a) 3-4 minutes to multiplex a 800MB MPEG2 file if the input and output
mpeg files are on the same HDD
b) it is less than a minute to multiplex a 800MB MPEG2 file if the
input and output files are on two different HDDs)

* a lot of fixed bugs of SUBMUX, eg.:
'underline problem':
a lot of subtitles appear on screen underlined
'disappearing subtitles':
if the subtitle image was too small sometimes it doesn't appear on screen
'corrupted audio/video frames:'
playing sub-multiplexed files without subs -> some frames were corrupted

* preview subtitles after load

* SVCD(MPEG2) preview on Preview Tab trough D2V (DVD2AVI Project File) file format
[MPEG2DEC.DLL is needed!]

* easily timeshift subtitles on preview tab (align subtitle time to movie frame)

* subtitle bitmap palette modification

* can handle large subtitle images

* save SUB file and/or bitmaps

* SVCD file-scan: get some information about your mpeg file (subs, audio, video)


Command line parameters
~~~~~~~~~~~~~~~~~~~~~~~

The program can be started from command line (batch file) with these parameters:

WinSubMux.exe [-v <level>] [-l <logfile>] <in.mpg> [ subtitle options ] <first_script.sub> <out.mpg> [ [subtitle options] [other_script.sub] ... ]

-v <level> verbosity(debug) level (default 1)
-l <logfile> write debug log into a file

subtitle options: MUST be BEFORE .SUB filenames!!!
-s <stream> Substream ID of the subtitle (0..3) (default 0)
-C make CVD subtitles (if not specified SVCD subtitles are default)

Examples:
To insert SVCD style subtitles into Stream #2; debug level = 3
WinSubMux.exe -v 3 INPUT.MPG -s 2 SUBTITLES.SUB OUTPUT.MPG

To insert SVCD style subtitles into Stream #0 and CVD style subtitles into Stream #1
WinSubMux.exe INPUT.MPG -s 0 SUB_SVCD.SUB OUTPUT.MPG -s 1 -C SUB_CVD.SUB

! Because of backward compatibility with older versions of WinSubMux and
with submux the first subtitle-script MUST be between the two mpeg files
(input, output) as it is described above !

The subtitle image format
~~~~~~~~~~~~~~~~~~~~~~~~~

It must be in "Windows Bitmap 16 color (4bit) or 256 color (8bit)" format
and ONLY the first four color can be used as #00 for background and #01,
#02, #03 for anything. If other colors are used the program uses the
AND '3' operation to calculate the color index:
subtitle_color_index = bmp_color_index AND 3.
So #04 becomes #00, #05 becomes #01, #06 becomes #02, etc.

The subtitle script file format
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The file format is similar to "PHILIPS SVCD DESIGNER 1.5 - 2.0 SUBTITLES FILE"
file format but it must contain ONLY the '[LIST]' section without the '[LIST]'
section identifier. Eg.:

ENG_000001.bmp 01:45:10:11 01:45:14:15 296 068 211 464

or

ENG_000001.bmp 01:45:10:11 01:45:14:15 296 068 211 464 0 255 255 255

where the columns are:

IMAGEFILE STARTTIME ENDTIME WIDTH HEIGHT X Y T0 T1 T2 T3

IMAGEFILE: filename of the subtitle picture without path
(the pictures and the script file MUST BE in the same directory!)
STARTTIME, ENDTTIME: Hour:Minute:Second:Hundredthsecond
WIDTH, HEIGHT: width, height of the bitmap
X,Y: X,Y position (on the movie) of the lower upper corner of the subtitle image
T0, T1, T2, T3: is the contrast (or transparency) value of the #0, #1, #2, #3 colors
0 means fully transparent
255 means fully non transparent
***
BE CAREFUL don't make subtitles with zero or negative duration they will be skipped.
(eg: SubRip 0.97b puts '00:00:00,00' time to the last subtitle ENDTIME)


Future plans
~~~~~~~~~~~~

* bug fixing
* subtitle extraction from mpeg2 files (like vob2sub)
* non transparent subtitle backround support
* multilanguage support
* direct mpeg2 preview (open mpeg2 files not d2v files)


Known bugs
~~~~~~~~~~

* MPEG Analizing does not work correctly with MPEG1 files
* mpeg files with RIFF header (*.DAT files) works very slowly
--> Convert to true mpeg file with 'cdxa2mpeg.exe' (part of VCDImager)


System requirements
~~~~~~~~~~~~~~~~~~~

* IBM PC compatible computer
* Processor: at least Pentium Pro compatible
* Operating system: Windows 9x/Me/NT/2000/XP



--------------------------------------------------------------------------

MPEG2DEC.DLL is under GNU GENERAL PUBLIC LICENSE (GPL)

--------------------------------------------------------------------------

new_age
7th May 2002, 22:23
New version (0.2.0.1) is out, check out http://www.doom9.net

DrKnowLittle
8th May 2002, 08:26
Great work new age !

Still hoping for someone to come forward on the svcd mux/cut part :)

/DrKnowLittle

DrKnowLittle
8th May 2002, 08:28
btw. is it possible to cut svcds with subtitles in TMPGEnc and still have working subs ? Or is there some ohter substream aware prog that can cut mpeg2 ?

borndevil
8th May 2002, 13:27
@ new_age.
You've done a good work, I confirm.
However, with WinSubMux & submux programs I can't understand why subs work well until a certain point, and after I see a garbage and aren't displayed anymore.
I tried with another video stream, same subs, same point of garbage.
I tried changing .bmp with another, same thing.
I tried changing a little bit sub script time of that sub, nothing changed.
I'm confused.
Can you help me and the other Philips owners?

Thank you very much.
I've a Philips 722 with 4-15O-0 firmware.

new_age
8th May 2002, 14:22
Hello!

DrKnowLittle: Currently I don't know about a cutting program that hold subtitles (SVCD, CVD subtitles are in Private 1 stream).

borndevil:
I'm very sorry about it but I really can't test SVCD style subs since my player supports only CVD style subs.

However you should try few things. There are a lot of tools from Philips that can multiplex subtitles. I guess they will do better. Search on Philips site. (However SVCD style subtitles are in a very simple format so I don't know what's going wrong)

Did you tried to jump to other timepos (after the garbage) and/or change to other sub stream and then change back?

regards,

New Age

ui. as I guess you've already noticed that a lot of people have problems with Philips players.

htc10825
8th May 2002, 17:03
Great work new_age!

I´ve ripped a Kunfu-movie "The Storm Riders" 2:08:00 NTCS 2.35:1 on ONE (1) SVCD-CDR. The Chines&English subs I could mux them with I-Auther, but due to the ultra low bitrate the play back was jerky/choppy. To solve the playback problem I used bbMpeg to mux the video and audio, witch automatic increase the muing rate and resault a smooth playback. But bbMpeg kann not mux subs. I´ve got a dilemma - until I saw your tool in Doom9´new. Your tool is definitivly my last resort.

BUT "WinSubMux" has a very, very large muxing overhead!
The I-Authoer muxer brought a very effective result out of the 1064 BMPs(one language), only increase 11 MB in size. The WinSubMux did the same job but the file size glow up 50 MB!!! No Joke.
I´ve test this with v0.1.0.1, did you fixed such thing in the new release? If not, can this problem to be improved in the future release?

Many THX again.

new_age
8th May 2002, 18:24
Hello!

This is a problem but it has a reason. Perhaps I want to solve this because once I (and I think others) have the same problem as you: subtitle packets increase mpeg size with a lot of MBs and I can't put the mpeg file to a CD.

You will realize if you extract muxed subtitles from the mpeg that the size of the bitmap has changed (increased). This is the reason why WinSubMux has such an overhead.

However it would be very useful if I can download these subtitles for testing purposes because such an extreme overhead till I didn't experienced.

Meantime I have an idea. For testing I'll write a simple util that "Private Stream 1" with subtitles multiplexer/demultiplexer.
So you demux Private Stream 1 subtitles from I-Author muxed mpeg file and than multiplex into bbmpeg muxed file.

best regards,

New Age

needle
8th May 2002, 18:55
@htc10825

Another alternative in order to reduce the size of the final mpg file is as follows:

Mux the video and audio streams using the Iauthor muxer with the option "PS format" activated (in order to obtain a compliant mpeg file). Then use Winsubmux to add the subtitle streams to the PS file obtained by the Iauthor muxer.

I don't know if this method is fine for you, but in my experience the size of the final mpeg file is about 10 or 15 MB smaller than that obtained using BBMPEG plus Winsubmux.

Using the defaults od DVD2SVCD, the BBMPEG muxer adds SVCD scan offets and align sequence headers to the mpeg file, that possibly are the reason of the size overhead.

Best regards

Needle

Arianos
9th May 2002, 05:56
@borndevil:
I have a similar constant problem with my SVCD style capable Cyberhomes 212 and 512:
Subs "stick" on the screen after 10 - 20 minutes of continuous viewing. I solve the problem in two ways:
1. Before it happens, I pause the movie for 2-3 seconds (if I remember)and for a magical reason, the subs show ok till the end of the CD.
2. After it happens, I scroll through the subtitle streams from the remote (Cyberhome 212 and 512 support 4) and they reappear OK.
I know both are crude ways, but by now I learned to live with it. The convenience to be able to have 2 subs (English and Greek in my case) or switched off, is worth it.

@new_age:
You and dvd2svcd are my heroes!
In "Wayne's world" I think it was that they say: "We are not worth it, we are not worth it". He he he..that's how I feel for you guys!
Keep up the fantastic work!!!!

borndevil
10th May 2002, 08:15
@Arianos

Yes, that's exactly what happen to me.
I know, I can just switch off/on subs, but that's mean there's something doesn't work. I tried following:
changed video, same subtitles.
changed bmp of wrong spot.
changed a little bit the timecode in the script.
Result is the same.

I used Philips script (hh:mm:ss:ff) instead submux script (hh:mm:ss:ss/100) and player freeze for a second in the same spot, resync subs and garbage disappear.
I tried SBT Maestro for creating bmp and the spot is shifted 1 min. later.

I can't solve this.
If someone can help... (new_age?)

new_age
10th May 2002, 08:48
Have you tried to remove this bitmap from the sub file?

NA

borndevil
10th May 2002, 09:06
No, I just tried to swap wrong bmp displayed with a bmp of another sub, and the problem remain.
But I want, as you said, try to remove bmp from the script and see what happen...!

RoopeT
10th May 2002, 11:13
@new_age:There are a lot of tools from Philips that can multiplex subtitles. I guess they will do better. Search on Philips site.

I've tried Philips SVCD designer (both v.1.x and v.2.0), and they don't do any better work for muxing subtitles. I'm not sure, but I think the same subtitles that gave problems when muxed with submux also gave problems when authored with SVCD designer.

So, basically Philips created a new format (SVCD), but can't make players that support their own format!

Willem_1010
13th May 2002, 22:11
Thanks for this great program. It's much easier than the commandline submux.

I only have one problem. When muxing a CVD subtitle, they always come out in green colour.
I converted a .srt to a .ssa first and made a submux file of it with MaestroSBT. I edited the font at least 10 times and tried different colours and fonts. They still come out green.

Maybee someone know what this can be.

Below some line of the .sub file:

monsterstest_0001.bmp 00:01:35:39 00:01:37:39 720 32 0 402 0 255 255 255
monsterstest_0002.bmp 00:01:37:43 00:01:39:26 720 32 0 402 0 255 255 255
monsterstest_0003.bmp 00:03:08:35 00:03:13:19 720 63 0 371 0 255 255 255
monsterstest_0004.bmp 00:03:14:36 00:03:17:19 720 32 0 402 0 255 255 255
monsterstest_0005.bmp 00:03:18:29 00:03:20:13 720 32 0 402 0 255 255 255
monsterstest_0006.bmp 00:03:20:36 00:03:22:36 720 32 0 402 0 255 255 255
monsterstest_0007.bmp 00:03:22:76 00:03:23:57 720 32 0 402 0 255 255 255
monsterstest_0008.bmp 00:03:24:37 00:03:26:50 720 63 0 371 0 255 255 255
monsterstest_0009.bmp 00:03:26:87 00:03:27:94 720 32 0 402 0 255 255 255
monsterstest_0010.bmp 00:03:28:14 00:03:30:14 720 32 0 402 0 255 255 255

Thx,

Willem

new_age
13th May 2002, 22:24
Hello!

Have you tried to preview the subs on the "Preview" tab in my program? How do the subs look like?

New Age

Willem_1010
13th May 2002, 22:52
I tried that New Age, and they look ok, exactly like they were meant to be.

Maybee I have to try the User Defined Colour palet in your program. Can you tell me how to use it for CVD subs.

I assume I have to re-save them afterwards.

Thx for your reply.

Willem

new_age
13th May 2002, 23:58
Hello!

Just switch to "User definied colors", click on a color that you want to change and than save as. You must also save the bitmaps perhaps.
The easiest way to change colors: switch to "Preview tab" and on the "BMP pal.: [..........]" click on a color that you want to change.

It is possible that not all the bitmaps will have the same color. Than the bitmaps were extracted wrong!

As you can read in the README:

"It must be in "Windows Bitmap 16 color (4bit) or 256 color (8bit)" format
and ONLY the first four color can be used as #00 for background and #01,
#02, #03 for anything. If other colors are used the program uses the
AND '3' operation to calculate the color index:
subtitle_color_index = bmp_color_index AND 3.
So #04 becomes #00, #05 becomes #01, #06 becomes #02, etc."

best regards,

New Age

ps. if it still doesn't work zip them(bmps and the sub) and mail it to me

Willem_1010
14th May 2002, 05:39
Gonna try it tonight.

Thx again,

Willem

Arianos
14th May 2002, 06:09
@ new age + Willem 1010:
Greetings.
I used to have the almost exact same problem: faded yellow-greenish svcd subs, whether I used default colours or user defined. In both cases, they showed OK in preview, when using the subs dvd2svcd up to 1.0.9b1 extracted. Didn't matter whether they were muxed through dvd2svcd or manually.
Not anymore :) : dvd2svcd 109b2pre2 + WinSubMux 0.2.0.1.
I thought this input might help.
Thank you again.

Willem_1010
14th May 2002, 16:28
Thx for the reply Arianos, but it didn't help me.

New_age, I tried the user defined colours. In the preview I got nice white subs, but after muxing them, and playing them on my player they are green again.

I'm gonna send you the sub and bitmaps (packed). Maybee you can try it on your player.

Thanks in advance.

Willem

Willem_1010
16th May 2002, 05:32
Hi New_age,

Hope you had time to check the subs I send you by mail.

If they are oke on your player, could you made a short sample, which work oke on your player, and send them me.

Would be nice.

Thx,
Willem

new_age
17th May 2002, 00:29
Hello!

I've tested the subtitles you sent me and they looked good with my grundig gdv 130. (muxed as CVD into a NTSC movie)

NA

Willem_1010
17th May 2002, 05:25
Thx for trying it New_age. Think I found the problem. It's my dvd player (mustek V560). On vcdhelp.com I found a message from someone with the same problem. He solved it by setting the colours to black, white, black, black. I did a lot of new tests, and one of them was oke.
Now I have to figure out the right settings, but I know it's possible :)

Thx for your concern.

Willem

new_age
21st May 2002, 14:31
Hello!

New version (0.2.0.2) is out.

NA

Rumata
21st May 2002, 16:42
I can't seem to find a download link :confused:

new_age
21st May 2002, 18:14
http://www.doom9.org
http://www.doom9.net

Finally it is downloadable.

regards,

New Age