PDA

View Full Version : black border around subs or corrupted subs in Maestro


guru1968
31st January 2003, 13:58
preface:
- with subrip_1.14 the sub's colors and the mapping are wrong for maestro.
- with subrip_1.15 the colors+mapping are perfect
- subs were stored as BMPs + son, because I want the different font-styles; no need to OCR them as I want it exactly as it is on DVD...

problem:
- with NO cropping certain BMPs are displayed corrupted in Maestro
- with cropping all BMPs are correct, but there are black borders around them :(

question:
- WHY are the SUBs corrupted in Maestro? the BMPs themselves are all okay!
- WHAT do i have to do to get rid of the black borders? - there is something mentioned in subrip, but: what must I input there?

assumption:
- corrupted subs in Maestro: as the subs are stored RunLength encoded, there are obviously some constrains for the type of input-BMPs for this encoding to work properly... what are those constrains?
- black borders: ??? don't know...

answers:
<your text here....>


gr33tz,
guru

zuggy
31st January 2003, 20:51
You must use cropping for Maestro, as you see.
And please, specify, borders around the whole picture, or just on top/bottom? What happens if you crop to e.g. 700x400 - the border is wider, or?

guru1968
1st February 2003, 03:39
Hello Zuggy,

well it is a positioning problem!

to fix the horizontal black borders its sufficient to select 'Even values only'.

but to get rid of the vertical borders its a bit more complicated:
the start-x has to be a multiple of 8!

e.g. the original bounding-box of a sub was 255,471 -> 462,496 which resulted in black borders left, right and at the bottom!
when the position of the surrounding background-box is changed to 248,470 (248==multiple-of-8 470==even) all borders are gone :)
BUT: to get the original text-position the text has to be shifted 1 line down and 7 pixels right...

Is there any chance to get this -- make the bounding box big enough to A: start at a (X%8==0),(Y%2==0) position and B: to offset the text such that it keeps its original position -- automated??
- something like 'Maestro Positioning'
If You let me get my hands on the according source I would be more than glad to implement this little justification algorithm...

There's another constraint w.r.t. the corrupted BMPs:
For me it seems, that the RunLenght encoder produces crap when the font-/outline-color is at the very (left) border...
(in other words: when there's a background-color 'safe-area' around the text, everything's fine...)

gr33tz,
guru

zuggy
1st February 2003, 08:40
the start-x has to be a multiple of 8!
Well, it seems you have discovered the 3rd, let's hope the last, Maestro issue for cropped subtitle images!
1st = even values only for Y-position;
2nd = there should be an additional line under the subtitle text (Maestro cuts the last line sometimes).

But tell us, which version/build of Maestro you've used? I'd 2 dvds under test (v2.9 b2915a) with only 1st+2nd issue-aware settings and all gone right, that is w/o black borders.
Is there any chance to get this automated??
Yes, it would be not difficult, but have you test (X%2==0)?
I would be more than glad to implement
You can, it's open-source.
RunLenght encoder produces crap when the font-/outline-color is at the very (left) border...
The 4th...? It is possible, but tell us about your Mae v.
And very (left) border, you mean [0, 0]?

guru1968
1st February 2003, 13:26
But tell us, which version/build of Maestro you've used? I'd 2 dvds under test (v2.9 b2915a) with only 1st+2nd issue-aware settings and all gone right, that is w/o black borders.I also use 'Maestro v2.9 Build 2915a - 1234' (don't know what the 1234 stands for - that's what's in the About-window)
- I haven't so many different DVDs tested - honestly spoken, I'm yet busy with my first all-complete/all-inclusive DVD9-2-DVD5 conversion [Murder by Numbers] ... but I have spent weeks now and learned a lot... maybe I want it too perfect, but I have the time for it :)

Yes, it would be not difficult, but have you test (X%2==0)?I've tried that one also - no success!
It's quite easy to adjust the sub's position in Maestros build-in sub-editor and to test it afterwards via Realview...
In this way I tested: (Width%2,%4,%8,%16,%32; X%2,%4) the only setting were it worked was when X was a multiple of 8, regardless the width (I think...)!

You can, it's open-source.hmm... I'm actually a Unix-(cross)programmer, not even touched a line of windows-source-code yet; I would need quite some time to understand this crappy visual programming mechanism...
Give me a Command-window and GCC (...and a SUN station) and I would be happy ;-)
(I also do not have the HD space to install visual-xyz, too many yet-to-copy DVDs hanging around here :)

The 4th...? It is possible, but tell us about your Mae v.
And very (left) border, you mean [0, 0]? well, no. I meant if the text starts at the very left border RELATIVE to the start of the bounding box. e.g. if the text is 'Das bin ich' then the starting vertical line of the captital 'D' almost fully covers the complete left side of the cropped sub-picture; maybe the cropped sub-picture has to start with some background-pixels!?
-> if this is the case, then not only one bg-color line has to be added to the bottom, but also (at least) to the left side...
(but that's only an asumption - all corrupted BMPs seem to start with a big Capital at the very left beginning of the sub's bounding box -- maybe it's also something completely different ...size constraints?... if I find the time, I'll investigate this issue further)

gr33tz,
guru

zuggy
1st February 2003, 14:00
If you want it perfect, then "crop" subpicture to mpeg2width x mpeg2height - 2, and all the bmp problems disappear.

But is good to solve it for cropped imgs, good div-X research :)

--crappy visual programming mechanism: And you don't have even seen the crappy source :)

--relative: I've understood it this way, but the problem could be a bit different. If you use Maestro & cropping, 2 lines at up and 2 at bottom are added by SubRip, using the background color - to solve the "2nd issue" safelly. Maybe some vertical lines at 0,1 and width-2,width-1 position would help.

guru1968
1st February 2003, 18:18
I think that I revealed the condition when the cropped sub is displayed corrupted:

has nothing to do with background-color lines left or right or whatever. *this* time, it's the WIDTH of the cropped BMP!!

Whenever width % 8 == 1, then I would bet (almost) anything, that the picture is corrupted!
-- when this condition is met, it does not matter where the additonal vertical line is put, only the width of the sub must never be ( N x 8 + 1 ) !

so, it seems there's a little bug in their RL-encoder, but there's no-one there to complain to -- so WE have to work-around this ;-)


Anyone to verify, test, confirm this assumption?


gr33tz,
guru

p.s.
locking forward for SubRip 1.16 ...

zuggy
2nd February 2003, 06:22
Maybe no one discovered it yet becasuse of using default values. There is (width%8==0)check by default. Thanks for your research.