Help with ripping script for 4x Blu-ray drives
Posted: Sun Aug 03, 2025 8:13 pm
Hey,
I'm planning to build a PC with 4x Blu-ray drives. I want to convert my entire Bluray collection to digital and play it with Jellyfin. I have just under 1,000 Bluray movies. But everything has to run smoothly. I wrote a script for this using ChatGPT and wanted to ask you if it will work. Maybe someone has a suitable script that I just need to modify a little.
Here is the script:
# Configuration
$makeMKVPath = "C:\Program Files (x86)\MakeMKV\makemkvcon.exe"
$outputPath = "D:\Rips" # Output directory for MKV files
$driveLetters = @("D", "E", "F", "G") # Blu-ray drive letters
$pollingInterval = 15 # Seconds between checks
function StartRip($driveLetter) {
$timestamp = Get-Date -Format "yyyy-MM-dd_HH-mm-ss"
$targetFolder = Join-Path $outputPath "$driveLetter-$timestamp"
New-Item -ItemType Directory -Path $targetFolder -Force | Out-Null
Write-Host "Starting rip for drive $driveLetter to $targetFolder"
Start-Process -FilePath $makeMKVPath -ArgumentList "mkv", "disc:0", "all", "--minlength=120", "--decrypt", "--noscan", "--directio=true", "--output=""$targetFolder""" -NoNewWindow
}
function IsDiscPresent($driveLetter) {
$vol = Get-Volume -DriveLetter $driveLetter -ErrorAction SilentlyContinue
return $vol -and $vol.FileSystem -eq "UDF"
}
# Main monitoring loop
$lastRipState = @{}
foreach ($drive in $driveLetters) {
$lastRipState[$drive] = $false
}
Write-Host "Monitoring drives: $($driveLetters -join ', ')"
Write-Host "Press CTRL+C to stop."
while ($true) {
foreach ($drive in $driveLetters) {
$discPresent = IsDiscPresent $drive
if ($discPresent -and -not $lastRipState[$drive]) {
Write-Host "Disc detected in $drive. Starting rip..."
StartRip $drive
$lastRipState[$drive] = $true
}
if (-not $discPresent -and $lastRipState[$drive]) {
Write-Host "Disc removed from $drive. Waiting for new disc..."
$lastRipState[$drive] = $false
}
}
Start-Sleep -Seconds $pollingInterval
}
I'm planning to build a PC with 4x Blu-ray drives. I want to convert my entire Bluray collection to digital and play it with Jellyfin. I have just under 1,000 Bluray movies. But everything has to run smoothly. I wrote a script for this using ChatGPT and wanted to ask you if it will work. Maybe someone has a suitable script that I just need to modify a little.
Here is the script:
# Configuration
$makeMKVPath = "C:\Program Files (x86)\MakeMKV\makemkvcon.exe"
$outputPath = "D:\Rips" # Output directory for MKV files
$driveLetters = @("D", "E", "F", "G") # Blu-ray drive letters
$pollingInterval = 15 # Seconds between checks
function StartRip($driveLetter) {
$timestamp = Get-Date -Format "yyyy-MM-dd_HH-mm-ss"
$targetFolder = Join-Path $outputPath "$driveLetter-$timestamp"
New-Item -ItemType Directory -Path $targetFolder -Force | Out-Null
Write-Host "Starting rip for drive $driveLetter to $targetFolder"
Start-Process -FilePath $makeMKVPath -ArgumentList "mkv", "disc:0", "all", "--minlength=120", "--decrypt", "--noscan", "--directio=true", "--output=""$targetFolder""" -NoNewWindow
}
function IsDiscPresent($driveLetter) {
$vol = Get-Volume -DriveLetter $driveLetter -ErrorAction SilentlyContinue
return $vol -and $vol.FileSystem -eq "UDF"
}
# Main monitoring loop
$lastRipState = @{}
foreach ($drive in $driveLetters) {
$lastRipState[$drive] = $false
}
Write-Host "Monitoring drives: $($driveLetters -join ', ')"
Write-Host "Press CTRL+C to stop."
while ($true) {
foreach ($drive in $driveLetters) {
$discPresent = IsDiscPresent $drive
if ($discPresent -and -not $lastRipState[$drive]) {
Write-Host "Disc detected in $drive. Starting rip..."
StartRip $drive
$lastRipState[$drive] = $true
}
if (-not $discPresent -and $lastRipState[$drive]) {
Write-Host "Disc removed from $drive. Waiting for new disc..."
$lastRipState[$drive] = $false
}
}
Start-Sleep -Seconds $pollingInterval
}