diff --git a/FORK_NOTES.md b/FORK_NOTES.md new file mode 100644 index 0000000..297ca6e --- /dev/null +++ b/FORK_NOTES.md @@ -0,0 +1,66 @@ +# DeVeDe-NG — Hardsub & Auto-split Fork + +This is a fork of [DeVeDe-NG](https://gitlab.com/rastersoft/devedeng) that adds +three things aimed at producing burn-ready NTSC DVDs from arbitrary video files: + +1. **Embedded subtitle detection + hardsubbing (burn-in).** +2. **Selectable DVD encode profiles** (Compatibility / High quality / Custom). +3. **Automatic splitting of over-long projects across multiple ISOs / DVD-Rs.** + +The baseline encode is modelled on the known-good script in +[`contrib/dvd-safe-converter.sh`](contrib/dvd-safe-converter.sh). + +## 1. Hardsubbing embedded subtitles + +The analyzer (`ffprobe` / `avprobe`) now detects embedded subtitle tracks and +classifies each as **text** (SubRip/ASS/mov_text/WebVTT) or **image** +(PGS/VOBSUB/DVD subtitle). In a movie's *Subtitles* properties page a +**"Burn in embedded subtitle"** dropdown lets you pick one track to render +permanently into the picture. + +- **Text** subs are burned with ffmpeg's `subtitles=` (libass) filter, applied + after scaling to the DVD size. +- **Image** subs are composited with an `overlay` filtergraph *before* scaling, + so bitmap positioning stays aligned with the source frame. (OCR-to-text is an + optional future enhancement; the default overlays the bitmap directly.) + +Burned-in subtitles are part of the video; the existing *soft* subtitle support +(spumux subpicture streams from external files) is unchanged. + +## 2. Encode profiles + +A project-level **Encode profile** selector (next to the disc-size control, +DVD only): + +| Profile | Video | Audio | Notes | +| --- | --- | --- | --- | +| **Compatibility (4500k)** | CBR 4500k | AC3 192k | Old-player safe baseline (~133 min / single-layer disc). | +| **High quality (fill disc)** | VBR, fills disc | AC3 448k | Best quality per disc. | +| **Custom** | user kbps | user kbps | Advanced; clamped to stay within DVD spec. | + +NTSC DVD audio is AC3 for all profiles (the upstream default was MP2 for NTSC), +matching the baseline script and maximising player compatibility. + +## 3. Splitting long projects across discs + +Usable disc capacity is taken from the selected disc size (with the existing +~10% safety margin). When a project does not fit on one disc at the chosen +quality, you are asked whether to: + +- **Split into N discs** — keep the quality and author one DVD/ISO per disc + (`name-disc1.iso`, `name-disc2.iso`, …), **or** +- **Reduce bitrate** — squeeze everything onto a single disc (the original + behaviour). + +Multiple titles are distributed across discs whole. A single movie that is +itself larger than one disc is split by time at the **chapter boundary nearest** +each disc's capacity (falling back to an even time cut when the movie has no +chapters). Split discs are authored without a menu — each disc plays its +segment(s) directly. + +### Limitations + +- Split discs have no DVD menu. +- Burning is per-disc: the app produces the ISOs; burn each in turn. +- Image-subtitle burn-in is supported by the ffmpeg backend; the avconv backend + handles text subtitles only. diff --git a/README.md b/README.md index 00e4d44..c637121 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # DEVEDE NG # +> **Fork note:** This tree is a fork of DeVeDe-NG that adds embedded-subtitle +> **hardsubbing** (burn-in), selectable DVD **encode profiles**, and automatic +> **splitting of long projects across multiple ISOs/DVD-Rs**. See +> [FORK_NOTES.md](FORK_NOTES.md) for details. + ## WHAT IS IT? ## Devede NG is a rewrite of the Devede DVD disc authoring program. This new diff --git a/contrib/dvd-safe-converter.sh b/contrib/dvd-safe-converter.sh new file mode 100755 index 0000000..f974889 --- /dev/null +++ b/contrib/dvd-safe-converter.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Reference "DVD-safe" NTSC MPEG-2 encoder. +# +# This is the known-good baseline that the DeVeDe-NG hardsub fork's +# "Compatibility (4500k)" encode profile is modelled on. It is kept here as a +# standalone tool and as a regression reference: the fork's generated ffmpeg +# command for the Compatibility profile (without subtitle burn-in) should +# produce equivalent output (mpeg2video / 720x480 / 29.97fps / AC3 192k 48kHz). +# +# It does NOT detect or burn subtitles and does NOT split long movies; those +# features live in the GUI fork (see FORK_NOTES.md). + +if [ $# -lt 1 ]; then + echo "Usage: $0 input_video" + exit 1 +fi + +INPUT="$1" +BASENAME="$(basename "$INPUT")" +NAME="${BASENAME%.*}" +OUTPUT="${NAME}-dvdsafe.mpg" + +echo "Input: $INPUT" +echo "Output: $OUTPUT" +echo "Encoding DVD-safe MPEG-2 (CBR 4500k)..." + +ffmpeg -y -i "$INPUT" \ +-vf "scale=720:480:flags=lanczos,\ +fps=30000/1001,\ +format=yuv420p,\ +setsar=1" \ +-r 30000/1001 \ +-c:v mpeg2video \ +-b:v 4500k \ +-minrate 4500k \ +-maxrate 4500k \ +-bufsize 1835k \ +-g 15 \ +-sc_threshold 0 \ +-pix_fmt yuv420p \ +-c:a ac3 \ +-b:a 192k \ +-ar 48000 \ +-ac 2 \ +"$OUTPUT" + +echo "Done: $OUTPUT"