mkvextract - Problem with missing "langidx" in .idx from extracted VobSub #1810

edumj opened this Issue Nov 17, 2016 · 4 comments


None yet

2 participants

edumj commented Nov 17, 2016 edited


I'm testing how to convert a MKV file with VobSubs, to an AVI with XSUBs. If the VobSubs are form a BluRay it's dificult (it could be done downscaling and decreasing colors) but if they are taken from a DVD it should be easy (just extracting them to idx/sub with mkvextract), But, DivXMux fails when converting the resulting idx/sub to XSUB:

I first get the id form VobSub with mkvmerge :
mkvmerge -i "Como se hizo. Entrevistas.mkv"

Full output:

File 'E:\Como se hizo  Entrevistas\Como se hizo. Entrevistas.mkv': container: Matroska
Track ID 0: video (MPEG-4p10/AVC/h.264)
Track ID 1: audio (AAC)
Track ID 2: subtitles (VobSub)

Then extract IDX/SUB with mkvextract:
mkvextract tracks "Como se hizo. Entrevistas.mkv" 2:subs.idx

Full output:

Extracting track 2 with the CodecID 'S_VOBSUB' to the file 'C:\_CONVE~1\FFMPEG~2\VOBSUB~1\\subs.idx'. Container format: VobSubs
Progress: 5%
Progress: 11%
Progress: 16%
Progress: 21%
Progress: 25%
Progress: 29%
Progress: 33%
Progress: 37%
Progress: 40%
Progress: 45%
Progress: 50%
Progress: 54%
Progress: 59%
Progress: 62%
Progress: 67%
Progress: 70%
Progress: 73%
Progress: 76%
Progress: 82%
Progress: 88%
Progress: 93%
Progress: 99%
Progress: 99%
Writing the VobSub index file 'C:
Progress: 100%

And the resulting idx:

# VobSub index file, v7 (do not modify this line!)
size: 720x576
org: 0, 0
scale: 100%, 100%
alpha: 100%
smooth: OFF
fadein/out: 50, 50
align: OFF at LEFT TOP
time offset: 0
forced subs: OFF
palette: 0000ce, ff3e0f, 000000, fdfdfd, ffe160, ff08de, ffff2f, 005e74, 7c7c7c, e0e0e0, 921f06, ffe160, 000064, fd00dc, f2b01b, 90036c
custom colors: OFF, tridx: 0000, colors: 000000, 000000, 000000, 000000
id: en, index: 0
timestamp: 00:00:00:320, filepos: 000000000
timestamp: 00:00:14:240, filepos: 000001000
timestamp: 00:00:17:240, filepos: 000002800
timestamp: 00:00:22:360, filepos: 000004000
timestamp: 00:00:25:880, filepos: 000005800
timestamp: 00:00:32:800, filepos: 000007000
timestamp: 00:00:36:880, filepos: 000008800
timestamp: 00:00:45:240, filepos: 000009800
timestamp: 00:00:49:200, filepos: 00000b000
timestamp: 00:00:53:600, filepos: 00000c000
timestamp: 00:00:59:400, filepos: 00000e000
timestamp: 00:01:05:240, filepos: 00000f800
timestamp: 00:01:10:600, filepos: 000011000
timestamp: 00:01:16:400, filepos: 000012800
timestamp: 00:01:20:320, filepos: 000014000
timestamp: 00:01:28:760, filepos: 000015800
timestamp: 00:01:34:360, filepos: 000017000
timestamp: 00:01:40:240, filepos: 000018800
timestamp: 00:01:45:120, filepos: 000019800
timestamp: 00:01:49:800, filepos: 00001b000
timestamp: 00:01:54:200, filepos: 00001c800
timestamp: 00:01:58:480, filepos: 00001e000
timestamp: 00:02:02:480, filepos: 00001f000
timestamp: 00:02:05:840, filepos: 000020800
timestamp: 00:02:10:800, filepos: 000022000
timestamp: 00:02:14:240, filepos: 000023800
timestamp: 00:02:19:160, filepos: 000025000
timestamp: 00:02:24:000, filepos: 000026000
timestamp: 00:02:29:920, filepos: 000028000
timestamp: 00:02:40:720, filepos: 000029800
timestamp: 00:02:47:640, filepos: 00002b000
timestamp: 00:02:52:840, filepos: 00002c800
timestamp: 00:02:58:640, filepos: 00002d800
timestamp: 00:03:08:400, filepos: 00002f000
timestamp: 00:03:15:520, filepos: 000030800
timestamp: 00:03:22:760, filepos: 000031800
timestamp: 00:03:25:680, filepos: 000033000
timestamp: 00:03:28:080, filepos: 000034000
timestamp: 00:03:30:880, filepos: 000035800
timestamp: 00:03:37:400, filepos: 000036800
timestamp: 00:03:42:200, filepos: 000038800
timestamp: 00:03:46:160, filepos: 00003a000
timestamp: 00:03:51:120, filepos: 00003b000
timestamp: 00:03:54:880, filepos: 00003c800
timestamp: 00:04:23:880, filepos: 00003e000
timestamp: 00:04:29:880, filepos: 00003f800
timestamp: 00:04:37:120, filepos: 000040800
timestamp: 00:04:50:480, filepos: 000041800
timestamp: 00:04:57:520, filepos: 000043000
timestamp: 00:05:57:560, filepos: 000044000
timestamp: 00:06:03:240, filepos: 000045800
timestamp: 00:06:13:360, filepos: 000047000
timestamp: 00:06:17:240, filepos: 000048800
timestamp: 00:06:20:800, filepos: 00004a000
timestamp: 00:06:44:120, filepos: 00004b000
timestamp: 00:06:51:320, filepos: 00004c800
timestamp: 00:06:55:200, filepos: 00004e000
timestamp: 00:07:01:400, filepos: 00004f800
timestamp: 00:07:06:360, filepos: 000051000

But, when I try to add XSUB with DivXMux (with an AVI made with ffmpeg) like this:

DivXMux -v "Como se hizo. Entrevistas.avi"  -a (Audio)   "Como se hizo. Entrevistas.avi"  -s (Subtitle) "subs.idx" -o "Como se hizo. Entrevistas.avi"

I get this error:


But I found out that it works if I add a line with langidx: 0, between custom colors and id, just where there is an empty line (well, in Notepad++ this line has a "NUL" character).

I found here it seems that .idx files are always problematic when langidx line is missing, so it should be very useful if you could add that line to the .idx files.


@mbunkus mbunkus closed this Nov 20, 2016
edumj commented Nov 20, 2016


Have you also deleted that "NUL" carácter? If I copy all the text in the idx file, it gets truncated when arrives to that "NUL" thing, and if I replace some characters (like palette) or try to add another line, that "NUL" becomes "14:" I don't know why! And it spoils next line ("id: en") because it transforms to "14🆔 en" and so fails muxing.

mbunkus commented Nov 21, 2016

In a prior commit (22f2728) to the one already mentioned I actually did implement stripping trailing 0 bytes. They shouldn't be present in the first place. The application that was used to create your file should not have included them (mkvmerge doesn't write them).

mbunkus commented Nov 21, 2016

Meaning: the presence of that 0 byte wasn't really a fault of mkvetract but of the application creating that file. mkvmextract now contains a workaround for such bad behavior.

edumj commented Nov 30, 2016 edited

MediaInfo says that file was created with HandBrake 0.9.5

Ok, I'll try with next version (9.5.1?) Sorry, I'm in Windows and I supose I have to wait until someone publish that in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment