libfreemkv
Open source raw disc access library for UHD Blu-ray optical drives.
Enables direct sector reading on compatible drives for UHD Blu-ray archival, backup, and media extraction. Ships with community-contributed drive profiles — no proprietary data files needed at runtime.
Features
- Drive identification — SCSI INQUIRY + GET CONFIGURATION for automatic profile matching
- Raw read mode — activate enhanced read mode on supported drives
- Speed calibration — optimal read speed per disc region
- Raw sector reading — direct READ(10) access to disc sectors
- Drive profiles — per-drive SCSI command data, shipped as JSON files
- Community-driven — submit new drive profiles via
freemkv-info
Supported Drives
Currently supports 280+ LG, ASUS, and HP optical drive firmware versions across the MediaTek MT1959 chipset family. Pioneer Renesas support is in progress.
See profiles/ for the full list.
Installation
Or add to your Cargo.toml:
[]
= "0.1"
Quick Start
As a library
use DriveSession;
use Path;
let mut session = open?;
session.enable?; // activate raw read mode
session.calibrate?; // optimize read speed
let mut buf = vec!;
session.read_sectors?;
freemkv-info
Identify your drive and check compatibility:
)
# Dumps full INQUIRY and GET CONFIGURATION responses as hex
# Useful for contributing profiles for unsupported drives
freemkv-test
Verify raw read mode works:
)
)
)
Contributing Drive Profiles
If your drive isn't supported, you can help:
- Run
freemkv-info /dev/sr0 --raw > my_drive.txt - Open an issue or PR with the output
- We'll generate a profile from your drive data
This is especially needed for Pioneer drives.
Architecture
DriveSession
├── ScsiTransport — SG_IO (Linux) / IOKit (macOS)
├── DriveProfile — per-drive JSON data
└── Platform — per-chipset unlock + read logic
├── Mt1959 — LG/ASUS MediaTek drives
└── Pioneer — Pioneer Renesas drives (WIP)
The library implements 10 drive commands per platform:
| Command | Purpose |
|---|---|
| enable | Activate raw read mode |
| read_config | Read drive configuration |
| read_register | Read hardware registers |
| calibrate | Build speed optimization table |
| keepalive | Session keepalive |
| status | Read mode status and features |
| probe | Generic drive query |
| read_sectors | Read raw disc sectors |
| read_disc_structure | Read disc metadata |
| timing | Timing calibration |
License
AGPL-3.0-only