PDA

View Full Version : Possible SUBMUX bug?


new_age
3rd March 2002, 16:30
Hello!

I've created a lot of CDV subtitles to watch them with my dvd player (grundig gdv-130 with 6.36 firmware) and I discovered something. A lot of subtitles appear in a full filled rectangle (it seems with the color of the text). I've suspected MaestoSBT but I've examined all the subtitles (widths are divisible by 4; and backgound is always the 3rd color; so MaestroSBT seem OK [maybe something wrong with timing?])

The way I'm creating subtitles:
1) text subtitle /srt,sub etc./ ----> SSA (with SubAdjust)
2) SSA ----> submux (with MaestroSBT)
3) submux -C inmpg subfile outmpg

I've created full width (720x... [NTSC, 23.976 fps]) subtitles and It seems that:

The subtitles are appearing good till they are in one line (720x37 at 0 415) after the first two or more line subtitle (720x71, 720x105) all one line (720x37 at 0 415) substitles go wrong (appear in a filled rectangle).

Do anyone have the same problem?

regards,

NA

new_age
3rd March 2002, 16:40
Hello!

Additional info: the svcd image was created by EasyVCD 1.0.8

NA

new_age
3rd March 2002, 17:21
Another additional info :-)

When doing DVD2SVCD the subtitles are always good.

NA

Mozart
3rd March 2002, 19:05
are you using DVD2SVCD with subtitles muxed with SUBMUX? If yes, the subject "possible submux bug?" has no sence. Donīt you think?

Moved to the right place.

new_age
3rd March 2002, 19:55
No I Don't. Because I use submux.exe included in DVD2SVCD package.

But you are a moderator and I'm just a member do what you want.

I don't want to send bug report to dvd2svcd author because of personal information included in systeminfo.txt. I wanted to inform him/her about this in this way.

NA

Divine
3rd March 2002, 21:17
Maybe you are making a mistake then, because the submux.exe in the dvd2svcd package is exactly the same.

Mozart
4th March 2002, 04:39
let me elaborate my words better...

You said in the subject:

possible submux bug?

and in another post you said:

When doing DVD2SVCD the subtitles are always good.

So, the 2nd quote told us that submux works fine, and this mean that it is not buggy...
You said also that you were using another tools to generate your subtitles.
Most probably your problem is with these tools (maybe using wrong settings). Thus, this is the right place for your question. Post some more informations here and maybe somebody will help you with those other tools.

did you got it?

guillep2k
4th March 2002, 21:06
Hi! I share your opinion, new_age, that it could be a bug in the submux's muxing process (Mozart, while submux is included in DVD2SVCD's program, I think it was not developed by him... Please don't get confused with the other tool also named submux, that comes with VOBSUB).

About getting a workaround on your problem, try these options:

1) Click "full width" in MaestroSBT's rendering dialog. This will cause MaestroSBT to always create 720xNNN bitmaps, instead of (optimized) variable width bitmaps.

2) Click the "don't clip bitmaps" in MaestroSBT's rendering dialog. This will cause MaestroSBT to always create 720x478 (720x480) bitmaps.

Either option will create larger bitmaps (and therefore use more bitrate), but since your problem seems to be size (or position) related, this should change the submux behavior.

Please keep me informed on your progress, so I can add the experience to MaestroSBT's readme. :)


Guille

new_age
4th March 2002, 22:19
Finally!

guillep2k I wanted to write you a letter but in this case I write here.

Finally I found a solution.

It seems me that when MaestroSBT generate output bitmap (4bit bmp; two colors for text, one for outline, no antialias)
the color index that submux.exe "use" (?) and my Grundig GDV130 displays is that:
#3: Background
#2: Font
#1: Outline
#0: Antialiasing (?)

I've examined subtitles generated by DVD2SVCD from DVDs and the color index looks like:
#0: Backgound
#1: Font
#2: Outline
#3: Antialiasing
Palette looks like:
#Index: RED GREEN BLUE
#0: $00 $00 $00
#1: $FF $FF $FF
#2: $1E $1E $1E
#3: $80 $80 $80
(I think palette is not relevant because this colors can be selected in DVD2SVCD)

So I wrote a program that changes all pixel in bitmaps generated by MaestroSBT and set new palette.
oldpixel index -> new pixel index
3 -> 0
2 -> 1
1 -> 2
0 -> 3

And now it works fine (with CDV subtitles)!! (on Grundig GDV 130)

So I think there is a space in 'color rendering' groupbox to add a new radio button ;-))) like 'submux compatibility' or something.

regards,

NA

guillep2k
4th March 2002, 22:39
Mmmm... that's so strange... Color indexes should have nothing to do with their conceptual function (outline, antialias, etc.), but with the actual pixel values on the bitmaps (how submux could tell which pixels are effectively outline and which aren't?). However, in versions prior to 2.2.5.1, I incorrectly informed the alpha levels, so the antialias was transparent and the backround wasn't. Could you confirm me about the latest version of MaestroSBT showing the same problem? Or may be it's something specifically about CVD? I know that some people was successful using MaestroSBT with submux, without doing so much work... :confused:

