MakeMKV

From Indie IT Wiki
Jump to: navigation, search

Download Old Versions

https://makemkv.com/download/old/

Version History

http://www.makemkv.com/download/history.html

Installation

Determine location of DVD as block device...

cat /proc/sys/dev/cdrom/info
ls -lah /dev/dvd
lsblk

Install the DVD region setting software...

sudo apt install regionset

Run the software on the DVD block device...

sudo regionset /dev/dvd
 
regionset version 0.1 -- reads/sets region code on DVD drives
Current Region Code settings:
RPC Phase: II
type: NONE
vendor resets available: 4
user controlled changes resets available: 5
drive plays discs from region(s):, mask=0xFF

Would you like to change the region setting of your drive? [y/n]:y
Enter the new region number for your drive [1..8]:2
New mask: 0xFFFFFFFD, correct? [y/n]:y
Region code set successfully!

Now, continue with MakeMKV installation...

2020-04-17

sudo apt-get install build-essential zlib1g-dev libssl-dev pkg-config libexpat1-dev libc6-dev libdvdnav4 libdvdread4 libudev-dev
cd ~/Downloads/
mkdir makemkv
cd makemkv/
wget http://ffmpeg.org/releases/ffmpeg-4.2.2.tar.bz2
tar -xjvf ffmpeg-4.2.2.tar.bz2
cd ffmpeg-4.2.2/
make clean
./configure --prefix=/tmp/ffmpeg --enable-gpl --enable-nonfree --enable-static --disable-shared --enable-pic --disable-x86asm --disable-all --disable-autodetect --disable-everything --enable-swresample --enable-avcodec --enable-encoder=flac,aac,ac3,ac3_fixed --enable-libfdk-aac --enable-decoders
make
make install
cd ..
wget http://www.makemkv.com/download/makemkv-oss-1.15.1.tar.gz
tar -xzvf makemkv-oss-1.15.1.tar.gz
cd makemkv-oss-1.15.1/
make clean
PKG_CONFIG_PATH=/tmp/ffmpeg/lib/pkgconfig ./configure --disable-gui
make
sudo make install
cd ..
wget http://www.makemkv.com/download/makemkv-bin-1.15.1.tar.gz
tar -xzvf makemkv-bin-1.15.1.tar.gz
cd makemkv-bin-1.15.1/
mkdir tmp
echo "accepted" > tmp/eula_accepted
make
sudo make install
sudo ldconfig
cd
makemkvcon

Thanks - http://www.makemkv.com/forum2/viewtopic.php?f=3&t=15122

Thanks - http://www.makemkv.com/forum2/viewtopic.php?f=3&t=224

Settings for Automation

http://www.makemkv.com/forum2/viewtopic.php?f=10&t=4386

~/.MakeMKV/settings.conf

app_DefaultSelectionString = "-sel:all,+sel:audio&(eng),-sel:(havemulti),-sel:mvcvideo,+sel:subtitle&(eng),-sel:special,=100:all,-10:eng"
  • deselect everything
  • select english audio
  • deselect different angles
  • deselect 3d
  • select english subtitles
  • deselect special features
  • prioritise english

Copy Entire DVD

makemkvcon mkv disc:0 all /path/to/output/

Copy Selected Tracks From DVD

Find tracks on disc...

$ lsdvd
Disc Title: BBCDVD1368
Title: 01, Length: 00:00:00.480 Chapters: 01, Cells: 01, Audio streams: 00, Subpictures: 00
Title: 02, Length: 00:27:25.320 Chapters: 06, Cells: 06, Audio streams: 03, Subpictures: 00
Title: 03, Length: 01:29:36.480 Chapters: 19, Cells: 19, Audio streams: 01, Subpictures: 01
Title: 04, Length: 00:29:51.480 Chapters: 07, Cells: 07, Audio streams: 01, Subpictures: 01
Title: 05, Length: 00:30:17.480 Chapters: 07, Cells: 07, Audio streams: 01, Subpictures: 01
Title: 06, Length: 00:29:28.480 Chapters: 07, Cells: 07, Audio streams: 01, Subpictures: 01
Title: 07, Length: 00:29:22.000 Chapters: 06, Cells: 06, Audio streams: 01, Subpictures: 01
Title: 08, Length: 00:01:26.560 Chapters: 01, Cells: 01, Audio streams: 01, Subpictures: 00

Slightly annoying, but in the example above, there is one huge track that we don't want.

Also, makemkv starts counting from 0 from the first track that's more than 120 seconds, so to copy just the tracks we want, start counting from 0.

In this example, we would want tracks (according to makemkv) 0 2 3 4 5...

for n in 0 2 3 4 5; do makemkvcon mkv disc:0 $n /path/to/output/; done;

Copy Blu-ray For Plex

http://wiki.indie-it.com/wiki/FFmpeg_DVD#Blu-ray_Copying_Transcoding

LibreDrive

https://2mkv.com/forum/viewtopic.php?f=19&t=18856

UHD Hashed Keys

https://www.makemkv.com/forum/viewtopic.php?f=12&t=16959

Script to Rip ISO Longest Title

#!/bin/bash
# ~/Bin/makemkv_rip_longest_iso.sh "/path/to/file.iso"

# Get the minimum length. This ensures that only the longest title goes to MKV.
long_title=$(makemkvcon -r info iso:"$1" | grep cell | awk '{ print $7 }' | tr -d ')","Title' | sort -nr | head -n1 | awk -F: '{print ($1 * 3600) + ($2 * 60) + $3}')

# show lenth in seconds
echo "length=${long_title}"

# Rip DVD
makemkvcon --minlength="$long_title" --decrypt --directio=true mkv iso:"$1" all /tmp/ | egrep -i 'added|saving|saved'

exit;

Script to Rip Disc Longest Title DVD

#!/bin/bash
# ~/Bin/makemkv_rip_longest.sh

# Get the minimum length. This ensures that only the longest title goes to MKV.
long_title=$(makemkvcon -r info disc:0 | grep cell | awk '{ print $7 }' | tr -d ')","Title' | sort -nr | head -n1 | awk -F: '{print ($1 * 3600) + ($2 * 60) + $3}')

# show lenth in seconds
echo "length=${long_title}"

# Rip DVD
makemkvcon --minlength="$long_title" --decrypt --directio=true mkv disc:0 all /tmp/ | egrep -i 'added|saving|saved'

exit;

Advanced Command Line

makemkvcon --robot info disc:0
makemkvcon --minlength=3600 mkv disc:0 0 /tmp/
makemkvcon mkv iso:/path/to/filename.iso 0 /tmp/

http://www.makemkv.com/developers/usage.txt

Backup Decrypted Blu-ray

makemkvcon backup --decrypt --cache=16 --noscan disc:0 /folder/

Disc Access Mode

There are 2 ways to read the disc: direct access, os level access

Sometimes you may receive an error with a poorly produced, probably quite old DVD...

Error 'Scsi error - ILLEGAL REQUEST:READ OF SCRAMBLED SECTOR WITHOUT AUTHENTICATION'

You can either try to ignore this, and makeMKV will produce a MKV file anyway after a long time, or you can try and run the command line option below which will use 'os level access mode' and disable 'direct access mode'...

makemkvcon --directio=false mkv disc:0 0 /tmp/