Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I've got a file-to-file copy from a DVD, consisting of a Video_TS directory with a bunch of BUP, IFO and VOB files. I can open some (not all) of these files in a player like VLC, and it seems to contain fragments of the movie but it appears like garbage. As if the encoding or file structure is corrupted.

However, if I open the entire Video_TS dir with VLC, it plays fine.

Is there a way to convert this Video_TS dir to one single video file, such as an MP4 or MKV?

I've read about the possibility of binary concatenating the VOB files, and I tried that, but to no avail. Also I wouldn't know how to the determine the exact order of the VOB files, and more importantly that information must be within the files itself somehow (considering that video players can play it automatically).

(edit) Someone edited the question and removed the ffmpeg part. Sorry if I didn't clarify this further: I'm actually explicitly looking for a way to do this with ffmpeg (from shell, on macOS).

like image 822
RocketNuts Avatar asked Oct 05 '17 10:10

RocketNuts


People also ask

What program will play Video_TS files?

VLC users can play Video_TS files without burning them to DVD. The VLC media player supports the Video_TS format so that its users can play TS files without DVD.


Video Answer


1 Answers

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.

like image 155
user122574 Avatar answered Sep 16 '22 14:09

user122574