Convert a DVD VIDEO_TS dir to a single mp4 or mkv file?

While this answer is quite late, I just ran into this the other day. Often, with FFmpeg you can try doing cat *.VOB >out.vob or similar, but that didn't work for me. However, with HandBrakeCLI (the command line version) I was able to get it working by using the --main-feature option.

HandBrakeCLI -i VIDEO_TS --main-feature -o mynewvid.mkv

This worked perfectly. When I didn't use the --main-feature option, it didn't work.