A .NET 10.0 console application that provides automated MakeMKV disc ripping with intelligent media identification and file organization.
- π¬ Automated Disc Ripping: Continuously monitors CD/DVD/Blu-ray drives for inserted media
- π Intelligent Media Identification: Automatically identifies movies and TV series via OMDB API
- π Plex-Compatible Organization: Organizes ripped files according to Plex naming conventions
- πΊ Multi-Disc TV Series Support: Handles multi-disc TV series with episode numbering continuity
- ποΈ Discover and Name Mode: Organize existing MKV files without ripping - perfect for cleaning up your media library
- π₯οΈ Cross-Platform: Supports both Windows and WSL environments
- π Progress Tracking: Real-time progress reporting during ripping operations
- π File Size Filtering: Configurable size filtering to exclude unwanted content
- βοΈ Multiple Operating Modes: Automatic, Manual, TV Series Profile Configuration, and Discover & Name
- .NET 10.0 SDK
- OMDB API key (free tier available at omdbapi.com)
- MakeMKV (licensed version for Blu-ray support) - Required for disc ripping modes only
- CD/DVD/Blu-ray drive - Required for disc ripping modes only
Note: Discover and Name mode only requires .NET 10.0 and an OMDB API key - no MakeMKV or optical drive needed.
-
Clone the repository:
git clone https://github.com/yourusername/auto-mk.git cd auto-mk -
Restore dependencies:
dotnet restore
-
Build the application:
dotnet build
Configure the application by editing appsettings.json:
{
"Rip": {
"MakeMkvPath": "path/to/makemkvcon64.exe",
"TempPath": "path/to/temp/directory",
"OutputPath": "path/to/output/directory",
"MinSizeGB": 3.0,
"MaxSizeGB": 12.0,
"MinTrackLength": "00:20:00"
},
"Omdb": {
"ApiKey": "your-omdb-api-key",
"ApiUrl": "http://www.omdbapi.com/"
}
}For development, sensitive configuration like API keys can be stored in user secrets:
dotnet user-secrets set "Omdb:ApiKey" "your-api-key"Run the application:
dotnet runAutoMk offers four operating modes to suit different workflows:
The application will:
- Monitor your optical drives for inserted discs
- Automatically scan and rip eligible content
- Identify the media using OMDB API
- Organize files into appropriate directories
- Eject the disc when complete
Features:
- Uses OMDB API for automatic identification
- Tracks TV series episode numbers across multiple discs
- Filters tracks by size settings
- Minimal user interaction required
Provides full control over the ripping process:
- User confirms all media identification
- User selects which tracks to rip
- User manually maps episodes for TV series
- State file is bypassed for fresh processing every time
Pre-configure settings for TV series before ripping:
- Set episode size ranges (min/max GB)
- Choose track sorting strategy:
- ByTrackOrder: Use MakeMKV's track numbering (Title #0, #1, #2...)
- ByMplsFileName: Sort by source MPLS file names (00042.mpls, 00043.mpls...)
- UserConfirmed: Sort by track order but confirm each episode with user (enables pattern learning)
- Configure double episode handling (auto-detect, always single, always double)
- Set starting season/episode numbers
- Enable auto-increment for multi-disc series
Organize existing MKV files without ripping - perfect for cleaning up your media library:
Workflow:
- Specify a directory containing MKV files
- For each file found, choose to:
- Identify and name: Search OMDB, identify as movie or TV series, rename with proper naming, and organize into Plex structure
- Move without naming: Transfer to file server with original name (moved to "_unidentified" folder)
- Skip: Leave the file as-is
Features:
- No disc or MakeMKV required
- Uses the same OMDB identification as ripping mode
- Generates Plex-compatible names and folder structure
- Supports both movies and TV series
- Integrates with file transfer to remote servers
- Overwrite protection for existing files
- Progress summary at completion
Example Use Cases:
- Organizing files ripped manually with MakeMKV
- Cleaning up a directory of renamed MKV files
- Batch processing media from other sources
- Preparing files for Plex import
- Movies:
Movies/{Title} ({Year})/{Title} ({Year}).mkv - TV Series:
TV Shows/{Series}/Season {##}/{Series} - S##E## - {Episode Title}.mkv - Unidentified Files:
_unidentified/{original-filename}.mkv
AutoMk follows clean architecture principles with dependency injection:
- Services: Core business logic organized into focused, single-responsibility services
- Interfaces: All services implement interfaces for testability and loose coupling
- Models: Strongly-typed configuration and data models
- Cross-Platform: Platform-specific implementations for Windows and WSL
MakeMkAuto: Main background service orchestrating the entire workflowMakeMkvService: Orchestrates MakeMKV operationsMediaIdentificationService: OMDB API integration and media processingMediaNamingService: Generates Plex-compatible namesMediaStateManager: Maintains state across disc sessionsDriveWatcher: Monitors optical drives for media (Windows/WSL variants)DiscoverAndNameService: Organizes existing MKV files without rippingMediaSelectionService: Interactive media search and selectionSeriesConfigurationService: TV series profile managementPatternLearningService: Machine learning for user selection patternsBatchRenameService: Centralized file renaming operationsProgressManager: Progress tracking and display management
# Debug build
dotnet build
# Release build
dotnet build -c Release
# WSL build
dotnet build -c wsl# Windows x64
dotnet publish -c Release -r win-x64
# Linux x64 (for WSL)
dotnet publish -c Release -r linux-x64AutoMk includes a MakeMKV emulator for testing without requiring physical discs or a MakeMKV license. The emulator mimics MakeMKV's command-line interface and allows you to configure sequences of virtual discs with custom tracks.
Features:
- Emulates MakeMKV's command-line interface completely
- Configurable disc sequences with custom tracks, sizes, and durations
- Simulates realistic ripping progress and timing
- Automatically advances through multiple discs
- Perfect for development, testing, and CI/CD pipelines
Quick Start:
-
Build the emulator:
cd MakeMkvEmulator dotnet build -
Copy an example configuration:
cp examples/quick-test-example.json emulator-config.json
-
Configure AutoMk to use the emulator:
{ "Rip": { "MakeMkvPath": "/path/to/MakeMkvEmulator/bin/Debug/net9.0/makemkvcon64" } } -
Run AutoMk - it will automatically use the emulated discs!
Example configurations included:
tv-series-example.json: Multi-disc TV series (Breaking Bad S1)movie-example.json: Movies with bonus features (The Matrix, Inception)quick-test-example.json: Fast testing with 3-5 second rip times
See MakeMkvEmulator/README.md for detailed documentation and configuration options.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
AutoMk can integrate with HandbrakeScheduler to create a complete media processing pipeline:
- AutoMk rips discs using MakeMKV and identifies content via OMDB
- HandbrakeScheduler receives the ripped files and transcodes them using HandBrake
AutoMk includes a FileTransferClient service that can automatically send ripped MKV files to HandbrakeScheduler's REST API after successful ripping. The integration preserves media metadata (movie/TV show information) throughout the pipeline.
-
Configure AutoMk's
appsettings.json:{ "Rip": { "EnableFileTransfer": true, "FileTransferSettings": { "Enabled": true, "TargetServiceUrl": "http://localhost:5000", "DeleteAfterTransfer": false } } } -
Ensure HandbrakeScheduler is running and accessible at the configured URL
-
AutoMk will automatically:
- Send completed MKV files to HandbrakeScheduler
- Include relative file paths to maintain folder structure
- Move processed files to a
_movedsubfolder (or delete if configured)
[Disc Inserted] β [AutoMk Rips with MakeMKV] β [OMDB Identification] β
[HTTP Upload to HandbrakeScheduler] β [HandBrake Transcoding] β [Final Output]
The integration maintains Plex-compatible folder structures throughout the process, ensuring your media library stays organized from disc to final transcoded file.
- MakeMKV for the excellent disc ripping functionality
- OMDB API for media metadata
- Plex for the naming convention standards
- HandbrakeScheduler for automated transcoding integration