rendervd 0.1.1
DVD/ISO → MP4 pipeline
Requires Python: >=3.10
Keywords: dvd, iso, ffmpeg, video, mp4, cli

# rendervd

`rendervd` is a Python CLI that turns a DVD source (optical disc, ISO, or DVD-Video backup directory) into an MP4.

It orchestrates external tools (it does **not** reimplement codecs/demuxers):
- FFmpeg (`ffmpeg`, `ffprobe`) for probing/encoding
- MakeMKV (`makemkvcon`) for title scanning (auto-pick) and single-title ingest
- Optional: `dvdbackup` for mirroring optical discs to disk
- Optional: Subfix OCR toolchain (`mkvextract` + `subocr` + `tesseract`) to convert bitmap DVD subtitles to text

## What it does

- **One-shot:** `rendervd [options]` (plans + runs; writes the final MP4)
- **Two-phase:** `rendervd plan ... --plan-out plan.json` → `rendervd run plan.json`
- **Replay (debug):** `rendervd replay plan.json` (requires `--plan-include-commands` when planning)

## Requirements

- Python **3.10+**
- External tools on PATH (or provided via flags/env):
  - **Required:** `ffmpeg`, `ffprobe`, `makemkvcon`
  - **Recommended:** `dvdbackup` (drive inputs like `/dev/sr0`), `mkvextract` (Subfix + debugging)
  - **Optional:** `subocr`, `tesseract` (Subfix OCR)

Validate your environment:

```sh
rendervd doctor
# machine-readable
rendervd doctor --json
```

## Install

Recommended install method is **pipx**:

```sh
python3 -m pip install --user pipx
python3 -m pipx ensurepath
pipx install rendervd
```

More complete install instructions (including distro tool installs and FFmpeg capability checks):
- https://github.com/actx4gh/rendervd/blob/HEAD/docs/install.md

## Quick start

### ISO → MP4

```sh
rendervd --dvd-src /path/to/MOVIE.iso -o ./out
```

### Drive → MP4 (Linux)

```sh
rendervd --dvd-src /dev/sr0 -o ./out
```

Note: for block devices, rendervd’s default backup mode is **auto** (it will mirror the disc with `dvdbackup` to a VIDEO_TS directory, then ingest from that). Use `--no-backup` to skip mirroring.

### Multi-title stitch

```sh
rendervd --dvd-src /path/to/MOVIE.iso -o ./out --titles 1,2,3 --chapters
```

### Plan → run

```sh
rendervd plan --dvd-src /path/to/MOVIE.iso -o ./out --titles 3 --plan-out plan.json
rendervd run plan.json
```

More workflows (plan/run/replay, drive permissions, etc.):
- https://github.com/actx4gh/rendervd/blob/HEAD/docs/quickstart.md

## Documentation

- Install: https://github.com/actx4gh/rendervd/blob/HEAD/docs/install.md
- Quickstart: https://github.com/actx4gh/rendervd/blob/HEAD/docs/quickstart.md
- Subtitles + Subfix OCR: https://github.com/actx4gh/rendervd/blob/HEAD/docs/subtitles.md
- Troubleshooting: https://github.com/actx4gh/rendervd/blob/HEAD/docs/troubleshooting.md
- Plan format: https://github.com/actx4gh/rendervd/blob/HEAD/docs/plan.md
- Plan JSON Schema: https://github.com/actx4gh/rendervd/blob/HEAD/docs/plan.schema.json
- FAQ: https://github.com/actx4gh/rendervd/blob/HEAD/docs/faq.md

## Development

```sh
python -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -e .
# or: pip install -e ".[dev]" if you want dev extras

pytest -q
```

Optional:

```sh
# integration (real tools); skipped by default
RENDERVD_INTEGRATION=1 pytest -q

# Subfix integration requires a fixture MKV containing at least one dvd_subtitle stream.
# Provide its path and enable integration:
RENDERVD_INTEGRATION=1 RENDERVD_SUBFIX_FIXTURE_MKV=/path/to/title_with_vobsub.mkv pytest -q
```

## Legal

Ensure you have the rights/authorization to copy and transcode any disc content you process.