Subtitle corruption on OpenELEC - is it present on other versions?
#4
(2013-09-28, 01:48)Ned Scott Wrote: I looked it up and it looks like UTW and/or Mazui screwed up the subs themselves.

Unfortunately it does play properly with MPC-HC + xy-VSFilter, so as far as they (and most anime fansubbers) are concerned, the subtitles are fine and I expect them to continue to use whatever it is that has screwed up. Looking through the subs I didn't see anything which is invalid according to the AegisSubs docs http://docs.aegisub.org/manual/ASS_Tags (although they use plenty of constructions that are noted as possibly being unsafe for soft-subbing).

BTW I also tried to play back with Windows XBMC 12.2 and had multiple issues. Firstly, a lot of the borders and blurring covered way too large an area, and playback dropped to <1FPS at the point that I was getting corruption with OpenELEC. I was debugging on an i7 so I wasn't expecting that. Anyway, even if the symptoms weren't identical, there were definitely issues.

I have a python script which will do the replacement of \blur to an appropriate \be - would there be any way if it were an addon to intercept the subtitles before libass gets its hands on them and perform this processing? The code (currently a quick hack) is below.

Code:
# Currently only tested with Python 3.3
# We operate on bytes - that way we don't change line endings, remove UTF-8 BOM if present, etc
BLUR_RE = re.compile(rb'\\blur([0-9]+)(?:\.([0-9]+))?')

def blur_repl(m):
    i = int(m.group(1), 10)
    j = 0

    if m.group(2):
        j = float(rb'0.' + m.group(2))

    # If exactly zero, produce \be0 otherwise round to nearest integer with a minimum of 1
    if not i and not j:
        be = 0
    else:
        be = max(1, int(i + j + 0.5))

    return rb'\be' + bytes(str(be), 'US-ASCII')

def blur_to_be(data_in):
    return BLUR_RE.sub(blur_repl, data_in)
Reply


Messages In This Thread
RE: Subtitle corruption on OpenELEC - is it present on other versions? - by magao - 2013-09-28, 06:26
RE: - by magao - 2013-10-12, 23:17
Logout Mark Read Team Forum Stats Members Help
Subtitle corruption on OpenELEC - is it present on other versions?0