Site logo

iso2mkv - versatile convertor from DVD to XviD/vorbis MKV, on top of MPlayer/MEncoder

Contents:

Download iso2mkv, version 2011-05-02, 8 kB

This is a command line script: quite simple and easy to use, and fast, but is started in a terminal (don't be surprised).

iso2mkv is software for automated DVD to XviD/vorbis MKV video conversion. Gives almost total control on the process of video compression at maximum quality, while being simple and straightforward to use (a kind of 'life-hack'). The intended audience is advanced end-users and the script is not user-error-proof.

Based on mplayer, mencoder, oggenc or lame, and mkvmerge (if not properly installed, won't work). This is only a Bash 3 script that wraps the other programs. If you can watch the DVD with MPlayer, you can compress it with iso2mkv. Other used programs (hopefully included in most GNU/Linux distributions) are basename, bc, nice, stat. Recommended programs are normalize and dvdxchap (from 'ogmtools').

Under construction (alpha status). Without any warranty.

top

Features

(*) iso2mkv was the first MEncoder frontend ever to use the newly implemented, at the time still undocumented, XviD-quality-zones capability. :-)))

Things it currently can't do, but may be added in the future:

top

Options and settings

iso2mkv options

Main settings:

top

Advanced options

top

Multizone options - not extensively tested, will work only with latest MEncoder from CVS. Be carefull, errors in your command line may not generate a complaint. Attention, the options were modified/simplified in version 0.8.0:

top

Local config files. In the package you downloaded there is a sample config file that can be copied and edited in order to set some default options and no more enter them on the command line.

Please copy the "iso2mkv.conf" sample file in the directory "~/.mplayer/", or in the current working directory (where the program is started). The sample file is well documented and should be easy to set.

These local settings will be preserved in case of an upgrade. iso2mkv never writes to this file, it only reads from it. This should be especially usefull on BSDs as the 'stat' command for getting file sizes is different than on GNU/Linux, and the main script need no longer to be edited on every upgrade.

top

Other features -- control files. After each action, subtitle, audio, video pass, the program will ask you "Press 'Enter' to continue, 'Ctrl+C' to abort, 'q' to stop asking this question". There are 3 files that you can create in the output directory (where the files are written), to control the execution of the program, and override what may have been defined (-W) or replied here previously:

top

Sample command line

iso2mkv -o "./popeye" -d "/mnt/hda8/temp-rip/POPEYE_1938" -T 2 -a "en" -s "bg en fr" -t 703

This means that files will be saved (-o) to the current directory and will be named "popeye.mkv", "popeye.sub" etc. The DVD is in the directory "/mnt/hda8/temp-rip/POPEYE_1938" (where there is a dir VIDEO_TS and inside, some .VOBs, .IFOs). The second title (-T 2) will be processed, the English audio stream (-a "en") and for the subtitles (-s "bg en fr"), Bulgarian, English and French in that order. The total target size (-t) of the files (.mkv, .sub and .idx) will try not to go beyond 703 MBs. As nothing set, the selected audio stream "en" will be extracted and converted to ogg-vorbis at quality 4.

When you start the program, if you don't indicate "crop settings" (i.e. -c "720:416:0:80"), MPlayer will be launched with the command line -verbose -vf cropdetect on the chosen title, on the 45th second of the film. That way you can copy the crop settings (-vf crop) and remove the black lines above and below the film. You can also re-check the audio and subtitles' IDs.

You can change these settings. To start the real conversion, you have to add to the command line either -c "something" (crop set), or -C -c "something" (crop set, no need to test), or only -C (no crop, no need to test).

iso2mkv -o "./popeye" -d "/mnt/hda8/temp-rip/POPEYE_1938" -T 2 -a "en" -s "bg en fr" -t 703 -c "720:416:0:80"

Crop test. If you haven't set -C, MPlayer will be launched again, just to test and see the crop settings. Press "q" to close it. If it was OK, press Enter, else press Ctrl+C and change the command line.

Then the extraction beguins: first the subtitles (one after another), then the audio streams: extraction, normalization, compression to ogg-vorbis, then the two passes of the video encoding and finally the audio and video are merged in a big .MKV file.

Finally, the files that you need are "popeye.mkv", "popeye.sub" and "popeye.idx".

Sample command line for the VOB-mode (-V switch)

iso2mkv -o "./popeye" -d "/opt/rip/VIDEO_TS" -V "VTS*.VOB" -a "128 129" -s "0 1"

This means that one title of the DVD was ripped/decrypted (with vobcopy or dvdbackup) and the VOBs are /opt/rip/VIDEO_TS/VTS*.VOB; two audio streams (128 129) and two subtitles (0 1) will be added.

Compressing a MPEG to xvid.mkv

iso2mkv -o ./fld -d ../archive.org -V "The_Flying_Deuces.mpeg" -a 0 -U -v "2 --downmix" -b 600 -x "greyscale" -c "560:416:10:8"

I downloaded the film from archive.org. It is placed in "../archive.org/The_Flying_Deuces.mpeg". Output file will be "./fld.mkv". Extract the only audio stream (-a 0) on-the-fly (-U) directly to ogg-vorbis at quality (-v) 2 and downmixed to mono. Video bitrate (-b) 600 kbps in (-x) "greyscale". Cropped (-c).

top

License and lack of warranty

The text in the file 'iso2mkv' is distributed under the MIT license. Without any warranty. You can use it only if you read it, fully understand what you do and have legal rights to backup your DVDs and/or your MPEGs. In no event will the writer(s) be liable for your use of their text or for you not respecting any local law, like DADvSI for example.

top

Changelog

Brief list of major recent changes.

top

Usefull links

The great programs that are used by iso2mkv:

Other usefull software, enhancing your DVD-backup (if you "mirror" your DVD to a hard disk, it should be faster when you compress it with iso2mkv):

Other free software, similar to iso2mkv (please try them and use them, they are much better than iso2mkv for most actions and will suit most of the people):