Difference between revisions of "MakeMKV"

From Indie IT Wiki
Line 42: Line 42:
 
'''Yes, it will compile against ffmpeg-4.4'''
 
'''Yes, it will compile against ffmpeg-4.4'''
  
* Current latest [http://ffmpeg.org/releases/?C=M;O=D ffmpeg] build = [http://ffmpeg.org/releases/ffmpeg-4.4.tar.bz2 4.4.0] or [http://ffmpeg.org/releases/ffmpeg-4.3.2.tar.bz2 4.3.2] or [http://ffmpeg.org/releases/ffmpeg-4.2.4.tar.gz 4.2.4] or [http://ffmpeg.org/releases/ffmpeg-4.1.6.tar.bz2 4.1.6]
+
* Current latest [http://ffmpeg.org/releases/?C=M;O=D ffmpeg] build = [http://ffmpeg.org/releases/ffmpeg-4.4.1.tar.bz2 4.4.1] or [http://ffmpeg.org/releases/ffmpeg-4.3.3.tar.bz2 4.3.3] or [http://ffmpeg.org/releases/ffmpeg-4.2.5.tar.gz 4.2.5] or [http://ffmpeg.org/releases/ffmpeg-4.1.8.tar.bz2 4.1.8]
* Current latest makemkv build = [http://www.makemkv.com/forum2/viewtopic.php?f=3&t=224 1.16.4] ([https://www.makemkv.com/download/ Release Notes])
+
* Current latest makemkv build = [http://www.makemkv.com/forum2/viewtopic.php?f=3&t=224 1.16.5] ([https://www.makemkv.com/download/ Release Notes])
  
 
  sudo apt-get install build-essential zlib1g-dev libssl-dev pkg-config libexpat1-dev libc6-dev libdvdnav4 libdvdread4 libudev-dev
 
  sudo apt-get install build-essential zlib1g-dev libssl-dev pkg-config libexpat1-dev libc6-dev libdvdnav4 libdvdread4 libudev-dev
Line 49: Line 49:
 
  mkdir makemkv
 
  mkdir makemkv
 
  cd makemkv/
 
  cd makemkv/
  wget <nowiki>http://ffmpeg.org/releases/ffmpeg-4.2.4.tar.bz2</nowiki>
+
  wget <nowiki>http://ffmpeg.org/releases/ffmpeg-4.4.1.tar.bz2</nowiki>
  tar -xjvf ffmpeg-4.2.4.tar.bz2
+
  tar -xjvf ffmpeg-4.4.1.tar.bz2
  cd ffmpeg-4.2.4/
+
  cd ffmpeg-4.4.1/
 
  make clean
 
  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
 
  ./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
Line 57: Line 57:
 
  make install
 
  make install
 
  cd ..
 
  cd ..
  wget <nowiki>http://www.makemkv.com/download/makemkv-oss-1.16.4.tar.gz</nowiki>
+
  wget <nowiki>http://www.makemkv.com/download/makemkv-oss-1.16.5.tar.gz</nowiki>
  tar -xzvf makemkv-oss-1.16.4.tar.gz
+
  tar -xzvf makemkv-oss-1.16.5.tar.gz
  cd makemkv-oss-1.16.4/
+
  cd makemkv-oss-1.16.5/
 
  make clean
 
  make clean
 
  CFLAGS="-std=gnu++11" PKG_CONFIG_PATH="/tmp/ffmpeg/lib/pkgconfig" ./configure --disable-gui
 
  CFLAGS="-std=gnu++11" PKG_CONFIG_PATH="/tmp/ffmpeg/lib/pkgconfig" ./configure --disable-gui
Line 65: Line 65:
 
  sudo make install
 
  sudo make install
 
  cd ..
 
  cd ..
  wget <nowiki>http://www.makemkv.com/download/makemkv-bin-1.16.4.tar.gz</nowiki>
+
  wget <nowiki>http://www.makemkv.com/download/makemkv-bin-1.16.5.tar.gz</nowiki>
  tar -xzvf makemkv-bin-1.16.4.tar.gz
+
  tar -xzvf makemkv-bin-1.16.5.tar.gz
  cd makemkv-bin-1.16.4/
+
  cd makemkv-bin-1.16.5/
 
  mkdir tmp
 
  mkdir tmp
 
  echo "accepted" > tmp/eula_accepted
 
  echo "accepted" > tmp/eula_accepted

Revision as of 16:36, 15 November 2021

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

2021-07-16

Yes, it will compile against ffmpeg-4.4

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.4.1.tar.bz2
tar -xjvf ffmpeg-4.4.1.tar.bz2
cd ffmpeg-4.4.1/
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.16.5.tar.gz
tar -xzvf makemkv-oss-1.16.5.tar.gz
cd makemkv-oss-1.16.5/
make clean
CFLAGS="-std=gnu++11" PKG_CONFIG_PATH="/tmp/ffmpeg/lib/pkgconfig" ./configure --disable-gui
make
sudo make install
cd ..
wget http://www.makemkv.com/download/makemkv-bin-1.16.5.tar.gz
tar -xzvf makemkv-bin-1.16.5.tar.gz
cd makemkv-bin-1.16.5/
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/