Complete High-quality profile and add menus to split discs

High profile is now fully automatic instead of relying on the manual
"adjust disc usage" button:
- compute_high_profile_bitrate() (pure, unit-tested) picks the fewest discs
  that hold the content down to a quality floor, then fills each disc; a 2h
  movie lands on one filled disc (~3750k), a 4h movie on two, a 30min clip
  on one near the 9000k cap.
- apply_high_profile_bitrate() applies that rate to every title and forces
  2-pass; it runs before split planning so the existing splitter reuses it.

Split discs now get a per-disc menu (listing that disc's titles) when the
project has a menu enabled, honoring the startup/play-all settings; they
still auto-play when menus are off.

Fix: _adjust_audio_bitrate capped its table at 384 (an MP2 limit) and
silently clamped the High profile's 448k AC3 down to 384; extend the table
to AC3 rates (448/512/640) in both the ffmpeg and avconv backends.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Luna 2026-06-04 05:18:33 -07:00
parent 5fe1013be8
commit 3d1ce504b9
3 changed files with 107 additions and 9 deletions

View file

@ -538,11 +538,14 @@ class avconv(devedeng.avbase.avbase):
self.command_var.append(output_file)
def _adjust_audio_bitrate(self, bitrate):
br = [32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384]
# includes AC3 rates above the MP2 ceiling (384) so 448k AC3 isn't
# silently clamped down
br = [32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384,
448, 512, 640]
for a in br:
if a >= bitrate:
return a
return 384
return br[-1]
def _avconv_text_subtitle_filter(self, file_project):
""" Build a `subtitles=` filter to burn a text-based embedded subtitle