Sign inSign up

bxgms/bdmvauto2iso

By bxgms

Updated 4 months ago

Image
0

1.5K

bxgms/bdmvauto2iso repository overview

BDMV Auto to ISO Introduction

This project provides an automated solution to monitor specified directories, automatically detect BDMV folder structures, and package them into standard Blu-ray ISO image files with one-click container deployment.

The core automation script is originally written by a kind group member, and sincere thanks are extended to him for his excellent development and continuous maintenance of the underlying logic. I only packaged the complete script into a Docker image to simplify deployment, reduce configuration costs, and realize out-of-the-box automatic BDMV-to-ISO conversion for home media collection scenarios.

Docker Compose Deployment

Deploy the service directly via Docker Compose, with configurable watch directory, ISO output path, running parameters and custom rules through environment variables.

services:
  bdmvauto2iso:
    image: bxgms/bdmvauto2iso:latest
    container_name: bdmvauto2iso
    restart: unless-stopped
    ports:
      - 62222:22

    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"

    volumes:
      - /bdmvtest:/watch # # The script monitors the /watch directory inside the container. It will automatically start packaging and generating ISO files once a new BDMV structure (a folder containing the BDMV subdirectory) is detected. The qBittorrent download directory must point to the same host path (or remain consistent via mapping), so that downloaded movies can be monitored by the script.
      - /iso:/output # ISO files generated by the script will be written to the /output directory inside the container, allowing direct access to these ISO files on the host for subsequent use or sharing. This should also be the MP folder or its subfolder to trigger manual sorting via MP rules.
       - /logs:/logs # Maps the bdmv2iso log directory to /logs inside the container.
       - /share/CloudNAS:/share/CloudNAS:rslave #  Maps the CD2 directory to full path inside the container, auto upload iso 

    environment:
      - TZ=Asia/Shanghai
      - PUID=0
      - PGID=0
      - DELETE_SOURCE=0 # Set to 1: Automatically delete the corresponding BDMV source directory (the entire movie folder) under /watch after successful packaging and ISO generation to free up disk space. Set to 0: Keep the source files, no automatic deletion
      - VOLID_PREFIX=BDISO_ # Custom prefix for ISO volume ID
      - MIN_FREE_SPACE=20 # Minimum free disk space threshold (GB)
      - POST_COPY_DIR=/share/CloudNAS/CloudDrive/115/upload  # Output completed and an additional copy has been made to this directory(blank is off)
      - POST_MOVE_DIR=/share/CloudNAS/CloudDrive/115/upload  # After completion, move to the target directory and clear /output(blank is off)
      - QB_ENABLED=0  # QB switch                                 
      - MP_ENABLED=0  # MP switch                         
      - WAIT_SECONDS=5 # Task polling interval (seconds)
      - MP_URL= http://192.168.124.21:3000  # Accessible MediaPortal (MP) URL for the container
      - MP_TOKEN= # MP API token
      - MP_PATH_MAP=/output:/media/downloads/iso # Path mapping between the MediaPortal container and the bdmv2iso container. Format: bdmv2iso container output path:MP equivalent path. After packaging completes, the script calls the MediaPortal API to notify it to sort files. The script must send the ISO file path to MediaPortal. Since MediaPortal may run in a different container or on the host, its file access path may differ from the bdmv2iso container. MP_PATH_MAP maps the container path (/output) to a path accessible by MediaPortal (/downloads), enabling MediaPortal to process the file correctly.
      - MP_RETRY_COUNT=3 # Maximum 3 retries if notifying MP to sort files fails
      - MP_RETRY_DELAY=5 # Retry interval (in seconds) for MP file sorting notifications
      - MAX_CONCURRENT=2  # Maximum number of concurrent bdmv2iso tasks
      - DEBUG=0  # Enable/disable debug mode
      - MIN_FILE_SIZE_GB=0  # Minimum file size threshold for stability checks; 0 = no minimum packaging size limit
      - EXTRA_STABLE_SECONDS=0  # Extra wait time (in seconds) after files are marked "stable" before starting packaging
      - QB_URL=http://192.168.124.21:8080  # Accessible qBittorrent (QB) URL for the container
      - QB_USER= # qBittorrent username
      - QB_PASS=  # qBittorrent password
      - QB_PATH_MAP=/media/bdmv2iso:/watch  # Path mapping between the qBittorrent container and the bdmv2iso container. Format: QB directory for BDMV resources:bdmv2iso container monitor directory (same as QB directory). This resolves path mismatches between download paths returned by the qBittorrent API and the monitor path in the bdmv2iso container. Adjust based on your actual mounts. If QB and bdmv2iso use identical paths (e.g., both /watch), leave empty or delete this variable.

Core Features

  • Automatic real-time monitoring of the designated watch folder, intelligently identifying complete BDMV directory resources

  • One-click lossless packaging of BDMV content into standard Blu-ray ISO images, compatible with mainstream media server and playback devices

  • Flexible parameter adjustment: source file retention strategy, disk space detection, task execution interval and custom naming rules

  • Persistent running with automatic restart, stable long-term operation for media library automation management

  • Standard log splitting strategy to avoid excessive log file occupation

  • All underlying automatic conversion logic credits to the original script author from the group, making it effortless for Blu-ray enthusiasts to organize and archive BDMV resources in batches.

Tag summary

Content type

Image

Digest

sha256:0da80a7ac

Size

44.8 MB

Last updated

4 months ago

docker pull bxgms/bdmvauto2iso