Repository navigation
Hardware video encoding for H.264 and HEVC (#100) - #109
Merged
Merged
Conversation
calibre's GitHub releases keep files only for the newest version: when 9.16.0 came out, the pinned 9.15.0 .txz and .dmg links there started returning 404, so installing calibre failed on macOS and Linux. download.calibre-ebook.com keeps every version; the files are the same (sizes and SHA-256 checked). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Filee running as administrator (started by an installer run elevated) ignores drops from Explorer, can't read Explorer's selection, and the Filee that Explorer's menu starts crashed on the elevated Filee's mutex or waited 30 s on its pipe, all without a log line. - Read Filee's and Explorer's integrity levels at start-up. When Filee runs elevated and Explorer doesn't: log a warning, show a banner on the Home page and a one-time notice card, both with "Restart without administrator rights" (relaunch through Explorer's shell, after releasing the single-instance lock; a failed restart says so). - A later launch that can't open the lock or is refused by the pipe logs it and shows one message box (once per burst of launches); the pipe refusal no longer waits the whole 30 s. - Log unhandled exceptions (any thread, unobserved tasks, UI thread) through a logger set up before anything else, and one start-up line with version, path, install kind, integrity levels, OS and argument count. - UI watchdog: logs a UI thread blocked for more than 5 s and when it answers again. - Rate-limited diagnostics: forwarded launches received and handled, drag gestures that never reached the donut, shortcuts that found no selection (with the foreground window), the first drag over the drop zone. - FFmpeg -version / -encoders time out for real (background reads, kill on timeout); engine statuses are checked once in the background at start-up; unreachable network shares on PATH are skipped after 2 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A new preset option, off by default, encodes H.264 and HEVC on the GPU: NVENC, Quick Sync and AMF on Windows, VideoToolbox on macOS (quality mode on Apple Silicon, bitrate mode on Intel Macs), NVENC and VA-API on Linux. Only encoders the bundled FFmpeg has are tried, best first, and each must pass a tiny test encode with the real options (cached per FFmpeg, encoder and bit depth) before it is used. Quality levels map to each encoder's constant-quality control, one step coarser than the x264/x265 CRF. HEVC keeps 10 bits, HDR colour tags and the hvc1 tag; H.264 stays 8-bit 4:2:0 as with x264. Stream copy rules are unchanged, and AV1, VP9 and the other codecs stay in software. When a hardware encode fails anyway, the partial output is removed and the file is encoded again with x264/x265; the failure goes to the log, not to the user. Cancellation is never retried. FFmpeg's version and encoder queries now read output asynchronously and kill the process at their time limit, so a hung FFmpeg no longer blocks engine detection. The preset editor shows the option for H.264 and HEVC targets, with English, Korean and Simplified Chinese text. ENGINES.md documents the encoders, the probe, the quality mapping and the software retry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Avalonia toggles the selected item of a ComboBox or ListBox off when it is picked again with the command modifier (Ctrl+Space, Ctrl+Enter, Ctrl+click; Cmd on macOS). A combo box was left empty and pushed null into settings that always hold a value, which threw NullReferenceException in the view models (e.g. TriggerGestureViewModel) and showed it under the combo box. - SingleSelectionGuard (registered in App.Initialize) swallows that toggle on the selected item of combo boxes and single-selection list boxes; an open drop-down closes as after any pick. Multi-selection lists keep the toggle. - Choices.Restore: every Choice<T> property (Triggers, Presets editor, General, Theme, Watch folders, rename rules) and the navigation selection ignore null and keep their previous value; the control then reads the bound value again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…to HEAD # Conflicts: # src/Filee.App/App.axaml.cs
… into HEAD # Conflicts: # src/Filee.Engines/Media/FfmpegConverter.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
For #100: an opt-in "Hardware acceleration" option on video presets (
MediaOptions.HardwareEncoding, off by default so existing presets don't change). It applies to H.264 and HEVC encodes only. Stream copy, AV1, VP9 and the other codecs are unchanged.Encoders, tried in order and only if
ffmpeg -encoderslists them:*_videotoolbox, with-q:von Apple Silicon and a-b:vfallback for Intel Macs*_nvenc→*_qsv→*_amf*_nvenc→*_vaapi(only when/dev/dri/renderD128exists)Probe: each candidate is tried once with a tiny lavfi encode (15 s timeout) using the real options. Results are cached per ffmpeg executable and logged. That way a listed but unusable encoder (no GPU or driver) is skipped.
Quality maps the High/Balanced/Small tiers to each encoder's rate control:
-rc vbr -cq-global_quality-q:v, or bits per pixel on Intel Macshvc1tag is kept.VersionOf/EncodersOftimeouts now actually apply: reads are async and the process is killed on timeout.Test plan
dotnet formatis clean.Note:
FfmpegConverter.VersionOf/EncodersOfoverlap with #108.🤖 Generated with Claude Code