Package: makemkv
python-makemkvpython-makemkv is a simple python wrapper forMakeMKV(written by
GuinpinSoft inc.). While it can be imported as a module, it also offers
a command-line interface that tries to be more intuitive thanmakemkvcon.Requirementspython-makemkv requires Python 3.9 or later.Additionally, a copy of MakeMKV is required, which can be downloaded
from theirwebsite. If MakeMKV isn't installed at the default location, you also need to ensure
thatmakemkvconcan be run from the terminal, e. g. by adding its
location to your PATH environment variable.Installationpython-makemkv can be installed using pip.pip install makemkvIf you want to use the CLI, you need to install it withpip install makemkv[cli]or installclickandrichmanually.UsageSee full documentation onRead the
Docs.To get information about discs, you need to instantiate amakemkv.MakeMKVobject which provides itsmakemkv.MakeMKV.info()method.frompprintimportppfrommakemkvimportMakeMKVmakemkv=MakeMKV('/dev/sr0')disc_info=makemkv.info()pp(disc_info)To create a mkv file from the first title of the first disc you can usemakemkv.MakeMKV.mkv(). Since this will take some time you can define a
function that analyzes the program's progress or you can use themakemkv.ProgressParserclass to show pretty progress bars
(this requiresrichto be installed).frommakemkvimportMakeMKV,ProgressParserwithProgressParser()asprogress:makemkv=MakeMKV(0,progress_handler=progress.parse_progress)makemkv.mkv(0,'~/Videos/Really Cool Movie (2021)')python-makemkv uses theloggingmodule from Python's standard library,
seeLogging HOWTOto change
the output format or verbosity. To change the verbosity of specific
messages, you can modify themakemkv.output_codes.MESSAGE_CODESdictionary accordingly. If you think that the log level of a specific
message isn't appropriate for most users, feel free to open an issue or a
pull request.Command-line interfaceUsage: pymakemkv COMMAND [OPTIONS]

Options:
  -n, --disc-nr NR      Specify disc number. Alternatively you can specify an
                        input with -i/--input. Defaults to 0.
  -i, --input PATH      Specify input, can be either a device, a .IFO file or
                        a VIDEO_TS folder.
  -l, --minlength SECS  Specify minimum title length in seconds.
  -c, --cache MB        Specify size of read cache in megabytes.
  -f, --info-file FILE  Write disc info to file.
  -j, --json            Show disc info in JSON format.
  -v, --verbose         Show more detailed logs.
  -q, --quiet           Don't show logs.
  --no-bar              Don't show progress bars.
  --no-info             Don't show disc info.
  --help                Show this message and exit.
  -t, --title NR        Select title to be ripped, can be either an integer
                        starting with 0 or the keyword "all". Defaults to 0.
                        [Commands: mkv]
  -o, --output DIR      Specify output directory for created mkv files.
                        Defaults to current directory. [Commands: mkv, backup]
  -d, --decrypt         Decrypt stream files during backup. [Commands: backup]

Commands:
  backup  Backup whole disc.
  info    Display information about a disc.
  mkv     Copy titles from disc.ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please usenoxto format, lint, type-check and test your code by callingnoxin your project directory.LicenseThis project is licensed under the MIT License.SeeLICENSEfor more information.