avconv grab DVD with chapter seperations - dvd_nav_packet
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 &gt; chapters.txt
$ dvdxchap --title 1 /media/cdrom/video_ts &gt; chapters.txt


Here's a sample output:

CHAPTER01=00:00:00.000
CHAPTER01NAME=Chapter 01
CHAPTER02=00:00:13.500
CHAPTER02NAME=Chapter 02
CHAPTER03=00:06:04.867
CHAPTER03NAME=Chapter 03
CHAPTER04=00:13:42.667
CHAPTER04NAME=Chapter 04
CHAPTER05=00:22:37.867
CHAPTER05NAME=Chapter 05
CHAPTER06=00:28:29.933
CHAPTER06NAME=Chapter 06
CHAPTER07=00:28:42.433
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