Blu-ray ISOs: what ISO standard?

Everything related to MakeMKV
Post Reply
dudechill8D
Posts: 3
Joined: Thu Nov 20, 2025 4:03 am

Blu-ray ISOs: what ISO standard?

Post by dudechill8D »

I'm wanting to package blu-ray backups into ISOs like I can with DVDs, and by now I understand that I will have to do that outside of MakeMKV.

After some googling, I learned that DVDs usually use the ISO 9660 standard. I assume this standard is preserved when MakeMKV makes a backup? Somewhere along my journey I think I saw that DVDs are encrypted on a filesystem level, not a file level. (but idk what I'm talking about)

I run linux and was looking at the xorrisofs command line tool and it says that it makes "Rock Ridge enhanced" images that add support for POSIX features such as file permissions, which I don't see making any sense in the context of a movie disk. I also came across something that says most blu-rays use the Universal Disk Format (UDF).

My questions are
- How do I know what filesystem standard the blu-ray I'm ripping uses? (or will it always be UDF?)
- I know windows users have ImgBurn. Is there a known easy-to-use linux equivalent that will let me write UDF isos without adding extra stuff like file permissions?

I learned that I should probably not include the MAKEMKV folder in the iso. (I am decrypting it when ripping. I will probably still keep it somewhere) I assume the blu-ray standard is compatible with content that is not encrypted.

Call me nitpicky, I won't argue with you. I simply want to conform to blu-ray standards and norms just for the sake of it. I guess it's an instinct to archive with painful levels of precision. But if anyone knows the answers to these questions, or my questions are just too dumb and ignorant, I'd love to hear it!
Rojma
Posts: 107
Joined: Tue Jan 07, 2014 12:52 pm

Re: Blu-ray ISOs: what ISO standard?

Post by Rojma »

Using ImgBurn takes all of the guess work out of it and is very easy to use. If using Linux, you can run ImgBurn via Wine or a Docker container.

FYI ISO 9660 is an optical media format so it's not related to anything with what MakeMKV does (except when backing up a DVD since MakeMKV backs up DVDs directly as ISOs). ImgBurn usually automatically detects what the media type should be based on the content. For Blu-Ray content, including UHD, it should automatically switch it to UDF 2.5.

Also I always include the MakeMKV folder. Is it needed? No, but there's no harm in including it (at least in my experience I have never had a problem including it).
dudechill8D
Posts: 3
Joined: Thu Nov 20, 2025 4:03 am

Re: Blu-ray ISOs: what ISO standard?

Post by dudechill8D »

Ok, good things to know. I will consider using ImgBurn, although some more research and apparently K3B is a pretty feature complete linux alternative? no auto detection, but it does seem to give me an option for UDF. I will try it and use ImgBurn if it doesn't work out.
Rojma wrote:
Thu Nov 20, 2025 3:21 pm
Also I always include the MakeMKV folder. Is it needed? No, but there's no harm in including it (at least in my experience I have never had a problem including it).
I am also inclined to keep it in some form, because I can theoretically use it to revert to the encrypted version. But I found a thread that said including it can break VLC and an admin recommended not including it. I will probably end up zipping up the folder separately for maximum compatability across all blu-ray players, unless there is a good reason I should keep them together. viewtopic.php?t=22790

It seems like I'm not totally misunderstanding what iso formats to use, so thank you for the clarification. This is a first for me, so I wanted to be sure that I wasn't starting off on the wrong foot.
Rojma
Posts: 107
Joined: Tue Jan 07, 2014 12:52 pm

Re: Blu-ray ISOs: what ISO standard?

Post by Rojma »

I’ve played 100s of backed up ISOs withe MakeMkv folder in it with VLC and never had an issue. Why would it? That folder isn’t part of the DVD/Blu-Ray spec so why would VLC even look at it? I would be interested to read the thread where you saw this for more information.
dudechill8D
Posts: 3
Joined: Thu Nov 20, 2025 4:03 am

Re: Blu-ray ISOs: what ISO standard?

Post by dudechill8D »

If you want to read more, i did link it in the last post, but here are the specific quotes I'm referring to.
mugz8391 wrote:
Mon Aug 03, 2020 5:56 pm
When backing up a Blu-Ray, MakeMKV creates an extra directory that is not in the normal Blu-Ray directory structure, named "MakeMKV" - I have noticed that ISO images created with this additional directory can cause VLC to crash.
mike admin wrote:
Mon Aug 03, 2020 6:54 pm
You certainly shouldn't burn MAKEMKV folder to the disc.
And yeah, I was thinking the same thing honestly, it doesn't make much sense. Maybe it's not worth worrying about especially given your experience.

I still don't know that much about it, but it seems that K3B (and linux in general) doesent support UDF beyond version 2.01? Yeah, I'm going to just use ImgBurn. (Just saying it for the record)
Rojma
Posts: 107
Joined: Tue Jan 07, 2014 12:52 pm

Re: Blu-ray ISOs: what ISO standard?

Post by Rojma »

Rojma wrote:
Thu Nov 20, 2025 8:15 pm
I’ve played 100s of backed up ISOs withe MakeMkv folder in it with VLC and never had an issue. Why would it? That folder isn’t part of the DVD/Blu-Ray spec so why would VLC even look at it? I would be interested to read the thread where you saw this for more information.
Sorry I saw that you posted the thread where they talk about this. Mike Admin is the one that mentions not to include the directory, so that is pretty golden. He doesn't really explain why though. As mentioned, I've never had a problem with an ISO where I included the MakeMKV directory in the ISO, either by opening the ISO directly as a file in VLC, or mounting the ISO and then telling VLC to play as a disc (making sure to select Blu-Ray).
Mark_McG
Posts: 2
Joined: Mon Nov 24, 2025 2:51 pm

Re: Blu-ray ISOs: what ISO standard?

Post by Mark_McG »

Here. I was playing with AI coders a few months ago to see what they were capable of and how much manual cleanup they would need.
I did manage to produce this abomination of a script that I've not cleaned up yet but it works and hasn't failed so far.

Code: Select all

#!/bin/bash

# -----------------------------------------------------------------------------
# Script Name: make_bluray_iso_v2.sh
# Description:
#   Recursively search a directory tree for Blu-ray disc structures and create
#   ISO images for each found title using genisoimage.
#
#   A directory is considered a Blu-ray structure if it contains a "BDMV"
#   subdirectory with "PLAYLIST" and "STREAM" inside it. When such a structure
#   is found, an ISO named after the parent directory (e.g., "MovieTitle.iso")
#   is created in the current working directory of the script.
#
# Behavior-preserving rewrite of the original script with clearer structure,
# naming, and extensive inline documentation. No new features were added.
#
# Requirements:
#   - Bash
#   - genisoimage (or equivalent providing the genisoimage command)
#
# Usage:
#   ./make_bluray_iso_v2.sh [directory]
#
# Examples:
#   ./make_bluray_iso_v2.sh              # Search the current directory
#   ./make_bluray_iso_v2.sh /path/to/dir # Search a specific directory
#
# Notes:
#   - Generated ISOs are written to the current working directory, not next to
#     the source folder. This matches the original script's behavior.
#   - ISO creation uses UDF with iso-level 4 via genisoimage.
# -----------------------------------------------------------------------------

set -e  # Exit immediately if any command exits with a non-zero status

# ----- Colored output helpers -------------------------------------------------
# ANSI color codes for nicer terminal output
readonly RED='\033[0;31m'
readonly GREEN='\033[0;32m'
readonly YELLOW='\033[1;33m'
readonly BLUE='\033[0;34m'
readonly NC='\033[0m'  # No color / reset

# Log functions (keep names consistent with original script)
print_info() {
  # Print informational messages in blue
  # $1: Message text
  echo -e "${BLUE}[INFO]${NC} $1"
}

print_success() {
  # Print success messages in green
  # $1: Message text
  echo -e "${GREEN}[SUCCESS]${NC} $1"
}

print_warning() {
  # Print warning messages in yellow
  # $1: Message text
  echo -e "${YELLOW}[WARNING]${NC} $1"
}

print_error() {
  # Print error messages in red
  # $1: Message text
  echo -e "${RED}[ERROR]${NC} $1"
}

# ----- Pre-flight checks ------------------------------------------------------
# Ensure required external commands are available before proceeding
if ! command -v genisoimage >/dev/null 2>&1; then
  print_error "genisoimage is not installed. Please install it first."
  print_info "On Garuda/Arch you can try: sudo pacman -S cdrtools"
  exit 1
fi

# ----- Blu-ray structure detection -------------------------------------------
# Determine whether a directory looks like a Blu-ray disc structure.
# Returns 0 (true) if the directory contains BDMV/PLAYLIST and BDMV/STREAM.
#
# Arguments:
#   $1 -> Path to a directory to examine
is_bluray_structure() {
  local dir="$1"

  # Must contain the BDMV directory
  if [[ -d "$dir/BDMV" ]]; then
    # Minimal set of expected subdirectories for a Blu-ray structure
    if [[ -d "$dir/BDMV/PLAYLIST" ]] && [[ -d "$dir/BDMV/STREAM" ]]; then
      return 0  # Looks like a Blu-ray structure
    fi
  fi

  return 1  # Not a Blu-ray structure
}

# ----- ISO creation -----------------------------------------------------------
# Create an ISO image from a Blu-ray folder using genisoimage with UDF.
#
# Arguments:
#   $1 -> Path to the Blu-ray directory (the parent that contains BDMV)
#   $2 -> Output ISO filename (path can be relative or absolute)
#
# Notes on flags:
#   - -udf         : Use UDF filesystem (appropriate for Blu-ray)
#   - -iso-level 4 : Allow very long filenames and deep directory trees
#   - -o <file>    : Output ISO path
create_bluray_iso() {
  local bluray_dir="$1"
  local iso_name="$2"

  print_info "Creating ISO: $iso_name from $bluray_dir"

  if genisoimage -udf -iso-level 4 -o "$iso_name" "$bluray_dir" 2>/dev/null; then
    print_success "Successfully created: $iso_name"

    # Display the resulting size in a human-friendly format
    local size
    size=$(du -h "$iso_name" | cut -f1)
    print_info "ISO size: $size"
  else
    print_error "Failed to create ISO: $iso_name"
    return 1
  fi
}

# ----- Main workflow ----------------------------------------------------------
# Traverse the target directory tree, detect Blu-ray structures, and create
# ISOs named after the parent folder of each detected structure.
#
# Arguments:
#   $1 (optional) -> Root directory to search; defaults to current directory
main() {
  local search_dir="${1:-.}"
  local found_count=0
  local success_count=0

  print_info "Searching for Blu-ray structures in: $(realpath "$search_dir")"
  print_info "This may take a while for large directory trees..."

  # Iterate over ALL directories under search_dir. For each directory, test
  # whether it contains a Blu-ray structure (BDMV/PLAYLIST and BDMV/STREAM).
  while IFS= read -r -d '' dir; do
    if is_bluray_structure "$dir"; then
      ((found_count+=1))

      # ISO name is derived from the directory name that contains the BDMV
      # folder (i.e., the apparent title folder). The ISO is created in the
      # current working directory, mirroring original behavior.
      local parent_dir
      parent_dir=$(basename "$dir")
      local iso_filename="${parent_dir}.iso"

      # Skip if the ISO already exists in the current directory
      if [[ -f "$iso_filename" ]]; then
        print_warning "ISO already exists: $iso_filename (skipping)"
        continue
      fi

      print_info "Found Blu-ray structure: $dir"

      # Attempt to create the ISO; count only successful creations
      if create_bluray_iso "$dir" "$iso_filename"; then
        ((success_count+=1))
      fi

      echo  # Blank line for readability between items
    fi
  done < <(find "$search_dir" -type d -print0)

  # Summary
  echo "=================================="
  print_info "Search completed!"
  print_info "Blu-ray structures found: $found_count"
  print_success "ISOs created successfully: $success_count"

  if [[ $found_count -eq 0 ]]; then
    print_warning "No Blu-ray structures found in the specified directory."
    print_info "Blu-ray structures should contain 'BDMV/PLAYLIST' and 'BDMV/STREAM'."
  fi
}

# ----- Help text --------------------------------------------------------------
show_help() {
  cat <<'EOF'
Usage: make_bluray_iso_v2.sh [directory]

Recursively searches for Blu-ray disc structures and creates ISO files.

Arguments:
  directory    Directory to search (default: current directory)

Options:
  -h, --help   Show this help message

Examples:
  make_bluray_iso_v2.sh
  make_bluray_iso_v2.sh /path/to/blurays

Notes:
  This script looks for directories containing 'BDMV/PLAYLIST' and
  'BDMV/STREAM' subdirectories, which are typical of Blu-ray disc structures.
EOF
}

# ----- CLI argument parsing ---------------------------------------------------
case "${1:-}" in
  -h|--help)
    show_help
    exit 0
    ;;
  *)
    main "$@"
    ;;
esac

I have that saved that as "make_bluray_iso_v2.sh.sh" and it sits in my backup folder.

When you run the script it searches the directory it is in for any bluray folders and turns them into playable .iso files named after the directory.
So "/home/mark/Videos/backup/Supernatural_S15_Disc_3/" becomes "/home/mark/Videos/backup/Supernatural_S15_Disc_3.iso"

Hope this helps.
Post Reply