Hewwo! I've created a Python library for interacting with MakeMKV. This library allows lower level access into MakeMKV's API's via makemkvcon's ABI which is usually utilized for the GUI. This means that more information can be gathered from both the disc and drive than by makemkvcon's CLI alone; basically any information that's available via the GUI is available via this library. This library also enables finer grain controls over the ripping process. These two features combined means that much more complex ripping logic can be written for automating large collection rips.
In the repo, I included an example script (example.py) which utilizes upper/lower bound duration cutoffs to detect which titles on a disc are episodes of a TV show as opposed to behind the scenes content/the whole playlist. An example run is below:
Code: Select all
$ python3 example.py
MakeMKV version: v1.17.5
MakeMKV platform: linux(x64-release)
MakeMKV build: 999
Interface language: eng:English
Waiting for disc...
Waiting for titles...
Title Tree:
The Good Place Season One: Disc One
├─ ✅ The Good Place Season One: Disc One - 0:42:42, 9 chapter(s), 9.7 GB
│ ├─ Chapters
│ │ ├─ Chapter 01 - 0:00:00
│ │ ├─ Chapter 02 - 0:03:16
│ │ ├─ Chapter 03 - 0:09:36
│ │ ├─ Chapter 04 - 0:20:38
│ │ ├─ Chapter 05 - 0:22:44
│ │ ├─ Chapter 06 - 0:29:35
│ │ ├─ Chapter 07 - 0:36:58
│ │ ├─ Chapter 08 - 0:41:04
│ │ └─ Chapter 09 - 0:42:00
│ └─ Tracks
│ ├─ ✅ Video - Mpeg4 AVC High@L4.1
│ ├─ ✅ Audio - DTS-HD Master Audio
│ ├─ ✅ Audio - DTS
│ ├─ ✅ Audio - Dolby Digital
│ ├─ ✅ Subtitles - HDMV PGS Subtitles
│ ├─ ✅ Subtitles - HDMV PGS Subtitles
│ └─ ✅ Attachment - image/jpeg
├─ ✅ The Good Place Season One: Disc One - 0:24:54, 6 chapter(s), 7.1 GB
│ ├─ Chapters
│ │ ├─ Chapter 01 - 0:00:00
│ │ ├─ Chapter 02 - 0:02:09
│ │ ├─ Chapter 03 - 0:06:14
│ │ ├─ Chapter 04 - 0:15:15
│ │ ├─ Chapter 05 - 0:21:34
│ │ └─ Chapter 06 - 0:24:02
│ └─ Tracks
│ ├─ ✅ Video - Mpeg4 AVC High@L4.1
│ ├─ ✅ Audio - DTS-HD Master Audio
│ ├─ ✅ Audio - DTS
│ ├─ ✅ Subtitles - HDMV PGS Subtitles
│ ├─ ✅ Subtitles - HDMV PGS Subtitles
│ └─ ✅ Attachment - image/jpeg
├─ ✅ The Good Place Season One: Disc One - 0:22:33, 6 chapter(s), 6.4 GB
│ ├─ Chapters
│ │ ├─ Chapter 01 - 0:00:00
│ │ ├─ Chapter 02 - 0:02:22
│ │ ├─ Chapter 03 - 0:08:37
│ │ ├─ Chapter 04 - 0:16:04
│ │ ├─ Chapter 05 - 0:20:30
│ │ └─ Chapter 06 - 0:21:42
│ └─ Tracks
│ ├─ ✅ Video - Mpeg4 AVC High@L4.1
│ ├─ ✅ Audio - DTS-HD Master Audio
│ ├─ ✅ Audio - DTS
│ ├─ ✅ Subtitles - HDMV PGS Subtitles
│ ├─ ✅ Subtitles - HDMV PGS Subtitles
│ └─ ✅ Attachment - image/jpeg
├─ ✅ The Good Place Season One: Disc One - 0:26:18, 6 chapter(s), 7.5 GB
│ ├─ Chapters
│ │ ├─ Chapter 01 - 0:00:00
│ │ ├─ Chapter 02 - 0:01:42
│ │ ├─ Chapter 03 - 0:09:07
│ │ ├─ Chapter 04 - 0:15:57
│ │ ├─ Chapter 05 - 0:19:56
│ │ └─ Chapter 06 - 0:25:27
│ └─ Tracks
│ ├─ ✅ Video - Mpeg4 AVC High@L4.1
│ ├─ ✅ Audio - DTS-HD Master Audio
│ ├─ ✅ Audio - DTS
│ ├─ ✅ Subtitles - HDMV PGS Subtitles
│ ├─ ✅ Subtitles - HDMV PGS Subtitles
│ └─ ✅ Attachment - image/jpeg
├─ ✅ The Good Place Season One: Disc One - 0:26:21, 6 chapter(s), 7.5 GB
│ ├─ Chapters
│ │ ├─ Chapter 01 - 0:00:00
│ │ ├─ Chapter 02 - 0:02:04
│ │ ├─ Chapter 03 - 0:10:25
│ │ ├─ Chapter 04 - 0:18:27
│ │ ├─ Chapter 05 - 0:23:37
│ │ └─ Chapter 06 - 0:25:30
│ └─ Tracks
│ ├─ ✅ Video - Mpeg4 AVC High@L4.1
│ ├─ ✅ Audio - DTS-HD Master Audio
│ ├─ ✅ Audio - DTS
│ ├─ ✅ Subtitles - HDMV PGS Subtitles
│ ├─ ✅ Subtitles - HDMV PGS Subtitles
│ └─ ✅ Attachment - image/jpeg
├─ ❎ The Good Place Season One: Disc One - 2:04:22, 34 chapter(s), 35.7 GB
│ ├─ Chapters
│ │ ├─ Chapter 01 - 0:00:00
│ │ ├─ Chapter 02 - 0:02:09
│ │ ├─ Chapter 03 - 0:06:14
│ │ ├─ Chapter 04 - 0:15:15
│ │ ├─ Chapter 05 - 0:21:34
│ │ ├─ Chapter 06 - 0:24:02
│ │ ├─ Chapter 07 - 0:24:53
│ │ ├─ Chapter 08 - 0:24:54
│ │ ├─ Chapter 09 - 0:27:17
│ │ ├─ Chapter 10 - 0:33:31
│ │ ├─ Chapter 11 - 0:40:59
│ │ ├─ Chapter 12 - 0:45:24
│ │ ├─ Chapter 13 - 0:46:36
│ │ ├─ Chapter 14 - 0:47:26
│ │ ├─ Chapter 15 - 0:47:27
│ │ ├─ Chapter 16 - 0:49:10
│ │ ├─ Chapter 17 - 0:56:35
│ │ ├─ Chapter 18 - 1:03:25
│ │ ├─ Chapter 19 - 1:07:24
│ │ ├─ Chapter 20 - 1:12:55
│ │ ├─ Chapter 21 - 1:13:45
│ │ ├─ Chapter 22 - 1:13:46
│ │ ├─ Chapter 23 - 1:15:50
│ │ ├─ Chapter 24 - 1:24:11
│ │ ├─ Chapter 25 - 1:32:13
│ │ ├─ Chapter 26 - 1:37:23
│ │ ├─ Chapter 27 - 1:39:16
│ │ ├─ Chapter 28 - 1:40:07
│ │ ├─ Chapter 29 - 1:40:08
│ │ ├─ Chapter 30 - 1:41:53
│ │ ├─ Chapter 31 - 1:47:38
│ │ ├─ Chapter 32 - 1:55:08
│ │ ├─ Chapter 33 - 2:00:47
│ │ └─ Chapter 34 - 2:03:30
│ └─ Tracks
│ ├─ ❎ Video - Mpeg4 AVC High@L4.1
│ ├─ ❎ Audio - DTS-HD Master Audio
│ ├─ ❎ Audio - DTS
│ ├─ ❎ Subtitles - HDMV PGS Subtitles
│ ├─ ❎ Subtitles - HDMV PGS Subtitles
│ └─ ❎ Attachment - image/jpeg
└─ ✅ The Good Place Season One: Disc One - 0:24:14, 6 chapter(s), 6.9 GB
├─ Chapters
│ ├─ Chapter 01 - 0:00:00
│ ├─ Chapter 02 - 0:01:45
│ ├─ Chapter 03 - 0:07:30
│ ├─ Chapter 04 - 0:14:59
│ ├─ Chapter 05 - 0:20:39
│ └─ Chapter 06 - 0:23:22
└─ Tracks
├─ ✅ Video - Mpeg4 AVC High@L4.1
├─ ✅ Audio - DTS-HD Master Audio
├─ ✅ Audio - DTS
├─ ✅ Subtitles - HDMV PGS Subtitles
├─ ✅ Subtitles - HDMV PGS Subtitles
└─ ✅ Attachment - image/jpeg
Saving selected titles...
/home/dex/Videos/The Good Place Season One- Disc One_t06.mkv: 100%|███████████████████████████▉| 65516/65536 [1:14:10<00:01, 14.72it/s, 7.6 M/s [1.7X] [SAFE]]