Guille

Pko
5th March 2002, 00:45
I think that it *is* a submux bug. I have just make a reference to this in another thread in this forum...

The thing is, the submux compiled with GCC that came with some older versions of DVD2SVCD (at least in 1.0.6 build 1) and that I think is also the one that you can nopw download when you select "submux.zip" in DVD2SVCD homepage, have a bug with word alignement that caused that some subtitles where incorrectly compressed; that happened if you multiplexed them from DVD2SVCD or from the command line; it happens at random, so sometimes there are no single error in some streams but sometimes there are lots of them.

In one of the actualizations, DVD2SVCD readme informed that the submux utility was compiles with another compiler and that bug was gobe (also, the file size of the correct versionb was much smaller, down from 383K to 75K). That version is the one that comes with DVD2SVCD bundle right now and if you multiplex with it the subs are 100% correct AFAIK.

Hope this is was you where talking about and that this clear everything...

new_age
5th March 2002, 01:19
I'm using this version (BCC compiled) of submux.

And I'm using MaestroSBT 2.2.10.0

regards,

NA

guillep2k
5th March 2002, 03:01
new_age... is 2.2.10.0 the version that gave you problems, or it's just the last one you have? Sorry if I sound stupid...

Could you try another bitmap format? What was it? 4BPP? Could you try 8BPP or vice-versa?

Could you send me one MaestroSBT generated bitmap, the .SUB script and the source of your program, so I can fully understand what your workaround was? (my e-mail address is in MaestroSBT's readme).

I know that you already fixed this for you... I'm only worrying about other people that could face your same problem... They'll thank you at least as much as I. :)

Guille

young
18th March 2002, 23:35
I have similar problem with SVCD subtitle.
Most subtitle came out ok but my ad1500 randomly showing subtitle with while box with outlined text. I definitely try all the method posted in here but there was no definite word that is fix. Especiall changing bitmap will be hassle.

If anyone interested to help me out I can sen my short movie which showin the problem.

new_age
19th March 2002, 00:02
How do you create the bitmaps?

Do you create with MaestroSBT?

MaestroSBT 2.10.0.1 or above has solved the problem. (CVD subtitles muxed by submux.exe)

NA

new_age
19th March 2002, 00:03
I mean 2.2.10.1 not 2.10.0.1.

ukendt
19th March 2002, 01:54
But you are a moderator and I'm just a member do what you want.
Well...as far as I know I am the moderator here and ur Q was posted in the right forum........:-) :-) :-)

Mozart
19th March 2002, 04:22
err... he had originally posted at dvd2svcd forum and I had moved it. Are you kidding or you really think that this thread belong to dvd2svcd forum?

young
19th March 2002, 10:57
Finally got it work after I update MaestroSBT(2.3.0.0.0 eventhough it said 2.2.3.0 in about popup). thanks new_age.
Still I have little problem. The whitebox is gone but some subtitle came out with underline. sometime partially, sometime in a full length. I think I saw these problem discussed in other thread but can not find anymore. It is not visible like that whitebox.

As guillep2k mention, it will be a lot helpful if each thread followed up with resolution if possible. I was lucky to catch this thread. :)

thanks to all of you.

ukendt
19th March 2002, 11:43
What I stated was that "this" (subtitles) is the right forum...
I didn't know U moved his thread to this forum.
I think ur decision was right and I misunderstood...sorry !
Usually though I PM the moderator of the forum whereto Qs should belong before moving anything and I PM for discussing too, before I make decisions
(I think this is what we all agreed upon in the special forum....no need to show moderators have different opinions if U understand what I mean). Further discussion as PM not here please.........

new_age
19th March 2002, 11:53
"some subtitle came out with unline"

What do you mean?

---
Anyway there are still two bugs that I know about:

1) sometimes there are junk pixels on the subtitle (lower right corner of the subtitle)
It is possible caused by submux (I analized the source code because I wrote a program with similar knowledge) because when it creates the new subtitle image it doesn't clear the memory buffer used for the image pixels

2) some characters (sometimes not the full character) from the end of the line goes to the start of the line Eg.
subtitle text (without quotes): "ABCD EFGH IJ?"
an it looks like on the tv screen(without quotes): "? ABCD EFGH IJ"
This error is very rare and I don't know whether it is a submux bug or a MaestroSBT bug [I've never examined the bitmaps created by MaestroSBT]

regards,

NA

My program (WinSubMux) in test phase and itt will be freeware.
Currently it can preview submux type subtitles (sub+bmps) and multiplex into an mpeg2 file (SVCD, SVD type subs).
The main purpose is to avoid using so many programs:
to convert srt files into ssa with subadjust; to convert ssa to submux and render the bitmaps; to multiplex bitmaps into mpeg2 files.
So when it will be finished you just open any text subtitle file or submux subtitles and select input,output mpeg2 and press start.
But there is a lot of work to do. Multiplexing seems finished.

