Page 1 of 1

Vobsub in MKV looses colour

Posted: 16 Apr 2009 07:18
by mac_man_ad
Hi all,
I have an mkv movie file with some vob subs. These subs are yellow when vlc 0.99a loads them as separate files (.idx/.sub pair), as they should be, but when muxed into the mkv with mkvmerge 2.60, they display white. re-extracting the subs with mkvextract confirms the idx colour palette is still present.
OSX 10.5.6, VLC 0.99a, MKVTools 2.60

Thanks in advance, Andrew

Re: Vobsub in MKV looses colour

Posted: 16 Apr 2009 11:56
by Jean-Baptiste Kempf
Can you share it?

Re: Vobsub in MKV looses colour

Posted: 17 Apr 2009 07:14
by mac_man_ad
Can you point me to your preferred upload site?
Also, do you want the orig. sub files and the movie separately?

Re: Vobsub in MKV looses colour

Posted: 17 Apr 2009 10:33
by Jean-Baptiste Kempf

Re: Vobsub in MKV looses colour

Posted: 18 Apr 2009 01:33
by mac_man_ad
I do not seem to have drop access when mounted through the Finder, and I have proxy troubles through the cli.
Can I say this problem happens with all the VobSubbed files I play with and leave it at that?
Oh, also the subs show white in Quicktime via Perian, so this may be a ffmpeg or matroska problem rather than VLC Mac.

Sorry for being a nuisance with the ftp.

[edit: some may be partially uploaded, cli connection keeps stalling]

Re: Vobsub in MKV looses colour

Posted: 18 Apr 2009 04:31
by mac_man_ad
45 second clip and subs uploaded as vob sub colour.mkv, idx and sub

Re: Vobsub in MKV looses colour

Posted: 10 May 2009 04:40
by JohnAStebbins
I also ran into this problem. I had a look at the code, and it looks like it ignores the palette. In modules/demux/mkv.c where it processes the CodecPrivate data for tracks with type S_VOBSUB, it reads only the size. All the idx data is contained in the CodecPrivate data and it appears to be ignoring it.

Re: Vobsub in MKV looses colour

Posted: 10 May 2009 06:54
by mac_man_ad
Should I point at Handbrake now, where you guys have decoded colour info for ages and are about to implement a VobSub-in-mkv soft sub option?

Cheers, Andrew

Re: Vobsub in MKV looses colour

Posted: 11 May 2009 01:47
by Jean-Baptiste Kempf
I also ran into this problem. I had a look at the code, and it looks like it ignores the palette. In modules/demux/mkv.c where it processes the CodecPrivate data for tracks with type S_VOBSUB, it reads only the size. All the idx data is contained in the CodecPrivate data and it appears to be ignoring it.
Are you able to fix it?

Re: Vobsub in MKV looses colour

Posted: 11 May 2009 05:28
by JohnAStebbins
I'm in the middle of adding vobsub and srt support in mkv to handbrake. But after I get that sorted out, I'll see what I can do.

Re: Vobsub in MKV looses colour

Posted: 12 May 2009 02:18
by JohnAStebbins
Fixed. I sent a patch to the vlc-devel mailing list. It can also be found here: http://pastebin.com/m2ce212a6

It turns out vlc is now using libavformat for parsing mkv. modules/demux/mkv is no longer used. libavformat returns the data that is needed in AVCodecContext.extradata. Just had to check the container type and the subtitle type, then parse the data.

Re: Vobsub in MKV looses colour

Posted: 12 May 2009 12:22
by Jean-Baptiste Kempf
I haven't seen the patch on the mailing list.

Re: Vobsub in MKV looses colour

Posted: 12 May 2009 12:27
by Jean-Baptiste Kempf
Moreover, it seems weird that mkv isn't the default anymore, I'll have to check this.
OK, this is weird, since demux_New should auto-probe mkv, when extension is mkv

Re: Vobsub in MKV looses colour

Posted: 14 May 2009 21:10
by Jean-Baptiste Kempf
This has been applied for trunk for VLC 1.1! Thanks so much!