Menu

#7 VobSub subpictures support

closed-accepted
nobody
None
5
2006-06-02
2006-04-27
Ivan Vecera
No

Hi all, sorry for delay. Now I have a patch for gpac,
that allows import VobSub subtitles. This is private
extension of Nero Digital format.

Limitations:
- Only VobSub (.idx/.sub) format supported
- VobSub features such as align, scale, alpha... stored
in .idx file are not supported

Discussion

  • Ivan Vecera

    Ivan Vecera - 2006-04-27

    Logged In: YES
    user_id=15213

    Hi again,
    you can download the prebuilt binary for win32 at:

    http://www.cera.cz/gpac/mp4box.zip

     
  • Kurtnoise

    Kurtnoise - 2006-04-30

    Logged In: YES
    user_id=1287682

    Hi Falco,

    First of all, great stuff...This new feature is really great
    for MP4Box.

    I've made some tests with your compile but all my subtitles
    are rendered in green during the playback (tested with
    Gabest MP4 Splitter and Haali Splitter). In addition with
    VLC, subs are not displayed.

    Have you got an idea about that ?

    Thanks anyway.

    ++
    Kurtnoise

     
  • bond

    bond - 2006-05-01

    Logged In: YES
    user_id=786427

    "This is private extension of Nero Digital format."

    what does this mean? does this mean its not compliant with
    nero digital? if so, it doesnt really make much sense
    imho :(

     
  • Nobody/Anonymous

    Logged In: NO

    "This is private extension of Nero Digital format."

    The Nero Digital is based on MPEG4. It adds some
    non-standardized features such as subpictures and chapters.

    The better sense would be:
    "This is Nero Digital private extension for MP4."

     
  • Nobody/Anonymous

    Logged In: NO

    Hi Kurtnoise,
    I did not try Gabest nor Haali splitters. I only tried the
    Nero Digital ShowTime player. Could you provide me please
    some streams.
    Thanks

    Falco

     
  • Kurtnoise

    Kurtnoise - 2006-05-02

    Logged In: YES
    user_id=1287682

    You need vobsub files only or mp4 streams ?

     
  • Ivan Vecera

    Ivan Vecera - 2006-05-03

    Logged In: YES
    user_id=15213

    I found that Gabest splitter has a bug. In MP4Splitter.cpp
    there is the following sequence:
    =====
    BYTE y = (pal[i+1]-16)*255/219;
    BYTE u = pal[i+2];
    BYTE v = pal[i+3];
    BYTE r = (BYTE)min(max(1.0*y + 1.4022*(u-128), 0), 255);
    BYTE g = (BYTE)min(max(1.0*y - 0.3456*(u-128) -
    0.7145*(v-128), 0), 255);
    BYTE b = (BYTE)min(max(1.0*y + 1.7710*(v-128), 0) , 255);
    =====

    The subpictures palette in MP4 file is stored in decoder
    specific info of the track and the content is:
    0 1 2 3 4 5 6 7 60 61 62 63
    0, Y1, V1, U1, 0, Y2, V2, U3, ..., 0, Y15, V15, U15

    where Yn, Vn, Un is YUV representation of n color.
    Gabest uses order 0, Y, U, V and this is first bug. The
    second one is on line with green component.

    The generic formula for conversion from YUV to RGB is:
    R = Y + 1.403V
    G = Y - 0.344U - 0.714V
    B = Y + 1.770U

    Gabest uses:
    R = Y + 1.403U
    G = Y - 0.344U - 0.714V
    B = Y + 1.770V

    Differences are on first and last lines. But because of
    first bug (U & V components are swapped) the first and last
    lines are correct. The problem is in second line because the
    U and V components are swapped the coefficients 0.344 and
    0.714 are applied on incorrectly so the green component of
    RGB is not valid.

    Falco

     
  • Ivan Vecera

    Ivan Vecera - 2006-05-04

    Logged In: YES
    user_id=15213

    Hi all,
    I found also bug in my color conversion in the patch. I have
    updated the patch (see below).
    The prebuilt version of patched mp4box is available:

    http://www.cera.cz/gpac/mp4box-20060504.zip

    Regards
    Falco

     
  • Kurtnoise

    Kurtnoise - 2006-05-09

    Logged In: YES
    user_id=1287682

    Hi Falco,

    Could you provide the sources of your last build (20060505)
    ? Iwould like to compile MP4Box with vobsub support in my
    Linux distro.

    fyi : you can find vobsub sources here :
    http://www.divx-digest.com/software/vobsub.html . For vobsub
    extraction. Hope this help.

     
  • Ivan Vecera

    Ivan Vecera - 2006-05-10

    Logged In: YES
    user_id=15213

    Hi all,
    I'm sending latest patch to gpac.

    - [FEATURE] - possibility to export VobSub track as single
    track MP4 file and reimport into new MP4 file
    - [FEATURE] - delay parameter from .idx file is now processed
    - [BUGFIX] - problems with incorrect colors in Nero
    ShowTime and MPC fixed

     
  • Ivan Vecera

    Ivan Vecera - 2006-05-10

    VobSub subpictures support (latest patch version)

     
  • Jean Le Feuvre

    Jean Le Feuvre - 2006-06-02

    Logged In: YES
    user_id=815447

    Many thanks for this great patch - I simply wouldn't have
    had the time to look at it. VobSub has been integrated in
    CVS now.

     
  • Jean Le Feuvre

    Jean Le Feuvre - 2006-06-02
    • status: open --> closed-accepted
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.