mkvmerge does not identify vobsub stream #1854

tarrasque73 opened this Issue Jan 13, 2017 · 8 comments


None yet

3 participants


I have a mkv file with 1 video stream, 2 audio streams and 1 vobsub stream.

Using mkvmerge v9.4.2 ('So High') 32bit on windows it seems that it's unable to identify the vobsub stream, and consequently when splitting or manipulating the file it is discarded.

Ffprobe has no problems detecting the stream.

output of ffprobe test.mkv (just omitting chapters and unnecessary metadata for brevity):

ffprobe version N-72383-g7206b94 Copyright (c) 2007-2015 the FFmpeg developers
built with gcc 4.9.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmfx --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
libavutil 54. 26.100 / 54. 26.100
libavcodec 56. 41.100 / 56. 41.100
libavformat 56. 33.101 / 56. 33.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 16.101 / 5. 16.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, matroska,webm, from 'test.mkv':
ENCODER : Lavf56.33.101
Duration: 00:11:36.72, start: 0.000000, bitrate: 995 kb/s
Stream #0:0(ita): Video: hevc (Main), yuv420p(tv), 720x576 [SAR 16:15 DAR 4:3], 25 fps, 25 tbr, 1k tbn, 25 tbc (default)
ENCODER : Lavc56.41.100 libx265
Stream #0:1: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s (default)
Stream #0:2(jpn): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:3(ita): Subtitle: dvd_subtitle

output of: mkvmerge.exe --identify test.mkv

File 'test.mkv': container: Matroska
Track ID 0: video (MPEG-H/HEVC/h.265)
Track ID 1: audio (AC-3/E-AC-3)
Track ID 2: audio (AC-3/E-AC-3)
Chapters: 15 entries
Global tags: 1 entry
Tags for track ID 0: 2 entries
Tags for track ID 2: 1 entry

mbunkus commented Jan 13, 2017

Please try again with the current version, v9.7.1.

mbunkus commented Jan 15, 2017

So… did you give v9.7.1 a try? If v9.7.1 still doesn't detect the subtitles, then please upload the file to my FTP server so that I can take a look at the issue.


Unfortunately, it still does not work.

I'll upload a sample file on the FTP server as soon as I can.

ffprobe can detect 4 streams in it: 1 HEVS video, 2 AC3 audio and 1 dvd_subtitle.

mkvmerge only identifies the first 3.

The file was generated with ffmpeg from a VOB file ripped from a DVD I own with mplayer.

Thank you very much for your work and your support.

mbunkus commented Jan 18, 2017

The problem is likely that ffmpeg doesn't write a CodecPrivate element for VobSub streams (CodecPrivate contains what the .idx file contains for external VobSubs). mkvmerge currently requires that to be present, otherwise a VobSub track will be skipped.

mbunkus commented Jan 21, 2017

What about that sample file?

Or can you at least show me the ffmpeg command line you've used to create such a file? Maybe I can reproduce it that way.

mkver commented Jan 21, 2017

I have just created two such sample files. It's actually quite easy: One just needs to remux a vob file (one in which ffmpeg detecs vobsubs). Therefore my command line was:
ffmpeg -i vts_01_2.vob -vn -an -c:s copy result.mkv
(Trying to remux to result.mks doesn't work for me, because apparently only mkv and mka (and probably webm)-files are Matroska in ffmpeg's eyes.)
The resulting vobsubs lack the codec private data and opening them with SubtitleEdit shows the palette to be missing as expected. They don't work with MKVToolNix either (the only thing recognised in such a file are ffmpeg's tags).

mbunkus commented Jan 21, 2017

Thanks. I had tried that myself earlier, but including audio and video streams instead of leaving them out like you did. In my case ffmpeg failed due to something with timestamps and its Matroska muxer not coping… I'll try without the audio & video tracks.

mkver commented Jan 21, 2017

The "timestamps are unset"-error can usually be solved by adding -fflags genpts as an input option (i.e. before -i). (The exception are avi-inputs: Because the video for windows system does not differentiate between pts and dts, pts in avi are unset (for ffmpeg). Adding this flag means that you don't get an error from ffmpeg, but you don't get a valid file, because it will simply set pts=dts.)

@mbunkus mbunkus added a commit that referenced this issue Jan 22, 2017
@mbunkus mkvmerge: VobSub: use default index for tracks read from Matroska mis…
…sing CodecPrivate

The default palette used will not look good in most of the cases, but
it's hard to guess a palette and pretty much impossible without actually
decoding a lot of the packets.

Implements #1854.
@mbunkus mbunkus closed this Jan 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment