Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

A DVD file layout has a directory named "VIDEO_TS" which contains a variety of files. These files can include multiple video and audio channels, subtitles, and menu structure (UI).

Is there a format than can contain all of these, but in a single file? Can this format do this without losing video quality? What about retaining the menu? Maybe even retaining subtitle and commentary tracks? How do I do it (command)?

[note] These aren't hard requirements. I'm just looking for something that can handle more than just audio/video.

share|improve this question

2 Answers 2

up vote 9 down vote accepted

The only way to do everything you ask is to rip a disk image of the DVD and then play the image. Any other process which doesn't preserve the exact format of the disk will likely remove one or more of the features you're after because DVD is a very specific variant of the MPEG-2 standard. DVD player programs — which you still have to use to interpret the menu information — often depend on their input following the standard closely.

There are lots of ways to rip a DVD image, enough that it's worth a separate question. A quick and dirty way to do it is from the command line:

$ dd if=/dev/scd0 of=my-movie.iso bs=2048

Obviously you must substitute the correct DVD drive dev node for scd0 if that is not correct on your system.

Some media players can play ISO files directly, such as VLC and MPlayer.

If you want to use a player that can't open ISO files itself, you can mount an ISO disk image as a virtual DVD. This is indistinguishable from a real DVD, from the player's perspective. I assume you are using Linux, where you use the loop device for this:

$ mkdir -p $HOME/virtualdvd
$ mount -t iso9660 -o loop my-movie.iso $HOME/virtualdvd

Depending on the permissions on /dev/loop?, you might have to be root (or use sudo) to do the second step. Some Linuxes have their permissions set up in a way that lets you add a user to the group that can create loopback devices without being root.

Having done this, you point your DVD player program at that virtualdvd directory.

Other *ixes usually have an equivalent mechanism to Linux's loop device, which may work a little differently.

If you can give up the interactive menu requirement, I recommend Handbrake, which gives you a file containing:

  • The movie, encoded as:

    • H.264, MPEG-4 or MPEG-2 video

    • HE-AAC, AAC, AC3, or MP3 audio

    ...in either an Matroska (MKV) or an MPEG-4 part 14 (MP4) container

  • Subtitles, if you want them

  • As many of the audio tracks as you want. You can elect to strip the ones you don't want, such as the stereo downmix and the foreign language tracks.

  • Chapter marks. You won't have the menus to guide you to the chapters, but your player program will at least let you jump between scenes.

You can also ask Handbrake to rip any "extras" on the disc into separate files. If it were really important to have them in the same file as the movie, you could later concatenate them with the movie file.

Handbrake has device profiles to automatically limit bit rate, frame size, encoding complexity and such to ensure that the resulting file will play on your device of choice.

share|improve this answer
    
doesn't mkv container have the ability to handle multiple streams? –  Tshepang Jan 7 '11 at 9:55
    
Sure, but that doesn't get you DVD menus. –  Warren Young Jan 7 '11 at 20:27
    
I've clarified my question. –  Tshepang Jan 11 '11 at 23:02
    
I have also heard that MKV can containg menus too. –  Ivan Apr 23 '13 at 21:27

Checkout the ripper.sh script supplied with x264 transcode. From the README:

To create an iso from a disk you own, edit DEFAULT_ISO_STORAGE and DEFAULT_DVD_RIPPING_DEVICE in the config and run:

 ripper.sh

The script takes care of 'unlocking' the drive, such that the resulting .iso does not include any CSS crap (just running dd is not enough).

With this method you get one file, retain the menu, all tracks and all subtitles.

share|improve this answer
    
Nice answer, but it's for a different question: "How to rip a DVD?" –  Tshepang Jan 11 '11 at 22:35
    
You asked 'How to re-encode a DVD into a single file?' - thus you have to somehow extract/rip your DVD disc? Or did you mean 'How to re-encode a DVD-image file into a single file?' Then you should phrase your question different - but this would not make much sense. Btw, when I think about it - re-encoding some mpeg stuff without losing quality is simply impossible. –  maxschlepzig Jan 11 '11 at 22:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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