13
votes

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).

2
The VOBs contain the media data but upfront, menus and other sections are likely present. Handbrake will allow you to select the portions/titles you want and convert it.Gyan
@Mulvya Thanks, but if I'm not mistaken Handbrake is a GUI tool. Would you also happen to know if this is possible with ffmpeg? (from the shell, i.e. as part of a script)RocketNuts
Do not put tags in your title.Rob
Handbrake has a CLI version - handbrake.fr/downloads2.php. ffmpeg can't locate where the main program title starts. It will show you the streams, and then you'll have to manually identify the start point, by playing a bit using ffplay.Gyan
@Mulvya Thanks, I'm gonna check that out!RocketNuts

2 Answers

18
votes

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.

0
votes

I was surprised that VLC can actually do it :) Go to Media -> Convert/Save

enter image description here

It will convert files one by one, however, so you'll need to concatenate them afterwards