Replaced all 46 bare 'except:' across the package with specific exception
types, and logged the cases that indicate a real problem:
- config load/save: FileNotFoundError is the silent first-run case; other
OSError/ValueError/UnicodeDecodeError are logged.
- ffprobe/avprobe: JSON parse failures are now logged (previously a media
file that ffprobe couldn't read just silently failed to import); decode
fallbacks -> UnicodeDecodeError; duration parse -> ValueError/TypeError/
KeyError; install check -> OSError/SubprocessError.
- executor: pre_/post_function and progress-polling hooks now use hasattr
checks, and a real exception inside a defined hook is logged instead of
swallowed; decode fallbacks and numeric parses narrowed.
- best-effort filesystem ops (makedirs/unlink) -> OSError.
- all backend check_is_installed probes -> OSError/SubprocessError.
- shutdown: also fixes a latent NameError ('failure' was only set in the
except branch, so a successful logind PowerOff would crash the handler).
No bare 'except:' remain. Full suite (51 tests) green; GUI starts clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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>
Driving -progress over pipe:1 made ffmpeg block on the progress write
whenever the GUI stopped draining the pipe (e.g. the parent terminal or
the app's event loop wedging), deadlocking every running encode.
Write -progress to a temp file instead: a file write never blocks, so the
encoder runs to completion regardless of GUI state. The executor calls
optional start_/stop_progress_polling hooks; ffmpeg polls the file on a
500ms GLib timer and removes it when done. Verified an encode completes
with no reader at all (previously a hard deadlock).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The progress bar barely moved and the window showed "not responding"
during long encodes: ffmpeg's carriage-return stats line flushes rarely
over a pipe, and the transcode saturated the CPU.
- Drive progress from ffmpeg's structured `-progress pipe:1` output
(`-stats_period 0.5 -nostats`) and parse out_time/progress in
process_stdout, giving steady frequent updates (verified ~2/sec via the
live executor pipe vs ~1 per whole encode before).
- Run the encoder under `nice -n 10` so the compositor keeps a CPU slice
(avconv gets the nice prefix too).
Also round pad/crop targets to even dimensions and use positive crop
offsets, fixing an odd-height (e.g. 1079) MPEG-2 error surfaced when
burning in subtitles on a 1080p source.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Introduce three project-level DVD encode profiles (Compatibility 4500k /
High quality VBR / Custom) via new config keys, and burn a chosen
embedded subtitle track into the picture:
- file_movie carries the hardsub selection (index/kind), persists it, and
builds a subtitle-picker combobox in its properties page; set_final_rates
maps the profile to the final video/audio bitrate.
- ffmpeg burns text subs with the subtitles= filter after scaling and image
subs with an overlay filtergraph before scaling; NTSC DVD audio is now AC3
for all profiles. A start_offset (-ss) is threaded through for segmenting.
- avconv gets the text-sub path and start_offset for parity.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
After the events happened recently in the management of the FSF,
I decided that it is safer to not rely on the good faith of other
people, so I decided to allow distribution of Devede only under
the current GPLv3 license, and not allow other, still unknown,
future versions of the license.