I have been reading many articles for many days, and finally I found a very useful question in superuser (What tool can I use to to rip DVD movies?)
I have a large original DVD's collection and they are now in ISO files (I want them for my own, just to learn languages), made with DVDShrink. I want to know what is the best way to get each movie in one folder containing:
- The Video in AVI format (or MPEG-4) (original video, don't mind angles) (NO audio)
- All Audio files in Mp3 format (Separate from video)
- All Subtitles in SRT format
So I can open the video with the language I want and the subtitle I want (No menus)
I think this is going to require less size than a 8Gb full copy (with same quality) Isn't it?.
Note: Better if I can do it in a Linux system, but don't mind it using a virtual windows for it =]
Thanks.
Best Answer
Ripping the DVD to an MKV file
I suggest you use Handbrake (free, cross platform, open source) to rip the DVDs to an MKV file which contains everything.
Handbrake will already:
Make sure you select Constant Quality for the video, and choose something between 18 and 28 for the quality. Lower means better, but you'll have to experiment on what looks good to you.
After you're done ripping, you can export the various tracks from the MKV file with FFmpeg. You can get a recent version by downloading a static build from the homepage. The static builds are always up-to-date, and if you're on Ubuntu, resist the temptation to use the one that comes with
apt-get
: It's terribly outdated.How the extraction works depends on how many audio and subtitle tracks your file has. To get this information later on, you can call
ffmpeg -i input.mkv
and look at the output.Here it says:
That's the video. Look further for audio—here are two audio tracks, one English, one German:
Finally, you might see subtitles. Here, they're german:
Now, let's extract them…
Extract video only
First, we'll create an empty video with no audio or subtitles. Here,
-an
disables the audio, and-sn
disables subtitles. Or leave out-sn
to keep the subtitles in.Your output file will only contain video. You could also change the container here, if you want:
Extract audio only
This depends on how many audio tracks there are. To create separate audio files, we can do the following, assuming there are two audio tracks. Again, we'll disable video and subtitle output.
As you can see, the index
0
and1
specify the first and second audio tracks. If you have more, modify the command as needed and add another line.Extract subtitles only
To get the subtitles, we'll follow a similar approach—assuming there is one subtitle track:
Or, if there are multiple subtitle tracks: