I am trying to grab my DVD into an mkv-Container without loosing the predefined chapters on the DVD disk. I suppose, the chapter information is in the "Stream #0:0[0x1bf]: Data: dvd_nav_packet" track - right? Anyhow the Stream is not supprted by avconv... see last line

adi@venus /media/cdrom/video_ts $ ls
video_ts.bup  vts_01_0.vob  vts_02_1.vob  vts_04_0.bup  vts_05_0.ifo  vts_06_0.vob  vts_07_1.vob  vts_09_0.bup  vts_10_0.ifo  vts_10_4.vob  vts_11_0.vob  vts_12_1.vob  vts_14_0.bup
video_ts.ifo  vts_01_1.vob  vts_03_0.bup  vts_04_0.ifo  vts_05_0.vob  vts_06_1.vob  vts_08_0.bup  vts_09_0.ifo  vts_10_0.vob  vts_10_5.vob  vts_11_1.vob  vts_13_0.bup  vts_14_0.ifo
video_ts.vob  vts_02_0.bup  vts_03_0.ifo  vts_04_0.vob  vts_05_1.vob  vts_07_0.bup  vts_08_0.ifo  vts_09_0.vob  vts_10_1.vob  vts_10_6.vob  vts_12_0.bup  vts_13_0.ifo  vts_14_0.vob
vts_01_0.bup  vts_02_0.ifo  vts_03_0.vob  vts_04_1.vob  vts_06_0.bup  vts_07_0.ifo  vts_08_0.vob  vts_09_1.vob  vts_10_2.vob  vts_11_0.bup  vts_12_0.ifo  vts_13_0.vob  vts_14_1.vob
vts_01_0.ifo  vts_02_0.vob  vts_03_1.vob  vts_05_0.bup  vts_06_0.ifo  vts_07_0.vob  vts_08_1.vob  vts_10_0.bup  vts_10_3.vob  vts_11_0.ifo  vts_12_0.vob  vts_13_1.vob  
adi@venus /media/cdrom/video_ts $ avprobe vts_10_1.vob 
ffprobe version 3.2.10-1~deb9u1 Copyright (c) 2007-2018 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18) 20170516
  configuration: --prefix=/usr --extra-version='1~deb9u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
Input #0, mpeg, from 'vts_10_1.vob':
  Duration: 00:17:09.44, start: 0.287267, bitrate: 8340 kb/s
    Stream #0:0[0x1bf]: Data: dvd_nav_packet
    Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 8000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:2[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Unsupported codec with id 100357 for input stream 0

The important files for me are merged vts_10_1.vob...vts_10_6.vob. In other words:

for var in {1..6}; do cat vts_10_$var.vob >> total.vob; done #concatenate the files

and afterwards encode total.vob with avconv.


  1. Where are the chapter marks saved and how to include them in the mkv?
  2. How can I see the content of "dvd_nav_packet"?
  3. How can I definde my own chapters in a video-file? Is it a kind of a text-file in the container?


1 Answer 1


The chapter marks are part of the DVD metadata that's on the disc (or its ripped contents). It's not contained in the nav packets.

If you want to get the chapters, you're going to have to use a separate application to get them out. There's two applications that I know of that can do it -- dvd_info (which I wrote, see github) and ogmtools.

mkvmerge supports two chapter formats -- the spec one of the XML with lots of detailed information in it, or the simplified OGM format designed for that container, which is a simple chapter name + start time format on each line. I recommend using that one.

Using those two apps, here's how, assuming you're using track 1.

$ dvd_info --ogm -t 1 /media/cdrom/video_ts > chapters.txt
$ dvdxchap --title 1 /media/cdrom/video_ts > chapters.txt

Here's a sample output:

CHAPTER01NAME=Chapter 01
CHAPTER02NAME=Chapter 02
CHAPTER03NAME=Chapter 03
CHAPTER04NAME=Chapter 04
CHAPTER05NAME=Chapter 05
CHAPTER06NAME=Chapter 06
CHAPTER07NAME=Chapter 07

I don't know how to get the chapter metadata in a matroska file using libav directly, or if it even supports doing that, but mkvmerge certainly can.

$ mkvmerge -o track1.mkv --chapters chapters.txt track1.vob

On a side note, if you don't want to cat the VOBs into one giant file, you can use dvd_copy to extract it and dump it directly into a MKV. You'd still have to mux in the chapters, but it would skip the step of having to use cat. Note that I've only tested this with libav:

$ dvd_copy -t 1 /media/cdrom/video_ts -o - | avconv -i - -codec copy dvd.mkv
  • Where do you get dvd_copy? I can't find it using file search on packages.ubuntu.com and having such a generic name google is not much help.
    – soger
    Commented Dec 21, 2018 at 11:16
  • Never mind I found it, it's in your github project (beandog/dvd_info).
    – soger
    Commented Dec 21, 2018 at 11:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.