Expand description
libfreemkv — Open source raw disc access for optical drives.
Provides SCSI/MMC commands to enable raw reading mode on compatible Blu-ray drives, allowing direct sector access for disc archival and backup purposes.
§Architecture
The library is data-driven. Drive-specific SCSI command sequences are stored in profile files, not in code. Adding support for a new drive requires only a profile contribution — no rebuild needed.
DriveSession (high-level API)
├── Platform trait (per-chipset unlock logic)
├── DriveProfile (per-drive data from JSON profiles)
└── ScsiTransport (SG_IO on Linux, IOKit on macOS)§Quick Start
use libfreemkv::DriveSession;
use std::path::Path;
let mut session = DriveSession::open(
Path::new("/dev/sr0"),
).unwrap();
session.unlock().unwrap();
session.calibrate().unwrap();
let mut buf = vec![0u8; 2048];
let n = session.read_sectors(0, 1, &mut buf).unwrap();Re-exports§
pub use error::Error;pub use error::Result;pub use drive::DriveSession;pub use identity::DriveId;pub use profile::DriveProfile;pub use profile::Chipset;pub use platform::Platform;pub use platform::DriveStatus;pub use scsi::ScsiTransport;pub use speed::DriveSpeed;pub use disc::Disc;pub use disc::Title;pub use disc::Stream;pub use disc::StreamKind;pub use disc::Codec;pub use disc::HdrFormat;pub use disc::ColorSpace;pub use disc::Extent;
Modules§
- clpi
- CLPI clip info parser — maps clips to sector ranges on disc.
- disc
- Disc structure — scan titles, streams, and sector ranges from a Blu-ray disc.
- drive
- High-level drive session — the main API for consumers.
- error
- identity
- Drive identification — match drives to profiles by SCSI response fields.
- mpls
- MPLS playlist parser — Blu-ray movie playlists.
- platform
- Platform-specific implementations of raw disc access commands.
- profile
- Drive profile loading and matching.
- scsi
- SCSI/MMC command interface.
- speed
- Drive speed control — query and set read speeds.
- udf
- UDF filesystem reader — read files from Blu-ray discs.