guillep2k
19th March 2002, 14:48
1) sometimes there are junk pixels on the subtitle (lower right corner of the subtitle)
It is possible caused by submux (I analized the source code because I wrote a program with similar knowledge) because when it creates the new subtitle image it doesn't clear the memory buffer used for the image pixels

Good finding.

2) some characters (sometimes not the full character) from the end of the line goes to the start of the line Eg.
subtitle text (without quotes): "ABCD EFGH IJ?"
an it looks like on the tv screen(without quotes): "? ABCD EFGH IJ"
This error is very rare and I don't know whether it is a submux bug or a MaestroSBT bug [I've never examined the bitmaps created by MaestroSBT]

Could you please send me the ssa file that causes this weird problem? Are you using a right-to-left language?

Guille

new_age
19th March 2002, 16:14
Ok next time I discover this error I'will examine the ssa and sub and bmps.

NA

ps: left-to-right :-)

young
19th March 2002, 17:47
Sorry. It was underline.

"ABCDEFG__" or whole line is underlined. Though it rarely happen.
I'm using asian character for subtitle and maybe that's the reason.
I check the bmp file but the bmp file for those texts are looks normal.
Is it submux problem?

Young

new_age
19th March 2002, 18:27
Than this is the problem that I've mentioned in (1).

Cs.

guillep2k
19th March 2002, 18:40
Originally posted by young
Sorry. It was underline.

"ABCDEFG__" or whole line is underlined. Though it rarely happen.
I'm using asian character for subtitle and maybe that's the reason.
I check the bmp file but the bmp file for those texts are looks normal.
Is it submux problem?

Young

There's a workaround: in MaestroSBT select "Don't clip bitmaps". This creates full size bitmaps, so if there's any underline, it will be below the screen ;)

Guille

young
20th March 2002, 23:23
Hi, Guillep2k.
Thanks for the tip but didn't work with me. I tried various method other than that such that margin etc. None of them help me with underline problem. Maybe submux problem. I will try whenever updated submux available.

Thanks.

guillep2k
21st March 2002, 14:29
Originally posted by young
Hi, Guillep2k.
Thanks for the tip but didn't work with me. I tried various method other than that such that margin etc. None of them help me with underline problem. Maybe submux problem. I will try whenever updated submux available.

Thanks.

Strange. It is a submux problem... it's only that the trick in MaestroSBT helped me to overcome it. I hope new_age's program will come out soon.

Guille

new_age
21st March 2002, 14:41
Hello!

As soon as I finish SVCD style subs I will release the first very very very beta version ;-) somewhere on a free web site. (can anyone suggest a good free website?)

My problem is that I can't test SVCD subs because my player (grundig gdv-130) plays only cvd subs.

I've already "integrated" (selected winsubmux instead of submux on subtitles tab) into DVD2SVCD and it works.

It seems to me that when I do DVD->SVCD conversion the subs are always 1 sec earlier than they should appear. (with WinSubMux)

If anyone interested in testing WniSubMux than drop me a mail and than when I've new version I will send it. (WinSubMux.exe, 221KB)

regards,

NA

guillep2k
21st March 2002, 14:45
My player only supports CVD subs too :( And barely!

About web space, consider sending the program to doom9 (he's submission address is in his "contact" page) when your first working version is finished.

Guille

young
21st March 2002, 18:29
new_age.

I would like to try your alpaha or whatever. But do not know how to retrieve your e-mail. [Thx new_age, Click the Profile button. I got it. :D ]
When I overcome the whitebox problem, I was too happy and ignored the underline problem. Now I have buch of SVCD with underline and became sick of it. I willing to try all other option to avoid this.

PS. Mine (AD-1500) also only play CVD only as long as I know.
young

new_age
21st March 2002, 18:34
Press 'profile' button below any message.

WinSubMux sent in email.

NA

new_age
8th April 2002, 18:13
Hello!

Finally I've decided that lastest version of WinSubMux will be released somewhere (I hope Doom9 download section will it be). I've posted my program and the readme to Doom9 and I hope they will found it good enough to put into the download section.

regards,

NA



And here's the README file:
--------------------------------------------------------
WinSubMux 0.0.1.5
by New Age
April 7th, 2002

WinSubMux@mailbox.hu

This program is freeware. Use at your own risk.

Benefits
~~~~~~~~

* it has a GUI however it can be started with command line parameters
* a lot of fixed bugs of SUBMUX, eg.:
'underline problem': a lot of subtitles appears on screen underlined
'disappearing subtitles': if the subtitle image was too small sometimes
it doesn't appear on screen
* 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


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

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

WinSubMux.exe [options] <input_mpeg> <sub_script_file> <output_subbed_mpeg>

Where options are:
-C makes CVD style subtitles
-s <stream> number of the substream to insert (default 0)

If -C is not specified then the program makes SVCD (Philips) style subs.


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

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

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

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

This program is written in Delphi but I owe a lot of thanks to "submux.c"
(GPL license) http://www.vcdimager.org/pub/vcdimager/contribs/

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

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

new_age
8th April 2002, 18:25
"latest" not "lastest" :)