Skip to content

timothydodd/auto-mkv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoMk

Automated MakeMKV disc ripping with OMDB-based media identification and Plex-compatible file organization. .NET 10.0 console app for Windows and Linux.

What it does

  1. Watches optical drives for inserted discs
  2. Rips eligible titles with MakeMKV
  3. Identifies the content via OMDB (movie or multi-disc TV series)
  4. Renames and files output into a Plex-friendly structure
  5. Ejects the disc and waits for the next one

Prerequisites

  • .NET 10.0 SDK
  • OMDB API key — omdbapi.com
  • MakeMKV (licensed for Blu-ray) — ripping modes only
  • CD/DVD/Blu-ray drive — ripping modes only

Discover and Name mode needs only .NET and an OMDB key.

Setup

git clone https://github.com/yourusername/auto-mk.git
cd auto-mk
dotnet restore
dotnet build
dotnet run

Edit appsettings.json:

{
  "Rip": {
    "MakeMkvPath": "path/to/makemkvcon64.exe",
    "TempPath": "path/to/temp",
    "OutputPath": "path/to/output",
    "MinSizeGB": 3.0,
    "MaxSizeGB": 12.0,
    "MinTrackLength": "00:20:00"
  },
  "Omdb": {
    "ApiKey": "your-omdb-api-key",
    "ApiUrl": "http://www.omdbapi.com/"
  }
}

For development, store the API key in user secrets:

dotnet user-secrets set "Omdb:ApiKey" "your-api-key"

Modes

Automatic — Hands-off. Rips, identifies, organizes, ejects. TV series profiles are saved and reused across discs.

Manual — Confirm identification, pick tracks, map episodes yourself. No state reuse.

Bulk Rip — Choose Movies or TV Shows once, then rip discs back-to-back with zero prompts into a _bulk/ holding folder while a resumable queue (state/bulk_rip_queue.json) records each disc. Press ESC while waiting for a disc to name what you've ripped — interactive OMDB search, Plex rename, move into the library (and transfer if enabled). Quit any time and resume later; nothing is lost.

TV Series Profile Configuration — Pre-configure a series (episode size range, track sorting, double-episode handling, starting S/E, auto-increment). Sorting strategies:

  • ByTrackOrder — MakeMKV's track numbering
  • ByMplsFileName — source MPLS filename order
  • UserConfirmed — confirm each episode (enables pattern learning)

Discover and Name — Point at a directory of existing MKVs. For each file: identify via OMDB and rename, move as-is to _unidentified, or skip. No disc or MakeMKV needed.

Output layout

Movies/{Title} ({Year})/{Title} ({Year}).mkv
TV Shows/{Series}/Season {##}/{Series} - S##E## - {Episode Title}.mkv
_unidentified/{original-filename}.mkv

Testing without a disc

MakeMkvEmulator/ is a drop-in replacement for makemkvcon64 that plays back a configurable disc sequence. Point Rip.MakeMkvPath at the emulator binary and run AutoMk normally.

cd MakeMkvEmulator
dotnet build
cp examples/quick-test-example.json bin/Debug/net9.0/emulator-config.json

Example configs: tv-series-example.json, movie-example.json, quick-test-example.json. See MakeMkvEmulator/README.md for details.

HandbrakeScheduler integration

AutoMk can POST completed rips to HandbrakeScheduler for transcoding, preserving folder structure and media metadata.

{
  "Rip": {
    "EnableFileTransfer": true,
    "FileTransferSettings": {
      "Enabled": true,
      "TargetServiceUrl": "http://localhost:5000",
      "DeleteAfterTransfer": false
    }
  }
}

Flow: Disc → AutoMk rip → OMDB identify → HTTP upload → HandBrake transcode.

Building for multiple platforms

AutoMk is a single cross-platform .NET 10 build. The correct drive watcher (Windows WMI/IOCTL vs. Linux eject/DriveInfo) is selected at runtime via OperatingSystem.IsWindows(), so the same source builds and runs on both.

# Framework-dependent build (runs anywhere the .NET 10 runtime is installed)
dotnet build -c Release

# Self-contained single-file publish per target OS
dotnet publish -c Release -r win-x64   --self-contained -p:PublishSingleFile=true
dotnet publish -c Release -r linux-x64 --self-contained -p:PublishSingleFile=true

The project no longer pins a RuntimeIdentifier; pass -r at publish time.

Linux / Ubuntu notes

  • Install MakeMKV for Linux and set Rip.MakeMkvPath to makemkvcon (typically /usr/bin/makemkvcon). The first-run setup wizard pre-fills this.
  • Disc ejection shells out to the eject command — install it if missing: sudo apt install eject.
  • Drives are detected via .NET DriveInfo (CD-ROM mounts).

License

MIT — see LICENSE.

Acknowledgments

MakeMKV · OMDB · Plex · HandbrakeScheduler

About

Automated MakeMKV disc ripping with OMDB media identification and Plex-compatible file organization

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages